{
  "openapi": "3.1.0",
  "info": {
    "title": "ADH Backend",
    "version": "0.0.0",
    "description": "Generated from the Drizzle schema. CRUD routes are derived per table (/<schema>/<resource>); the non-CRUD surface (auth, oauth, chat, registry, customer, storage, search, messaging, notifications, and more) is hand-written in src/openapi/paths/* and kept in sync with the routes by a drift guard."
  },
  "tags": [
    {
      "name": "access"
    },
    {
      "name": "account"
    },
    {
      "name": "auth"
    },
    {
      "name": "billing"
    },
    {
      "name": "blocks"
    },
    {
      "name": "bookmarks"
    },
    {
      "name": "bucket"
    },
    {
      "name": "chat"
    },
    {
      "name": "community"
    },
    {
      "name": "contacts"
    },
    {
      "name": "content"
    },
    {
      "name": "customer"
    },
    {
      "name": "discussion"
    },
    {
      "name": "document"
    },
    {
      "name": "ecosystem"
    },
    {
      "name": "follows"
    },
    {
      "name": "friends"
    },
    {
      "name": "gamification"
    },
    {
      "name": "integration"
    },
    {
      "name": "integrations"
    },
    {
      "name": "interactions"
    },
    {
      "name": "messaging"
    },
    {
      "name": "mfa"
    },
    {
      "name": "monitoring"
    },
    {
      "name": "notes"
    },
    {
      "name": "notifications"
    },
    {
      "name": "oauth"
    },
    {
      "name": "persona"
    },
    {
      "name": "persona_memory"
    },
    {
      "name": "personal"
    },
    {
      "name": "processing"
    },
    {
      "name": "project"
    },
    {
      "name": "public"
    },
    {
      "name": "registry"
    },
    {
      "name": "search"
    },
    {
      "name": "settings"
    },
    {
      "name": "storage"
    },
    {
      "name": "system"
    },
    {
      "name": "team"
    },
    {
      "name": "themes"
    },
    {
      "name": "tokens"
    },
    {
      "name": "usage"
    }
  ],
  "servers": [
    {
      "url": "https://api.agenticdeveloperhub.com",
      "description": "production"
    },
    {
      "url": "https://testing.api.agenticdeveloperhub.com",
      "description": "testing"
    },
    {
      "url": "http://localhost:3000",
      "description": "local"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "code": {
                "type": "string"
              }
            }
          }
        }
      },
      "User": {
        "type": "object",
        "required": [
          "id",
          "email",
          "name",
          "avatarUrl",
          "slug",
          "publicProfileEnabled",
          "capabilities"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "publicProfileEnabled": {
            "type": "boolean",
            "description": "Whether the public profile card is visible at /public/users/:slug"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AuthResult": {
        "type": "object",
        "required": [
          "token",
          "refreshToken",
          "user"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "JWT access token (Bearer credential)"
          },
          "refreshToken": {
            "type": "string",
            "description": "Opaque refresh token (rotated on use)"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        }
      },
      "RefreshResult": {
        "type": "object",
        "required": [
          "token",
          "refreshToken"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "JWT access token (Bearer credential)"
          },
          "refreshToken": {
            "type": "string"
          }
        }
      },
      "MfaChallenge": {
        "type": "object",
        "required": [
          "mfaRequired",
          "token",
          "methods"
        ],
        "properties": {
          "mfaRequired": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "token": {
            "type": "string",
            "description": "Short-lived MFA pending token"
          },
          "methods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "sms",
                "totp",
                "webauthn",
                "recovery"
              ]
            },
            "description": "Second factors the user can satisfy"
          }
        }
      },
      "ApiToken": {
        "type": "object",
        "required": [
          "id",
          "name",
          "prefix",
          "createdAt",
          "expiresAt",
          "lastUsedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string",
            "description": "Non-secret leading chars, for display"
          },
          "createdAt": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "nullable": true
          },
          "lastUsedAt": {
            "type": "string",
            "nullable": true
          },
          "scope": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "REST path prefixes this token may reach (e.g. [\"/content/markdown\"], optional \":read\" suffix, \"*\" = all). null = legacy curated-only."
          }
        }
      },
      "ApiTokenCreated": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ApiToken"
          },
          {
            "type": "object",
            "required": [
              "token"
            ],
            "properties": {
              "token": {
                "type": "string",
                "description": "The raw token value — shown exactly once"
              }
            }
          }
        ]
      },
      "AiProcessingWebhookEndpoint": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "customerId",
          "url",
          "eventTypes",
          "active",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ecosystemId": {
            "type": "string",
            "description": "Ecosystem that owns this endpoint"
          },
          "customerId": {
            "type": "string",
            "description": "User who registered the endpoint"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "HTTPS-only delivery target URL"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Subscribed event types (e.g. job.succeeded, job.failed)"
          },
          "active": {
            "type": "boolean",
            "description": "Whether the endpoint receives deliveries"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Human-readable label"
          },
          "createdAt": {
            "type": "string",
            "description": "ISO 8601 timestamp"
          },
          "updatedAt": {
            "type": "string",
            "description": "ISO 8601 timestamp of last modification"
          }
        }
      },
      "AiProcessingWebhookEndpointCreated": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AiProcessingWebhookEndpoint"
          },
          {
            "type": "object",
            "required": [
              "secret"
            ],
            "properties": {
              "secret": {
                "type": "string",
                "description": "whsec_-prefixed Standard Webhooks signing secret — returned exactly once. Store it; it cannot be retrieved again."
              }
            }
          }
        ]
      },
      "AiProcessingWebhookDelivery": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "endpointId",
          "eventId",
          "eventType",
          "payload",
          "status",
          "attempts",
          "maxAttempts",
          "nextAttemptAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ecosystemId": {
            "type": "string"
          },
          "endpointId": {
            "type": "string",
            "format": "uuid"
          },
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "eventType": {
            "type": "string"
          },
          "payload": {
            "type": "object",
            "additionalProperties": true
          },
          "status": {
            "type": "string",
            "description": "pending | delivered | failed | dead"
          },
          "attempts": {
            "type": "integer"
          },
          "maxAttempts": {
            "type": "integer"
          },
          "nextAttemptAt": {
            "type": "string"
          },
          "responseStatus": {
            "type": "integer",
            "nullable": true
          },
          "lastError": {
            "type": "string",
            "nullable": true
          },
          "deliveredAt": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "AiProcessingClaimedJob": {
        "type": "object",
        "required": [
          "id",
          "jobType",
          "targetKind",
          "targetId",
          "payload",
          "claimedAt",
          "leaseExpiresAt",
          "leaseToken"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "jobType": {
            "type": "string",
            "description": "Discriminator for worker routing (e.g. categorize_and_tag)"
          },
          "targetKind": {
            "type": "string",
            "description": "Namespace of the target entity (e.g. content.markdown)"
          },
          "targetId": {
            "type": "string",
            "description": "UUID of the target entity"
          },
          "payload": {
            "type": "object",
            "additionalProperties": true,
            "description": "Arbitrary job-specific input"
          },
          "claimedAt": {
            "type": "string",
            "description": "Drizzle-read timestamp of when the job was claimed"
          },
          "leaseExpiresAt": {
            "type": "string",
            "description": "Drizzle-read timestamp when the lease expires"
          },
          "leaseToken": {
            "type": "string",
            "description": "Opaque lease token required for heartbeat / complete / fail"
          }
        }
      },
      "AiProcessingJob": {
        "type": "object",
        "required": [
          "id",
          "jobType",
          "targetKind",
          "targetId",
          "status",
          "priority",
          "attempts",
          "maxAttempts",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "jobType": {
            "type": "string",
            "description": "Discriminator for worker routing (e.g. categorize_and_tag)"
          },
          "targetKind": {
            "type": "string",
            "description": "Namespace of the target entity (e.g. content.markdown)"
          },
          "targetId": {
            "type": "string",
            "description": "UUID of the target entity"
          },
          "status": {
            "type": "string",
            "description": "Current lifecycle status (queued | claimed | succeeded | dead)"
          },
          "priority": {
            "type": "integer",
            "description": "Higher value = claimed first; default 0"
          },
          "attempts": {
            "type": "integer",
            "description": "Number of claim attempts so far"
          },
          "maxAttempts": {
            "type": "integer",
            "description": "Maximum allowed claim attempts before dead-lettering"
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp when the job was enqueued"
          },
          "updatedAt": {
            "type": "string",
            "description": "Timestamp of the last status transition"
          }
        }
      },
      "TokenPrincipal": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "description",
          "prefix",
          "rdid",
          "bucketRdid",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "prefix": {
            "type": "string",
            "description": "Non-secret leading chars of the secret, for display"
          },
          "rdid": {
            "type": "string",
            "description": "reverse-domain id, e.g. token.<owner-slug>.<name>"
          },
          "bucketRdid": {
            "type": "string",
            "description": "the token’s own isolated bucket, e.g. storage.<owner-slug>.<name>"
          },
          "expiresAt": {
            "type": "string",
            "nullable": true
          },
          "lastUsedAt": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "TokenPrincipalCreated": {
        "type": "object",
        "required": [
          "id",
          "rdid",
          "slug",
          "description",
          "prefix",
          "bucketRdid",
          "token"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "rdid": {
            "type": "string",
            "description": "reverse-domain id, e.g. token.<owner-slug>.<name>"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "prefix": {
            "type": "string",
            "description": "Non-secret leading chars of the secret, for display"
          },
          "bucketRdid": {
            "type": "string",
            "description": "the token’s own isolated bucket, e.g. storage.<owner-slug>.<name>"
          },
          "token": {
            "type": "string",
            "description": "the raw `adh_…` secret — shown once, never again"
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "required": [
          "title",
          "status"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "URI identifying the problem type; 'about:blank' when unspecified"
          },
          "title": {
            "type": "string",
            "description": "Short, human-readable summary of the problem type"
          },
          "status": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body"
          },
          "detail": {
            "type": "string",
            "description": "Explanation specific to this occurrence"
          },
          "instance": {
            "type": "string",
            "description": "URI reference for this occurrence (the request path)"
          }
        }
      },
      "IntegrationConnection": {
        "type": "object",
        "required": [
          "id",
          "provider",
          "serviceType",
          "status",
          "displayName",
          "username",
          "externalAccountId",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "type": "string",
            "description": "Provider slug (e.g. google-calendar, github)"
          },
          "serviceType": {
            "type": "string",
            "description": "Service within the provider (e.g. calendar)"
          },
          "status": {
            "type": "string",
            "description": "active | error | revoked | pending"
          },
          "displayName": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "externalAccountId": {
            "type": "string",
            "description": "Provider-side account id"
          },
          "lastSyncAt": {
            "type": "string",
            "nullable": true,
            "description": "Last successful sync (null = never)"
          },
          "lastError": {
            "type": "string",
            "nullable": true,
            "description": "Last recorded sync error"
          },
          "createdAt": {
            "type": "string"
          },
          "syncSettings": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Caller-tunable sync settings (gmailLabelIds / redditSubreddits / …) — non-secret, returned so settings forms can prefill instead of blind-overwriting."
          }
        }
      },
      "IntegrationProvider": {
        "type": "object",
        "required": [
          "providerId",
          "displayName",
          "authMethod",
          "serviceTypes",
          "capabilities",
          "defaultPollIntervalMs"
        ],
        "properties": {
          "providerId": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "authMethod": {
            "type": "string",
            "enum": [
              "oauth",
              "oauth_instance",
              "plaid_link",
              "api_key",
              "app_password"
            ]
          },
          "serviceTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "read | write | auth"
          },
          "defaultPollIntervalMs": {
            "type": "integer",
            "description": "Default minimum sync interval (ms)"
          },
          "configFields": {
            "type": "array",
            "description": "For api_key providers: declarative config/credential fields, rendered + validated identically at ecosystem and user scope (absent for OAuth-style providers).",
            "items": {
              "type": "object",
              "required": [
                "key",
                "label",
                "secret",
                "required"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "secret": {
                  "type": "boolean"
                },
                "required": {
                  "type": "boolean"
                },
                "placeholder": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "IntegrationGlobalConfig": {
        "type": "object",
        "required": [
          "providerId",
          "config",
          "hasSecret"
        ],
        "properties": {
          "providerId": {
            "type": "string"
          },
          "config": {
            "type": "object",
            "additionalProperties": true,
            "description": "Non-secret config: clientId, scopes, URLs, endpoints, credentialStyle"
          },
          "hasSecret": {
            "type": "boolean",
            "description": "Whether a client secret is stored (the value is never returned)"
          },
          "updatedBy": {
            "type": "string",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "IntegrationProviderConfig": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "providerId",
          "config",
          "hasSecret"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ecosystemId": {
            "type": "string",
            "description": "Ecosystem id (the RLS owner)"
          },
          "providerId": {
            "type": "string"
          },
          "config": {
            "type": "object",
            "additionalProperties": true,
            "description": "Non-secret config: clientId, scopes, URLs, endpoints, credentialStyle"
          },
          "hasSecret": {
            "type": "boolean",
            "description": "Whether a client secret is stored (the value is never returned)"
          },
          "updatedBy": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "IntegrationConnectRequest": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "type",
              "providerId",
              "serviceType",
              "ecosystemId",
              "code",
              "redirectUri",
              "state"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "oauth"
                ]
              },
              "providerId": {
                "type": "string"
              },
              "serviceType": {
                "type": "string"
              },
              "ecosystemId": {
                "type": "string",
                "description": "Target ecosystem id (the caller must manage it)"
              },
              "code": {
                "type": "string",
                "description": "OAuth authorization code"
              },
              "redirectUri": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "description": "The HMAC-signed state returned by the auth-url endpoint (CSRF)"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type",
              "providerId",
              "serviceType",
              "ecosystemId",
              "fields"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "api_key"
                ]
              },
              "providerId": {
                "type": "string"
              },
              "serviceType": {
                "type": "string"
              },
              "ecosystemId": {
                "type": "string",
                "description": "Target ecosystem id (the caller must manage it)"
              },
              "fields": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "The provider's declared config fields (configFields), keyed by field key; validated + split into the secret vs non-secret config against the spec."
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type",
              "providerId",
              "serviceType",
              "ecosystemId",
              "identifier",
              "password"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "app_password"
                ]
              },
              "providerId": {
                "type": "string"
              },
              "serviceType": {
                "type": "string"
              },
              "ecosystemId": {
                "type": "string",
                "description": "Target ecosystem id (the caller must manage it)"
              },
              "identifier": {
                "type": "string"
              },
              "password": {
                "type": "string"
              },
              "instanceUrl": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type",
              "providerId",
              "serviceType",
              "ecosystemId",
              "publicToken"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "plaid_link"
                ]
              },
              "providerId": {
                "type": "string"
              },
              "serviceType": {
                "type": "string"
              },
              "ecosystemId": {
                "type": "string",
                "description": "Target ecosystem id (the caller must manage it)"
              },
              "publicToken": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type",
              "providerId",
              "serviceType",
              "ecosystemId",
              "code",
              "state"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "oauth_instance"
                ]
              },
              "providerId": {
                "type": "string"
              },
              "serviceType": {
                "type": "string"
              },
              "ecosystemId": {
                "type": "string",
                "description": "Target ecosystem id (the caller must manage it)"
              },
              "code": {
                "type": "string"
              },
              "state": {
                "type": "string"
              }
            }
          }
        ]
      },
      "IntegrationActionRequest": {
        "oneOf": [
          {
            "type": "object",
            "description": "actionType=send — an outbound email; at least one body is required",
            "required": [
              "to",
              "subject"
            ],
            "properties": {
              "to": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "cc": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "bcc": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "subject": {
                "type": "string"
              },
              "bodyText": {
                "type": "string"
              },
              "bodyHtml": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "description": "actionType=post — an outbound social post; requires text or media",
            "properties": {
              "text": {
                "type": "string"
              },
              "media": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "altText": {
                      "type": "string"
                    }
                  }
                }
              },
              "replyTo": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "description": "actionType=sms — an outbound text message (Twilio-style)",
            "required": [
              "to",
              "body"
            ],
            "properties": {
              "to": {
                "type": "string",
                "description": "E.164 phone number (e.g. +15551234567)"
              },
              "body": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          {
            "type": "object",
            "description": "actionType=submit — a Reddit-style subreddit submission; exactly one of url (link post) or non-empty text (self post) is required (an empty-string text counts as absent)",
            "required": [
              "subreddit",
              "title"
            ],
            "properties": {
              "subreddit": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_]{2,21}$",
                "description": "Subreddit name without the r/ prefix"
              },
              "title": {
                "type": "string",
                "maxLength": 300
              },
              "url": {
                "type": "string",
                "description": "Link post target (mutually exclusive with text)"
              },
              "text": {
                "type": "string",
                "description": "Self-post body (mutually exclusive with url)"
              }
            }
          },
          {
            "type": "object",
            "description": "actionType=comment — a Reddit reply (reuses the post shape); requires non-empty text and replyTo (a t1_/t3_ fullname); media is rejected by the handler",
            "properties": {
              "text": {
                "type": "string"
              },
              "media": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "altText": {
                      "type": "string"
                    }
                  }
                }
              },
              "replyTo": {
                "type": "string",
                "description": "The t1_/t3_ fullname being replied to"
              }
            }
          }
        ]
      },
      "IntegrationActionResult": {
        "type": "object",
        "required": [
          "ok",
          "status",
          "actionLogId",
          "externalId",
          "deduped"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "true when status is ok"
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "error"
            ]
          },
          "actionLogId": {
            "type": "string",
            "description": "The integration_action_logs row id"
          },
          "externalId": {
            "type": "string",
            "nullable": true,
            "description": "Provider-side id produced, if any"
          },
          "deduped": {
            "type": "boolean",
            "description": "true when an Idempotency-Key replay returned a prior row"
          },
          "error": {
            "type": "string",
            "description": "Failure message when status is error"
          }
        }
      },
      "PublicInvitationRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "ecosystem": {
            "type": "string",
            "description": "Target ecosystem address (rdid or uuid). Absent = the hub. Unknown/deleted → 404."
          }
        }
      },
      "InviteVerifyRequest": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          }
        }
      },
      "InviteVerifyResult": {
        "type": "object",
        "required": [
          "ok",
          "ecosystemName"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "ecosystemName": {
            "type": "string"
          }
        }
      },
      "InvitePreview": {
        "type": "object",
        "required": [
          "state"
        ],
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "valid",
              "expired",
              "accepted",
              "invalid"
            ]
          },
          "ecosystemName": {
            "type": [
              "string",
              "null"
            ]
          },
          "maskedDestination": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "InviteAcceptRequest": {
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "InviteAcceptResult": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "verification_required"
            ]
          },
          "ecosystemName": {
            "type": "string"
          }
        }
      },
      "EcoManagedRow": {
        "type": "object",
        "additionalProperties": true,
        "description": "A row from the ecosystem-scoped invitation surface (pending user, invitation, invitation request, admin note, or history entry). Intentionally open — the shape mirrors the admin routes 1:1, so no fixed property schema is repeated here."
      },
      "EcoManagedRowList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/EcoManagedRow"
        }
      },
      "EcoAddPendingUsersBody": {
        "type": "object",
        "required": [
          "users"
        ],
        "properties": {
          "users": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                "email": {
                  "type": "string",
                  "format": "email",
                  "maxLength": 255
                },
                "phone": {
                  "type": "string",
                  "maxLength": 32
                },
                "note": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "EcoSendInvitesBody": {
        "type": "object",
        "required": [
          "pendingUserIds"
        ],
        "properties": {
          "pendingUserIds": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 36
            }
          },
          "email": {
            "type": "object",
            "properties": {
              "note": {
                "type": "string"
              }
            }
          },
          "sms": {
            "type": "object",
            "properties": {
              "note": {
                "type": "string"
              }
            }
          }
        }
      },
      "EcoNotesReconcileBody": {
        "type": "object",
        "required": [
          "subjectTable",
          "subjectId",
          "notes"
        ],
        "properties": {
          "subjectTable": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "subjectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 36
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "content"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "maxLength": 36
                },
                "content": {
                  "type": "string",
                  "minLength": 1
                }
              }
            }
          }
        }
      },
      "AuthUserMethod": {
        "type": "object",
        "required": [
          "id",
          "userId",
          "provider",
          "providerId",
          "hasCredential",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "providerId": {
            "type": "string",
            "nullable": true
          },
          "hasCredential": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "AuthMethodSetting": {
        "type": "object",
        "required": [
          "method",
          "enabled"
        ],
        "properties": {
          "method": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "BucketRow": {
        "type": "object",
        "additionalProperties": true,
        "description": "A bucket-table row. Intentionally open — the column set is defined at runtime by the developer-managed table this bucket points at, so no fixed property schema applies."
      },
      "BucketRowList": {
        "type": "object",
        "required": [
          "rows"
        ],
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BucketRow"
            }
          }
        }
      },
      "BucketAccessGroup": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "bucketId",
          "name",
          "description",
          "kind",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string",
            "description": "owning ecosystem"
          },
          "bucketId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "description": "'everyone' (seeded) or 'custom'"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "BucketAccessGroupMember": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "accessGroupId",
          "memberType",
          "memberId",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "accessGroupId": {
            "type": "string"
          },
          "memberType": {
            "type": "string",
            "enum": [
              "user",
              "organization",
              "persona",
              "app",
              "token"
            ]
          },
          "memberId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "BucketGrant": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "accessGroupId",
          "targetType",
          "targetId",
          "crud",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "accessGroupId": {
            "type": "string"
          },
          "targetType": {
            "type": "string",
            "enum": [
              "bucket",
              "bucket_type",
              "row"
            ]
          },
          "targetId": {
            "type": "string"
          },
          "crud": {
            "type": "string",
            "description": "comma-separated CRUD subset, e.g. 'C,R,U,D' or '' (none)"
          },
          "grantedBy": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "BucketAccessGroupDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BucketAccessGroup"
          },
          {
            "type": "object",
            "required": [
              "members",
              "grants"
            ],
            "properties": {
              "members": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BucketAccessGroupMember"
                }
              },
              "grants": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BucketGrant"
                }
              }
            }
          }
        ]
      },
      "BucketAccessGroupList": {
        "type": "object",
        "required": [
          "accessGroups"
        ],
        "properties": {
          "accessGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BucketAccessGroup"
            }
          }
        }
      },
      "ChatConversation": {
        "type": "object",
        "required": [
          "id",
          "title",
          "model",
          "personaSlug",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "personaSlug": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "ChatMessage": {
        "type": "object",
        "required": [
          "id",
          "role",
          "content",
          "toolName",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "description": "e.g. user, assistant, tool, system"
          },
          "content": {
            "type": "string"
          },
          "toolName": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "ChatConversationDetail": {
        "type": "object",
        "required": [
          "conversation",
          "messages"
        ],
        "properties": {
          "conversation": {
            "$ref": "#/components/schemas/ChatConversation"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            }
          }
        }
      },
      "ChatConversationCreate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 200
          },
          "model": {
            "type": "string"
          },
          "personaSlug": {
            "type": "string"
          }
        }
      },
      "ChatConversationRename": {
        "type": "object",
        "required": [
          "title"
        ],
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        }
      },
      "ChatMessageEdit": {
        "type": "object",
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string"
          }
        }
      },
      "ChatSendMessage": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1
          },
          "clientMessageId": {
            "type": "string",
            "description": "Idempotency key for the user message"
          }
        }
      },
      "ChatStreamEvent": {
        "description": "One event in the SSE chat stream. The SSE `event:` name carries the discriminator (`open` | `token` | `tool_call_started` | `tool_call_completed` | `done` | `error`); the JSON `data:` payload is one of the shapes below.",
        "oneOf": [
          {
            "title": "ChatTokenEvent",
            "type": "object",
            "description": "token — a chunk of streamed assistant text",
            "required": [
              "text"
            ],
            "properties": {
              "text": {
                "type": "string"
              }
            }
          },
          {
            "title": "ChatToolCallStartedEvent",
            "type": "object",
            "description": "tool_call_started — the model invoked a tool",
            "required": [
              "name",
              "arguments"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "arguments": {
                "type": "string",
                "description": "JSON-encoded tool arguments"
              }
            }
          },
          {
            "title": "ChatToolCallCompletedEvent",
            "type": "object",
            "description": "tool_call_completed — a tool finished",
            "required": [
              "name",
              "ok",
              "result"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "ok": {
                "type": "boolean"
              },
              "result": {
                "type": "string",
                "description": "JSON-encoded tool result"
              }
            }
          },
          {
            "title": "ChatDoneEvent",
            "type": "object",
            "description": "done — the turn completed (empty payload)"
          },
          {
            "title": "ChatErrorEvent",
            "type": "object",
            "description": "error — the turn failed; the message explains why (HTTP stays 200)",
            "required": [
              "message"
            ],
            "properties": {
              "message": {
                "type": "string"
              }
            }
          }
        ]
      },
      "CommunicationSettings": {
        "type": "object",
        "required": [
          "dmAudienceMask",
          "presenceAudienceMask",
          "appearOffline"
        ],
        "properties": {
          "dmAudienceMask": {
            "type": "integer",
            "minimum": 0,
            "description": "AUDIENCE bitmask of who may DM the user (0 = nobody; default PUBLIC|HUB = 3)"
          },
          "presenceAudienceMask": {
            "type": "integer",
            "minimum": 0,
            "description": "AUDIENCE bitmask of who may see the user presence (0 = nobody; default PUBLIC|HUB = 3)"
          },
          "appearOffline": {
            "type": "boolean",
            "description": "When true, presence is hidden from EVERYONE regardless of the mask"
          }
        }
      },
      "AppearanceSettings": {
        "type": "object",
        "required": [
          "prefs"
        ],
        "properties": {
          "prefs": {
            "type": "object",
            "properties": {
              "colorMode": {
                "type": "string",
                "enum": [
                  "auto",
                  "light",
                  "dark"
                ],
                "description": "The user's colour scheme; 'auto' follows the operating system"
              },
              "reduceMotion": {
                "type": "string",
                "enum": [
                  "auto",
                  "on",
                  "off"
                ]
              },
              "contrast": {
                "type": "string",
                "enum": [
                  "default",
                  "high",
                  "extra-high"
                ]
              },
              "textSize": {
                "type": "string",
                "enum": [
                  "default",
                  "small",
                  "large",
                  "extra-large"
                ]
              },
              "spacing": {
                "type": "string",
                "enum": [
                  "compact",
                  "comfortable",
                  "spacious"
                ]
              },
              "focusOutlines": {
                "type": "boolean"
              },
              "underlineLinks": {
                "type": "boolean"
              }
            },
            "description": "Empty object when the user has never saved a preference (client defaults apply)"
          }
        }
      },
      "GamificationLevel": {
        "type": "object",
        "required": [
          "name",
          "minPoints",
          "sortOrder"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "minPoints": {
            "type": "integer",
            "description": "Inclusive point floor for this rung"
          },
          "sortOrder": {
            "type": "integer"
          },
          "subjectType": {
            "type": "string",
            "nullable": true,
            "description": "NULL = applies to any subject kind"
          }
        }
      },
      "GamificationBadge": {
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "icon",
          "criteriaType",
          "criteriaThreshold",
          "pointValue"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "criteriaType": {
            "type": "string"
          },
          "criteriaThreshold": {
            "type": "integer"
          },
          "pointValue": {
            "type": "integer"
          },
          "subjectType": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "GamificationRealmBadge": {
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "icon",
          "pointValue"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "statKey": {
            "type": "string",
            "nullable": true,
            "description": "The stat the rule watches"
          },
          "comparator": {
            "type": "string",
            "nullable": true,
            "enum": [
              ">=",
              ">",
              "=",
              null
            ]
          },
          "threshold": {
            "type": "integer",
            "nullable": true
          },
          "badgeLine": {
            "type": "string",
            "nullable": true,
            "description": "Groups the tiers of one line"
          },
          "tier": {
            "type": "string",
            "nullable": true,
            "enum": [
              "none",
              "bronze",
              "silver",
              "gold",
              "platinum",
              null
            ]
          },
          "pointValue": {
            "type": "integer",
            "description": "XP granted when earned"
          },
          "hidden": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          },
          "subjectType": {
            "type": "string",
            "nullable": true
          },
          "ecosystemId": {
            "type": "string",
            "nullable": true,
            "description": "NULL = platform default; else the realm"
          }
        }
      },
      "GamificationCatalogBadge": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GamificationRealmBadge"
          },
          {
            "type": "object",
            "required": [
              "source"
            ],
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "default",
                  "realm"
                ],
                "description": "'realm' when a realm row shadows the same-slot default"
              }
            }
          }
        ]
      },
      "GamificationCatalogLevel": {
        "type": "object",
        "required": [
          "name",
          "minPoints",
          "source"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "minPoints": {
            "type": "integer"
          },
          "source": {
            "type": "string",
            "enum": [
              "default",
              "realm"
            ]
          }
        }
      },
      "GamificationCatalog": {
        "type": "object",
        "required": [
          "badges",
          "levels"
        ],
        "properties": {
          "badges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GamificationCatalogBadge"
            }
          },
          "levels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GamificationCatalogLevel"
            }
          }
        }
      },
      "GamificationRealmBadgeInput": {
        "type": "object",
        "required": [
          "name",
          "description",
          "icon",
          "statKey",
          "threshold",
          "badgeLine",
          "tier",
          "pointValue"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "statKey": {
            "type": "string"
          },
          "comparator": {
            "type": "string",
            "enum": [
              ">=",
              ">",
              "="
            ],
            "default": ">="
          },
          "threshold": {
            "type": "integer",
            "minimum": 0
          },
          "badgeLine": {
            "type": "string"
          },
          "tier": {
            "type": "string",
            "enum": [
              "none",
              "bronze",
              "silver",
              "gold",
              "platinum"
            ]
          },
          "pointValue": {
            "type": "integer",
            "minimum": 0
          },
          "hidden": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "GamificationRealmLevelsUpdate": {
        "type": "object",
        "required": [
          "levels",
          "replayHint"
        ],
        "properties": {
          "levels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GamificationCatalogLevel"
            }
          },
          "replayHint": {
            "type": "string",
            "description": "The owner may POST /replay to backfill retroactively"
          }
        }
      },
      "GamificationRealmEventType": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "name",
          "statKey"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The custom event_type key"
          },
          "statKey": {
            "type": "string",
            "description": "The gamification stat this event bumps"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "GamificationRealmEventTypeInput": {
        "type": "object",
        "required": [
          "name",
          "statKey"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Custom event type key (≤64 chars); unique per realm"
          },
          "statKey": {
            "type": "string",
            "description": "The stat this event bumps (≤64 chars)"
          }
        }
      },
      "GamificationCustomEventResult": {
        "type": "object",
        "required": [
          "ingested",
          "statKey",
          "newBadges",
          "xpGained"
        ],
        "properties": {
          "ingested": {
            "type": "boolean",
            "description": "false ⇒ the dedupeKey was already seen (no-op)"
          },
          "statKey": {
            "type": "string"
          },
          "newBadges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GamificationBadge"
            }
          },
          "xpGained": {
            "type": "integer"
          }
        }
      },
      "GamificationLeaderboardEntry": {
        "type": "object",
        "required": [
          "subjectType",
          "subjectId",
          "avatarUrl",
          "totalPoints"
        ],
        "properties": {
          "subjectType": {
            "type": "string"
          },
          "subjectId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Display name (users only)"
          },
          "avatarUrl": {
            "type": "string"
          },
          "totalPoints": {
            "type": "integer"
          },
          "level": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "GamificationLeaderboard": {
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GamificationLeaderboardEntry"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        }
      },
      "GamificationSubjectBadge": {
        "type": "object",
        "required": [
          "id",
          "badgeId",
          "name",
          "description",
          "icon",
          "awardedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "badgeId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "awardedAt": {
            "type": "string"
          }
        }
      },
      "GamificationSummary": {
        "type": "object",
        "required": [
          "subjectType",
          "subjectId",
          "totalPoints",
          "optedOut",
          "badges"
        ],
        "properties": {
          "subjectType": {
            "type": "string"
          },
          "subjectId": {
            "type": "string"
          },
          "totalPoints": {
            "type": "integer"
          },
          "level": {
            "type": "string",
            "nullable": true
          },
          "optedOut": {
            "type": "boolean"
          },
          "badges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GamificationSubjectBadge"
            }
          }
        }
      },
      "GamificationPoints": {
        "type": "object",
        "required": [
          "id",
          "amount",
          "reason",
          "sourceType",
          "sourceId",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "amount": {
            "type": "integer"
          },
          "reason": {
            "type": "string"
          },
          "sourceType": {
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "GamificationPointsPage": {
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GamificationPoints"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        }
      },
      "GamificationAwardResult": {
        "type": "object",
        "required": [
          "awarded",
          "total",
          "newBadges"
        ],
        "properties": {
          "awarded": {
            "type": "boolean",
            "description": "false when the subject has opted out"
          },
          "total": {
            "type": "integer",
            "description": "The subject’s new point total"
          },
          "newBadges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GamificationBadge"
            }
          }
        }
      },
      "GamificationPreference": {
        "type": "object",
        "required": [
          "subjectType",
          "subjectId",
          "optedOut"
        ],
        "properties": {
          "subjectType": {
            "type": "string"
          },
          "subjectId": {
            "type": "string"
          },
          "optedOut": {
            "type": "boolean"
          }
        }
      },
      "GamificationReplayResult": {
        "type": "object",
        "required": [
          "subjects",
          "badges"
        ],
        "properties": {
          "subjects": {
            "type": "integer",
            "description": "Subjects touched (1 for a single-subject replay)"
          },
          "badges": {
            "type": "integer",
            "description": "Newly-granted badges across the replayed subject(s)"
          },
          "xpGained": {
            "type": "integer",
            "description": "Points granted — single-subject replay only"
          }
        }
      },
      "GamificationBoardEntry": {
        "type": "object",
        "required": [
          "rank",
          "value",
          "persona"
        ],
        "properties": {
          "rank": {
            "type": "integer",
            "description": "1-based rank among the surviving (public) entries"
          },
          "value": {
            "type": "integer",
            "description": "The window's ranking value: rolling30 → 30-day sum, allTime → all-time total, trending → raw recent-7d sum (the hotness score only orders; it is not returned)."
          },
          "persona": {
            "type": "object",
            "required": [
              "slug",
              "name"
            ],
            "properties": {
              "slug": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          }
        }
      },
      "GamificationBoard": {
        "type": "object",
        "required": [
          "statKey",
          "window",
          "entries"
        ],
        "properties": {
          "statKey": {
            "type": "string",
            "enum": [
              "adventures",
              "allies",
              "days_active"
            ]
          },
          "window": {
            "type": "string",
            "enum": [
              "rolling30",
              "allTime",
              "trending",
              "season"
            ]
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GamificationBoardEntry"
            }
          }
        }
      },
      "GamificationSeasons": {
        "type": "object",
        "nullable": true,
        "required": [
          "anchor",
          "lengthDays"
        ],
        "properties": {
          "anchor": {
            "type": "string",
            "description": "Season 0 start day (YYYY-MM-DD, UTC)"
          },
          "lengthDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 366,
            "description": "Days per season"
          }
        }
      },
      "GamificationRealmConfig": {
        "type": "object",
        "required": [
          "ecosystemId",
          "enabled",
          "skin",
          "surfaces",
          "seasons",
          "timezone"
        ],
        "properties": {
          "ecosystemId": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "description": "false leaves telemetry flowing but suppresses awards/UI"
          },
          "skin": {
            "type": "string",
            "enum": [
              "rpg",
              "plain"
            ]
          },
          "surfaces": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "Per-surface toggles; a surface is ON unless set false"
          },
          "seasons": {
            "$ref": "#/components/schemas/GamificationSeasons",
            "description": "Season board window config; null ⇒ seasons off"
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone for the realm's day/streak boundary (Night Owl); defaults to 'UTC'"
          }
        }
      },
      "GamificationRealmConfigUpdate": {
        "type": "object",
        "required": [
          "config"
        ],
        "properties": {
          "config": {
            "$ref": "#/components/schemas/GamificationRealmConfig"
          },
          "replayed": {
            "$ref": "#/components/schemas/GamificationReplayResult",
            "description": "Present only when enabling the realm triggered a retroactive replay"
          }
        }
      },
      "CustomerAuthResult": {
        "type": "object",
        "required": [
          "token",
          "refreshToken",
          "customerId"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "End-customer access token (typ='customer' JWT, short-lived)"
          },
          "refreshToken": {
            "type": "string",
            "description": "Opaque customer-session refresh token (single-use; rotated on refresh)"
          },
          "customerId": {
            "type": "string",
            "description": "The end-customer id"
          }
        }
      },
      "CustomerResolveResult": {
        "type": "object",
        "required": [
          "customerId"
        ],
        "properties": {
          "customerId": {
            "type": "string",
            "description": "The stable ADH customer id for this externalId"
          }
        }
      },
      "CustomerRegisterResult": {
        "type": "object",
        "required": [
          "customerId"
        ],
        "properties": {
          "customerId": {
            "type": "string",
            "description": "The newly provisioned end-customer id"
          }
        }
      },
      "DiscussionTopic": {
        "type": "object",
        "required": [
          "id",
          "communityId",
          "title",
          "isPinned",
          "isLocked",
          "isPublic",
          "replyCount",
          "lastActivityAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "communityId": {
            "type": "string",
            "description": "The community instance this topic belongs to."
          },
          "customerId": {
            "type": "string",
            "description": "Author (server-stamped principal). Omitted on the public surface."
          },
          "title": {
            "type": "string"
          },
          "categoryId": {
            "type": "string",
            "nullable": true
          },
          "isPinned": {
            "type": "boolean"
          },
          "isLocked": {
            "type": "boolean"
          },
          "isPublic": {
            "type": "boolean"
          },
          "replyCount": {
            "type": "integer"
          },
          "answeredPostId": {
            "type": "string",
            "nullable": true
          },
          "lastActivityAt": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "excerpt": {
            "type": "string",
            "nullable": true,
            "description": "LIST routes only: the opening post’s leading prose, flattened from markdown server-side (≤240 chars; null when its body doc was soft-deleted). Absent on single-topic reads and create/update responses."
          },
          "authorName": {
            "type": "string",
            "nullable": true,
            "description": "Authed COMMUNITY list route only: the author’s display name. Never on the public surface or the flat /discussion/topics list."
          },
          "authorSlug": {
            "type": "string",
            "nullable": true,
            "description": "Authed COMMUNITY list route only: the author’s public handle. Never on the public surface or the flat /discussion/topics list."
          },
          "authorAvatarUrl": {
            "type": "string",
            "nullable": true,
            "description": "Authed COMMUNITY list route only: the author’s avatar URL. Never on the public surface or the flat /discussion/topics list."
          }
        }
      },
      "DiscussionPost": {
        "type": "object",
        "required": [
          "id",
          "topicId",
          "parentPostId",
          "postNumber",
          "bodyDocumentId",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "topicId": {
            "type": "string"
          },
          "parentPostId": {
            "type": "string",
            "nullable": true
          },
          "postNumber": {
            "type": "integer"
          },
          "bodyDocumentId": {
            "type": "string",
            "nullable": true,
            "description": "The content.markdown doc backing this post’s body."
          },
          "customerId": {
            "type": "string",
            "description": "Author (server-stamped principal). Omitted on the public surface."
          },
          "ecosystemId": {
            "type": "string",
            "description": "Owning ecosystem (present on create only)."
          },
          "communityId": {
            "type": "string",
            "description": "The community instance (inherited from the topic; present on create only)."
          },
          "content": {
            "type": "string",
            "nullable": true,
            "description": "Resolved markdown body (present on the list routes; null if the body doc was deleted)."
          },
          "isDeleted": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "EcosystemFeatureFlag": {
        "type": "object",
        "required": [
          "key",
          "enabled",
          "description",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "EcosystemServerBagEntry": {
        "type": "object",
        "required": [
          "key",
          "value",
          "description",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "description": "Arbitrary JSON value"
          },
          "description": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "Community": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "isPublic"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "settings": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Opaque per-instance config bag."
          },
          "isPublic": {
            "type": "boolean"
          }
        }
      },
      "PublicCommunity": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "isPublic"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "isPublic": {
            "type": "boolean"
          }
        }
      },
      "CommunityCategory": {
        "type": "object",
        "required": [
          "id",
          "communityId",
          "slug",
          "name",
          "displayOrder",
          "isPublic",
          "isArchived",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "communityId": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "displayOrder": {
            "type": "integer"
          },
          "isPublic": {
            "type": "boolean"
          },
          "isArchived": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "discussionCount": {
            "type": "integer",
            "description": "Live discussions filed under this category (public-only for anonymous callers)."
          },
          "lastActivityAt": {
            "type": "string",
            "nullable": true,
            "description": "Most recent activity across the category’s live discussions (null when empty)."
          }
        }
      },
      "CommunityMember": {
        "type": "object",
        "required": [
          "communityId",
          "customerId",
          "role",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "communityId": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "description": "owner | admin | moderator | member"
          },
          "bio": {
            "type": "string",
            "nullable": true,
            "description": "The member’s one-line \"what I’m building\" intro for this community."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "CommunityDirectoryEntry": {
        "type": "object",
        "required": [
          "customerId",
          "role",
          "joinedAt",
          "postCount",
          "activeCategoryIds"
        ],
        "properties": {
          "customerId": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "description": "owner | admin | moderator | member"
          },
          "bio": {
            "type": "string",
            "nullable": true
          },
          "joinedAt": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "avatarUrl": {
            "type": "string",
            "nullable": true
          },
          "postCount": {
            "type": "integer",
            "description": "Live posts by this member in this community."
          },
          "activeCategoryIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Distinct category ids this member has posted in."
          }
        }
      },
      "CommunityProfile": {
        "type": "object",
        "required": [
          "customerId",
          "slug",
          "avatarUrl"
        ],
        "properties": {
          "customerId": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "slug": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string"
          }
        }
      },
      "StringList": {
        "type": "object",
        "title": "StringList",
        "description": "A wrapper object `{ items: string[] }` (NOT a bare array). Returned by the tag/category facet and autocomplete endpoints.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The string values."
          }
        }
      },
      "MarkdownDocument": {
        "type": "object",
        "required": [
          "id",
          "customerId",
          "ecosystemId",
          "ownerKind",
          "ownerId",
          "title",
          "content",
          "contentHash",
          "sizeBytes",
          "currentVersion",
          "tags",
          "visibility",
          "stage",
          "kind",
          "createdAt",
          "updatedAt",
          "isDeleted"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "customerId": {
            "type": "string",
            "description": "The CREATOR/author (public routes key on this)."
          },
          "ecosystemId": {
            "type": "string",
            "description": "Ecosystem (tenant) id."
          },
          "ownerKind": {
            "type": "string",
            "enum": [
              "customer",
              "organization"
            ],
            "description": "The kind of principal that OWNS the doc (what access scopes by)."
          },
          "ownerId": {
            "type": "string",
            "description": "The owning principal (customer or organization id); server-stamped from the verified ?workspace= scope, else the creator."
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string",
            "description": "Full raw markdown, byte-exact."
          },
          "frontmatter": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true,
            "description": "Optional classification label."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tag set (defaults to [])."
          },
          "visibility": {
            "type": "string",
            "enum": [
              "private",
              "public"
            ],
            "description": "Publication state: 'public' is readable on the public surface, 'private' is a draft."
          },
          "stage": {
            "type": "string",
            "enum": [
              "draft",
              "final"
            ],
            "description": "Editorial stage: 'draft' is editable; 'final' is immutable (content/title edits + version writes are rejected)."
          },
          "kind": {
            "type": "string",
            "enum": [
              "paper",
              "research"
            ],
            "description": "Document kind: 'paper' (ordinary) or 'research' (AI-ingested, carries an adh_source frontmatter key)."
          },
          "publicRoute": {
            "type": "string",
            "nullable": true,
            "description": "Public route slug (non-null iff visibility='public'); unique per author."
          },
          "contentHash": {
            "type": "string",
            "description": "SHA-256 hex of content (ETag)."
          },
          "sizeBytes": {
            "type": "integer"
          },
          "currentVersion": {
            "type": "integer",
            "description": "The current revision number (incremented on every edit)."
          },
          "latestVersionId": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "isDeleted": {
            "type": "boolean"
          }
        }
      },
      "MarkdownDocumentSummary": {
        "type": "object",
        "required": [
          "id",
          "title",
          "contentHash",
          "sizeBytes",
          "currentVersion",
          "tags",
          "visibility",
          "stage",
          "kind",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "frontmatter": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "visibility": {
            "type": "string",
            "enum": [
              "private",
              "public"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "draft",
              "final"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "paper",
              "research"
            ]
          },
          "publicRoute": {
            "type": "string",
            "nullable": true
          },
          "contentHash": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer"
          },
          "currentVersion": {
            "type": "integer"
          },
          "latestVersionId": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "MarkdownDocumentVersion": {
        "type": "object",
        "required": [
          "id",
          "documentId",
          "customerId",
          "ecosystemId",
          "ownerKind",
          "ownerId",
          "version",
          "title",
          "content",
          "contentHash",
          "sizeBytes",
          "createdAt",
          "isDeleted"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "documentId": {
            "type": "string"
          },
          "customerId": {
            "type": "string",
            "description": "The revision WRITER."
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "ecosystemId": {
            "type": "string"
          },
          "ownerKind": {
            "type": "string",
            "enum": [
              "customer",
              "organization"
            ],
            "description": "Inherited from the head document at write."
          },
          "ownerId": {
            "type": "string",
            "description": "Inherited from the head document at write."
          },
          "version": {
            "type": "integer"
          },
          "title": {
            "type": "string",
            "description": "Document title at this revision (full-state snapshot)."
          },
          "content": {
            "type": "string"
          },
          "contentHash": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer"
          },
          "frontmatter": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true
          },
          "authorType": {
            "type": "string",
            "nullable": true
          },
          "authorId": {
            "type": "string",
            "nullable": true
          },
          "authorName": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "isDeleted": {
            "type": "boolean"
          }
        }
      },
      "MarkdownDocumentVersionSummary": {
        "type": "object",
        "required": [
          "id",
          "version",
          "title",
          "contentHash",
          "sizeBytes",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "contentHash": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer"
          },
          "authorType": {
            "type": "string",
            "nullable": true
          },
          "authorId": {
            "type": "string",
            "nullable": true
          },
          "authorName": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "MessagingLogEntry": {
        "type": "object",
        "required": [
          "id",
          "customerId",
          "ecosystemId",
          "channel",
          "recipient",
          "body",
          "status",
          "origin",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "customerId": {
            "type": "string",
            "description": "Target user (recipient) id"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "ecosystemId": {
            "type": "string",
            "description": "Ecosystem (tenant) id"
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "sms"
            ]
          },
          "recipient": {
            "type": "string",
            "description": "Resolved destination (email address or phone)"
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "body": {
            "type": "string"
          },
          "templateId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "sent",
              "failed"
            ],
            "description": "Send outcome"
          },
          "providerId": {
            "type": "string",
            "nullable": true,
            "description": "Provider message id (when sent)"
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "sentBy": {
            "type": "string",
            "nullable": true,
            "description": "Admin user id who issued the send"
          },
          "origin": {
            "type": "string",
            "enum": [
              "platform",
              "ecosystem"
            ],
            "description": "Sending surface: 'ecosystem' = the per-ecosystem Messaging tool; 'platform' = automated/system send (only the admin log shows these)"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "MessagingLogPage": {
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessagingLogEntry"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        }
      },
      "MessagingTemplate": {
        "type": "object",
        "required": [
          "id",
          "name",
          "subject",
          "htmlBody",
          "textBody",
          "category"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "htmlBody": {
            "type": "string"
          },
          "textBody": {
            "type": "string"
          },
          "smsBody": {
            "type": "string"
          },
          "category": {
            "type": "string"
          }
        }
      },
      "MessagingStatus": {
        "type": "object",
        "required": [
          "email",
          "sms"
        ],
        "properties": {
          "email": {
            "type": "boolean",
            "description": "Postmark configured + enabled"
          },
          "sms": {
            "type": "boolean",
            "description": "Twilio configured + enabled"
          }
        }
      },
      "MessagingSendResult": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "sent",
              "failed"
            ]
          },
          "providerId": {
            "type": "string",
            "description": "Provider message id (on success)"
          },
          "error": {
            "type": "string",
            "description": "Failure reason (on failure)"
          }
        }
      },
      "Notification": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "userId",
          "category",
          "title",
          "data",
          "status",
          "isRead",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "actorId": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string"
          },
          "entityKind": {
            "type": "string",
            "nullable": true
          },
          "entityId": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          },
          "status": {
            "type": "string",
            "enum": [
              "inbox",
              "archived",
              "trashed"
            ]
          },
          "isRead": {
            "type": "boolean"
          },
          "dedupeKey": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "readAt": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "NotificationPreference": {
        "type": "object",
        "required": [
          "category",
          "email",
          "sms"
        ],
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "account",
              "community_reply",
              "community_mention",
              "admin_announcement",
              "direct_message"
            ]
          },
          "email": {
            "type": "boolean"
          },
          "sms": {
            "type": "boolean"
          }
        }
      },
      "Friendship": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "requesterId",
          "addresseeId",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "requesterId": {
            "type": "string"
          },
          "addresseeId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "accepted",
              "declined"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "FriendEntry": {
        "type": "object",
        "required": [
          "friendId",
          "friendship"
        ],
        "properties": {
          "friendId": {
            "type": "string"
          },
          "friendship": {
            "$ref": "#/components/schemas/Friendship"
          }
        }
      },
      "Follow": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "followerId",
          "followeeId",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "followerId": {
            "type": "string"
          },
          "followeeId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "UserBlock": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "blockerId",
          "blockedId",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "blockerId": {
            "type": "string"
          },
          "blockedId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "Bookmark": {
        "type": "object",
        "required": [
          "id",
          "customerId",
          "ecosystemId",
          "targetKind",
          "targetId",
          "notify",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "targetKind": {
            "type": "string"
          },
          "targetId": {
            "type": "string"
          },
          "notify": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "Note": {
        "type": "object",
        "required": [
          "id",
          "content",
          "title",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "description": "Derived from the doc’s first line."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "Reaction": {
        "type": "object",
        "required": [
          "id",
          "customerId",
          "ecosystemId",
          "targetKind",
          "targetId",
          "emoji",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "targetKind": {
            "type": "string"
          },
          "targetId": {
            "type": "string"
          },
          "emoji": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PollVote": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "customerId",
          "optionId",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "optionId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PollTallyOption": {
        "type": "object",
        "required": [
          "optionId",
          "text",
          "sortOrder",
          "votes"
        ],
        "properties": {
          "optionId": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "sortOrder": {
            "type": "integer"
          },
          "votes": {
            "type": "integer"
          }
        }
      },
      "PollTally": {
        "type": "object",
        "required": [
          "pollId",
          "options",
          "myOptionIds"
        ],
        "properties": {
          "pollId": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PollTallyOption"
            }
          },
          "myOptionIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ContactMethod": {
        "type": "object",
        "required": [
          "id",
          "type",
          "value",
          "verified",
          "isPrimary"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "email",
              "phone"
            ]
          },
          "value": {
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "PrivacyGrant": {
        "type": "object",
        "required": [
          "targetTable",
          "targetId",
          "audienceMask"
        ],
        "properties": {
          "targetTable": {
            "type": "string",
            "enum": [
              "avatar",
              "social_links",
              "addresses",
              "contact_methods"
            ]
          },
          "targetId": {
            "type": "string"
          },
          "audienceMask": {
            "type": "integer"
          }
        }
      },
      "Project": {
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "status",
          "color",
          "createdAt",
          "updatedAt",
          "isDeleted",
          "syncVersion",
          "customerId",
          "ecosystemId",
          "ownerKind",
          "ownerId"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "lifecycle status (DB default 'active')"
          },
          "color": {
            "type": "string",
            "description": "hex board accent (DB default #007AFF)"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "isDeleted": {
            "type": "boolean"
          },
          "syncVersion": {
            "type": "integer"
          },
          "customerId": {
            "type": "string",
            "description": "the customer (user) who created the project"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "ecosystemId": {
            "type": "string",
            "description": "the owning ecosystem (tenant scope)"
          },
          "archivedAt": {
            "type": "string",
            "nullable": true,
            "description": "ISO timestamp when archived; null = not archived"
          },
          "ownerKind": {
            "type": "string",
            "enum": [
              "customer",
              "organization"
            ],
            "description": "the kind of principal that OWNS the project"
          },
          "ownerId": {
            "type": "string",
            "description": "the owning principal (customer or organization id); server-stamped from the verified ?workspace= scope, else the creator"
          }
        }
      },
      "ProjectStatus": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "projectId",
          "key",
          "label",
          "category",
          "position",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "description": "stable identifier, unique within the project"
          },
          "label": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": [
              "todo",
              "in_progress",
              "done"
            ]
          },
          "position": {
            "type": "integer",
            "description": "column order (ascending)"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "ProjectParticipant": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "projectId",
          "participantKind",
          "participantId",
          "role",
          "addedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "participantKind": {
            "type": "string",
            "enum": [
              "customer",
              "persona",
              "team"
            ]
          },
          "participantId": {
            "type": "string",
            "description": "the attached actor id (opaque)"
          },
          "role": {
            "type": "string",
            "description": "the participant's project role (DB default 'member')"
          },
          "addedBy": {
            "type": "string",
            "nullable": true
          },
          "addedAt": {
            "type": "string"
          }
        }
      },
      "ProjectField": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "projectId",
          "key",
          "label",
          "type",
          "position",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "description": "stable identifier, unique within the project"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "date",
              "select",
              "user",
              "checkbox"
            ]
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "description": "the choices for a select field (non-empty); null for every other type"
          },
          "position": {
            "type": "integer",
            "description": "field order (ascending)"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "WorkItem": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "projectId",
          "title",
          "description",
          "statusId",
          "priority",
          "labels",
          "position",
          "createdAt",
          "updatedAt",
          "isDeleted"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "statusId": {
            "type": "string",
            "description": "the board column this card sits in"
          },
          "assigneeKind": {
            "type": "string",
            "enum": [
              "customer",
              "persona",
              "team",
              null
            ],
            "nullable": true
          },
          "assigneeId": {
            "type": "string",
            "nullable": true
          },
          "priority": {
            "type": "integer"
          },
          "startDate": {
            "type": "string",
            "nullable": true,
            "description": "date (YYYY-MM-DD)"
          },
          "dueDate": {
            "type": "string",
            "nullable": true,
            "description": "date (YYYY-MM-DD)"
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "parentId": {
            "type": "string",
            "nullable": true,
            "description": "a parent work item in the same project"
          },
          "position": {
            "type": "integer",
            "description": "board order within the project (ascending)"
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "isDeleted": {
            "type": "boolean"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WorkItemFieldValue": {
        "type": "object",
        "required": [
          "fieldId",
          "key",
          "label",
          "type"
        ],
        "properties": {
          "fieldId": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "date",
              "select",
              "user",
              "checkbox"
            ]
          },
          "value": {
            "nullable": true,
            "description": "the field's stored value for this item (type matches the field's type); null when unset"
          }
        }
      },
      "WorkItemDependency": {
        "type": "object",
        "required": [
          "id",
          "dependsOnId",
          "title",
          "status",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "the dependency edge id"
          },
          "dependsOnId": {
            "type": "string",
            "description": "the work item this one depends on"
          },
          "title": {
            "type": "string",
            "description": "the depended-on item title (joined)"
          },
          "status": {
            "type": "string",
            "description": "the depended-on item statusId (joined)"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "ProjectActivity": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "projectId",
          "action",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "workItemId": {
            "type": "string",
            "nullable": true,
            "description": "set when the event is card-scoped"
          },
          "actorKind": {
            "type": "string",
            "nullable": true
          },
          "actorId": {
            "type": "string",
            "nullable": true
          },
          "actorLabel": {
            "type": "string",
            "nullable": true
          },
          "action": {
            "type": "string",
            "description": "the event, e.g. project.created/updated/deleted, status.*, participant.*, work_item.created/updated/status_changed/assigned/deleted, comment.added"
          },
          "detail": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "action-specific payload (jsonb)"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "ProjectArtifact": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "projectId",
          "direction",
          "targetKind",
          "targetId",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "direction": {
            "type": "string",
            "enum": [
              "ingested",
              "produced"
            ],
            "description": "whether the project INGESTED or PRODUCED this target"
          },
          "targetKind": {
            "type": "string",
            "description": "the target's registry, e.g. 'content.markdown'"
          },
          "targetId": {
            "type": "string",
            "description": "the opaque target id"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true,
            "description": "set when un-linked (soft delete); null for a live link"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "PersonaMemory": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "customerId",
          "personaId",
          "scope",
          "slug",
          "memoryType",
          "description",
          "body",
          "status",
          "source",
          "confidence",
          "tags",
          "recallCount",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string",
            "description": "Ecosystem (tenant) id"
          },
          "customerId": {
            "type": "string",
            "description": "Owning user; empty for a global memory"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "personaId": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "user",
              "persona"
            ]
          },
          "slug": {
            "type": "string"
          },
          "memoryType": {
            "type": "string",
            "enum": [
              "user",
              "feedback",
              "project",
              "reference"
            ]
          },
          "description": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "subjectTable": {
            "type": "string",
            "nullable": true
          },
          "subjectId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "superseded",
              "archived"
            ]
          },
          "supersedesId": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "enum": [
              "inferred",
              "user_stated",
              "tool"
            ]
          },
          "confidence": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "validFrom": {
            "type": "string",
            "nullable": true
          },
          "validTo": {
            "type": "string",
            "nullable": true
          },
          "recallCount": {
            "type": "integer"
          },
          "lastRecalledAt": {
            "type": "string",
            "nullable": true
          },
          "embeddingModel": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "PersonaMemoryMatch": {
        "type": "object",
        "required": [
          "id",
          "personaId",
          "scope",
          "slug",
          "memoryType",
          "description",
          "body",
          "confidence",
          "tags",
          "similarity"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "personaId": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "user",
              "persona"
            ]
          },
          "slug": {
            "type": "string"
          },
          "memoryType": {
            "type": "string",
            "enum": [
              "user",
              "feedback",
              "project",
              "reference"
            ]
          },
          "description": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "confidence": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "similarity": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Cosine similarity, negatives clamped to 0"
          }
        }
      },
      "PersonaMemoryRecallResult": {
        "type": "object",
        "required": [
          "memories"
        ],
        "properties": {
          "memories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonaMemoryMatch"
            }
          }
        }
      },
      "PersonaMemoryEmbedResult": {
        "type": "object",
        "required": [
          "embedded",
          "failed",
          "more"
        ],
        "properties": {
          "embedded": {
            "type": "integer",
            "description": "Rows embedded this call"
          },
          "failed": {
            "type": "integer",
            "description": "Rows that failed to embed (retried next call)"
          },
          "more": {
            "type": "boolean",
            "description": "True if the batch filled `limit` — call again"
          }
        }
      },
      "PersonaService": {
        "type": "object",
        "required": [
          "id",
          "providerKind",
          "name",
          "baseUrl",
          "hasApiKey",
          "connectStatus",
          "models"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "templateId": {
            "type": "string",
            "nullable": true
          },
          "providerKind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string"
          },
          "hasApiKey": {
            "type": "boolean"
          },
          "connectStatus": {
            "type": "string"
          },
          "connectError": {
            "type": "string",
            "nullable": true
          },
          "lastConnectedAt": {
            "type": "string",
            "nullable": true
          },
          "documentationUrl": {
            "type": "string",
            "nullable": true
          },
          "statusUrl": {
            "type": "string",
            "nullable": true
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonaServiceModel"
            }
          },
          "modelsFetchedAt": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PersonaServiceModel": {
        "oneOf": [
          {
            "type": "string",
            "description": "Model id"
          },
          {
            "type": "object",
            "additionalProperties": true,
            "description": "Model descriptor"
          }
        ]
      },
      "ProviderTemplateModel": {
        "type": "object",
        "required": [
          "id",
          "name",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "ProviderTemplate": {
        "type": "object",
        "required": [
          "id",
          "providerKind",
          "name",
          "baseUrl",
          "documentationUrl",
          "statusUrl",
          "connectionSpec",
          "createdAt",
          "updatedAt",
          "models"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "providerKind": {
            "type": "string",
            "enum": [
              "openai",
              "anthropic",
              "gemini"
            ]
          },
          "name": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string"
          },
          "documentationUrl": {
            "type": "string",
            "nullable": true
          },
          "statusUrl": {
            "type": "string",
            "nullable": true
          },
          "connectionSpec": {
            "$ref": "#/components/schemas/ProviderConnectionSpec"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProviderTemplateModel"
            }
          }
        }
      },
      "ProviderConnectionSpec": {
        "type": "object",
        "nullable": true,
        "required": [
          "specVersion"
        ],
        "properties": {
          "specVersion": {
            "type": "integer",
            "enum": [
              1
            ]
          },
          "urlVars": {
            "type": "array",
            "description": "base_url placeholders the connect UI prompts for and substitutes.",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "example": {
                  "type": "string"
                },
                "secret": {
                  "type": "boolean"
                }
              }
            }
          },
          "headerVars": {
            "type": "array",
            "description": "headers the connect UI prompts a per-connection value for and writes into extraHeaders.",
            "items": {
              "type": "object",
              "required": [
                "header"
              ],
              "properties": {
                "header": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "example": {
                  "type": "string"
                },
                "secret": {
                  "type": "boolean"
                }
              }
            }
          },
          "auth": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "bearer",
                  "header",
                  "sigv4",
                  "oauth2"
                ]
              },
              "header": {
                "type": "string",
                "description": "header auth: the header name (e.g. api-key)"
              },
              "scheme": {
                "type": "string",
                "enum": [
                  "bearer",
                  "raw"
                ]
              },
              "region": {
                "type": "string",
                "description": "sigv4 (reserved)"
              },
              "tokenUrl": {
                "type": "string",
                "description": "oauth2 (reserved)"
              }
            }
          },
          "defaultQuery": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "extraHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ProviderTemplateList": {
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProviderTemplate"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        }
      },
      "ProviderTemplateVerifyResult": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonaServiceModel"
            }
          },
          "error": {
            "type": "string"
          }
        }
      },
      "PublicOwner": {
        "type": "object",
        "nullable": true,
        "required": [
          "slug",
          "displayName",
          "avatarUrl"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "avatarUrl": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PublicPersona": {
        "type": "object",
        "required": [
          "slug",
          "name",
          "description",
          "modelPrompt",
          "provider",
          "model",
          "avatarUrl",
          "voice",
          "character",
          "examples",
          "visibility",
          "createdAt",
          "owner"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "modelPrompt": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string",
            "nullable": true
          },
          "voice": {
            "type": "string",
            "nullable": true
          },
          "character": {
            "type": "string",
            "nullable": true
          },
          "examples": {
            "type": "string",
            "nullable": true
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "unlisted"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "owner": {
            "$ref": "#/components/schemas/PublicOwner"
          }
        }
      },
      "PersonaSheet": {
        "type": "object",
        "required": [
          "subjectType",
          "subjectId",
          "skin",
          "xp",
          "level",
          "levelTitle",
          "xpIntoLevel",
          "xpForNext",
          "tenureDays",
          "streakDays",
          "stats",
          "trend",
          "badges"
        ],
        "properties": {
          "subjectType": {
            "type": "string",
            "enum": [
              "persona"
            ]
          },
          "subjectId": {
            "type": "string"
          },
          "skin": {
            "type": "string"
          },
          "xp": {
            "type": "integer"
          },
          "level": {
            "type": "integer"
          },
          "levelTitle": {
            "type": "string",
            "nullable": true
          },
          "xpIntoLevel": {
            "type": "integer"
          },
          "xpForNext": {
            "type": "integer"
          },
          "tenureDays": {
            "type": "integer"
          },
          "streakDays": {
            "type": "integer"
          },
          "stats": {
            "type": "object",
            "required": [
              "adventures",
              "allies",
              "turns",
              "tokensOut",
              "avgLatencyMs",
              "daysActive"
            ],
            "properties": {
              "adventures": {
                "type": "integer"
              },
              "allies": {
                "type": "integer"
              },
              "turns": {
                "type": "integer"
              },
              "tokensOut": {
                "type": "integer"
              },
              "avgLatencyMs": {
                "type": "integer",
                "nullable": true
              },
              "daysActive": {
                "type": "integer"
              }
            }
          },
          "trend": {
            "type": "object",
            "required": [
              "adventures7d"
            ],
            "properties": {
              "adventures7d": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              }
            }
          },
          "badges": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "badgeId",
                "name",
                "description",
                "icon",
                "tier",
                "badgeLine",
                "awardedAt",
                "rarityPct"
              ],
              "properties": {
                "badgeId": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "icon": {
                  "type": "string"
                },
                "tier": {
                  "type": "string"
                },
                "badgeLine": {
                  "type": "string",
                  "nullable": true
                },
                "awardedAt": {
                  "type": "string"
                },
                "rarityPct": {
                  "type": "number",
                  "nullable": true
                }
              }
            }
          }
        }
      },
      "SubjectSheet": {
        "type": "object",
        "required": [
          "subjectType",
          "subjectId",
          "skin",
          "xp",
          "level",
          "levelTitle",
          "xpIntoLevel",
          "xpForNext",
          "tenureDays",
          "streakDays",
          "stats",
          "trend",
          "badges"
        ],
        "properties": {
          "subjectType": {
            "type": "string"
          },
          "subjectId": {
            "type": "string"
          },
          "skin": {
            "type": "string"
          },
          "xp": {
            "type": "integer"
          },
          "level": {
            "type": "integer"
          },
          "levelTitle": {
            "type": "string",
            "nullable": true
          },
          "xpIntoLevel": {
            "type": "integer"
          },
          "xpForNext": {
            "type": "integer"
          },
          "tenureDays": {
            "type": "integer"
          },
          "streakDays": {
            "type": "integer"
          },
          "stats": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "nullable": true
            }
          },
          "trend": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          },
          "badges": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "badgeId",
                "name",
                "description",
                "icon",
                "tier",
                "badgeLine",
                "awardedAt",
                "rarityPct"
              ],
              "properties": {
                "badgeId": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "icon": {
                  "type": "string"
                },
                "tier": {
                  "type": "string"
                },
                "badgeLine": {
                  "type": "string",
                  "nullable": true
                },
                "awardedAt": {
                  "type": "string"
                },
                "rarityPct": {
                  "type": "number",
                  "nullable": true
                }
              }
            }
          }
        }
      },
      "OrgSheet": {
        "type": "object",
        "required": [
          "subjectType",
          "subjectId",
          "name",
          "slug",
          "skin",
          "level",
          "levelTitle",
          "xp",
          "xpIntoLevel",
          "xpForNext",
          "memberCount",
          "stats"
        ],
        "properties": {
          "subjectType": {
            "type": "string",
            "enum": [
              "org"
            ]
          },
          "subjectId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "skin": {
            "type": "string"
          },
          "level": {
            "type": "integer"
          },
          "levelTitle": {
            "type": "string",
            "nullable": true
          },
          "xp": {
            "type": "integer"
          },
          "xpIntoLevel": {
            "type": "integer"
          },
          "xpForNext": {
            "type": "integer"
          },
          "memberCount": {
            "type": "integer"
          },
          "stats": {
            "type": "object",
            "required": [
              "personasPublished",
              "daysActive"
            ],
            "properties": {
              "personasPublished": {
                "type": "integer"
              },
              "daysActive": {
                "type": "integer"
              }
            }
          }
        }
      },
      "PersonaWeeklyRecap": {
        "type": "object",
        "required": [
          "weekStart",
          "adventures",
          "newAllies",
          "reflexesDeltaPct",
          "levelsGained"
        ],
        "properties": {
          "weekStart": {
            "type": "string"
          },
          "adventures": {
            "type": "integer"
          },
          "newAllies": {
            "type": "integer"
          },
          "reflexesDeltaPct": {
            "type": "number",
            "nullable": true
          },
          "levelsGained": {
            "type": "integer"
          }
        }
      },
      "GamificationLeague": {
        "type": "object",
        "required": [
          "statKey",
          "league",
          "entries"
        ],
        "properties": {
          "statKey": {
            "type": "string",
            "enum": [
              "adventures",
              "allies",
              "days_active"
            ]
          },
          "league": {
            "type": "integer",
            "description": "Zero-based league cohort (30 ranks each, by season standing)."
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GamificationBoardEntry"
            }
          }
        }
      },
      "PublicPersonaSummary": {
        "type": "object",
        "required": [
          "slug",
          "name",
          "description",
          "visibility",
          "createdAt",
          "owner"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "owner": {
            "$ref": "#/components/schemas/PublicOwner"
          }
        }
      },
      "PublicSocialLink": {
        "type": "object",
        "required": [
          "platform",
          "url",
          "handle"
        ],
        "properties": {
          "platform": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "handle": {
            "type": "string"
          }
        }
      },
      "PublicAddress": {
        "type": "object",
        "required": [
          "label",
          "line1",
          "line2",
          "city",
          "region",
          "postalCode",
          "country"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          }
        }
      },
      "PublicUserSearchHit": {
        "type": "object",
        "required": [
          "slug",
          "displayName",
          "avatarUrl"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "avatarUrl": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PublicUserProfile": {
        "type": "object",
        "required": [
          "slug",
          "displayName",
          "avatarUrl",
          "createdAt",
          "socialLinks",
          "emails",
          "phones",
          "addresses",
          "personas"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "avatarUrl": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "socialLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicSocialLink"
            }
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "phones": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicAddress"
            }
          },
          "personas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicPersonaSummary"
            }
          }
        }
      },
      "PublicPaperSummary": {
        "type": "object",
        "required": [
          "route",
          "title",
          "category",
          "tags",
          "updatedAt"
        ],
        "properties": {
          "route": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "PublicPaperSearchHit": {
        "type": "object",
        "required": [
          "id",
          "title",
          "kind",
          "publicRoute",
          "author",
          "category",
          "tags",
          "summary",
          "evaluation",
          "snippet",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "paper",
              "research"
            ],
            "description": "Document kind: 'paper' (ordinary) or 'research' (AI-ingested)."
          },
          "publicRoute": {
            "type": "string",
            "description": "Published route slug; link as /public/users/{author.slug}/papers/{publicRoute}."
          },
          "author": {
            "type": "object",
            "required": [
              "slug",
              "displayName"
            ],
            "properties": {
              "slug": {
                "type": "string"
              },
              "displayName": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "summary": {
            "type": "string",
            "nullable": true,
            "description": "Display summary read from the doc frontmatter (jsonb), or null."
          },
          "evaluation": {
            "type": "string",
            "nullable": true,
            "description": "Display evaluation read from the doc frontmatter (jsonb), or null."
          },
          "snippet": {
            "type": "string",
            "description": "~200-char match-context excerpt around the first q hit (head of content when q is empty/absent)."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "PublicPaper": {
        "type": "object",
        "required": [
          "route",
          "title",
          "category",
          "tags",
          "content",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "route": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "content": {
            "type": "string",
            "description": "Full raw markdown, byte-exact."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "RegistryIdentifier": {
        "type": "object",
        "required": [
          "rdid",
          "entityType",
          "entityId",
          "createdBy"
        ],
        "properties": {
          "rdid": {
            "type": "string",
            "description": "Reverse-domain identifier (e.g. com.acme.app)"
          },
          "entityType": {
            "type": "string",
            "description": "e.g. 'namespace', 'ecosystem', 'organization'"
          },
          "entityId": {
            "type": "string",
            "description": "The UUID the rdid resolves to"
          },
          "createdBy": {
            "type": "string",
            "nullable": true,
            "description": "Minter; null for system mappings"
          }
        }
      },
      "RegistryNamespace": {
        "type": "object",
        "required": [
          "id",
          "ownerKind",
          "ownerId",
          "slug",
          "name",
          "rdid"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ownerKind": {
            "type": "string",
            "enum": [
              "customer",
              "organization",
              "persona",
              "ecosystem"
            ]
          },
          "ownerId": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "rdid": {
            "type": "string",
            "nullable": true,
            "description": "The namespace reverse-domain prefix"
          }
        }
      },
      "RegistryNamespaceUpdate": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "RegistryOrganization": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 1000
          }
        }
      },
      "RegistryEcosystem": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "rdid"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "rdid": {
            "type": "string",
            "description": "Defaults to <namespace-prefix>.<slug>"
          }
        }
      },
      "RegistryProvisionedOrganization": {
        "type": "object",
        "required": [
          "organization",
          "namespace",
          "teamId",
          "ecosystem"
        ],
        "properties": {
          "organization": {
            "$ref": "#/components/schemas/RegistryOrganization"
          },
          "namespace": {
            "$ref": "#/components/schemas/RegistryNamespace"
          },
          "teamId": {
            "type": "string",
            "description": "The provisioned admin team id"
          },
          "ecosystem": {
            "$ref": "#/components/schemas/RegistryEcosystem"
          }
        }
      },
      "RegistryPersonaApproval": {
        "type": "object",
        "required": [
          "id",
          "personaId",
          "subjectKind",
          "subjectEco",
          "toolName",
          "args",
          "status",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "personaId": {
            "type": "string"
          },
          "subjectKind": {
            "type": "string",
            "enum": [
              "self",
              "user",
              "team",
              "org"
            ]
          },
          "subjectId": {
            "type": "string",
            "nullable": true,
            "description": "null for self/eco-scoped subjects"
          },
          "subjectEco": {
            "type": "string"
          },
          "toolName": {
            "type": "string",
            "description": "curated tool name, or the gateway tool 'adh_request'"
          },
          "args": {
            "type": "object",
            "additionalProperties": true,
            "description": "the frozen invocation payload"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected"
            ]
          },
          "requestedBy": {
            "type": "string",
            "nullable": true
          },
          "decidedBy": {
            "type": "string",
            "nullable": true,
            "description": "the human who decided (null until then)"
          },
          "decidedAt": {
            "type": "string",
            "nullable": true
          },
          "result": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "the outcome once an approved action runs (null until then)"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "RegistryPersonaToolGrant": {
        "type": "object",
        "required": [
          "toolName",
          "autonomous",
          "createdAt"
        ],
        "properties": {
          "toolName": {
            "type": "string"
          },
          "autonomous": {
            "type": "boolean",
            "description": "true = this grant skips the approval gate (except acting as self, which always gates)"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "RegistryPersonaToolCatalogItem": {
        "type": "object",
        "required": [
          "toolName",
          "source",
          "displayName",
          "description",
          "readOnly",
          "granted",
          "autonomous"
        ],
        "properties": {
          "toolName": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "nullable": true,
            "description": "null for curated internal tools; else the source id (e.g. \"web\", \"mcp.<server>\")"
          },
          "displayName": {
            "type": "string",
            "description": "human-readable label from the tool catalog (persona.tool_templates); falls back to toolName when no catalog row exists"
          },
          "description": {
            "type": "string",
            "description": "human-readable description from the tool catalog; '' when no catalog row exists"
          },
          "readOnly": {
            "type": "boolean"
          },
          "granted": {
            "type": "boolean",
            "description": "true iff this persona currently holds the tool"
          },
          "autonomous": {
            "type": "boolean",
            "description": "true = this grant skips the approval gate (except acting as self, which always gates); false when not granted"
          }
        }
      },
      "RegistryPersonaUserTool": {
        "type": "object",
        "required": [
          "toolName",
          "source",
          "displayName",
          "description",
          "readOnly",
          "allowed"
        ],
        "properties": {
          "toolName": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "nullable": true,
            "description": "null for curated internal tools; else the source id (e.g. \"web\", \"mcp.<server>\")"
          },
          "displayName": {
            "type": "string",
            "description": "human-readable label from the tool catalog (persona.tool_templates); falls back to toolName when no catalog row exists"
          },
          "description": {
            "type": "string",
            "description": "human-readable description from the tool catalog; '' when no catalog row exists"
          },
          "readOnly": {
            "type": "boolean"
          },
          "allowed": {
            "type": "boolean",
            "description": "true iff the calling user has allowed the persona to invoke this tool for them"
          }
        }
      },
      "RegistryUserActablePersona": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "RegistryPersonaMayAct": {
        "type": "object",
        "required": [
          "kinds"
        ],
        "properties": {
          "kinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "self",
                "user",
                "team",
                "org"
              ]
            },
            "description": "the subject kinds this persona may act for (always includes 'self')"
          }
        }
      },
      "RegistryPersonaToken": {
        "type": "object",
        "required": [
          "id",
          "name",
          "prefix",
          "createdAt",
          "expiresAt",
          "lastUsedAt",
          "personaId"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string",
            "description": "Non-secret leading chars, for display"
          },
          "createdAt": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "nullable": true
          },
          "lastUsedAt": {
            "type": "string",
            "nullable": true,
            "description": "null until the token first authenticates"
          },
          "personaId": {
            "type": "string",
            "nullable": true,
            "description": "The persona this token authenticates AS"
          }
        }
      },
      "RegistryPersonaTokenCreated": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RegistryPersonaToken"
          },
          {
            "type": "object",
            "required": [
              "token"
            ],
            "properties": {
              "token": {
                "type": "string",
                "description": "The raw token value — shown exactly once, on mint"
              }
            }
          }
        ]
      },
      "RegistryAgentMcpServer": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "url",
          "enabled",
          "hasAuthSecret",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "description": "The `<server>` segment in `mcp.<server>.<tool>`"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "The remote MCP server's http(s) endpoint URL"
          },
          "enabled": {
            "type": "boolean",
            "description": "Opt-in: a server contributes no tools until an operator enables it"
          },
          "hasAuthSecret": {
            "type": "boolean",
            "description": "true iff a per-server bearer secret is stored; the secret itself is NEVER returned"
          },
          "createdBy": {
            "type": "string",
            "nullable": true,
            "description": "The admin who registered it (null for system rows)"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "SearchDiscussionTopicResult": {
        "type": "object",
        "required": [
          "id",
          "title",
          "replyCount",
          "lastActivityAt",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "categoryId": {
            "type": "string",
            "nullable": true
          },
          "replyCount": {
            "type": "integer"
          },
          "lastActivityAt": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "SearchDiscussionPostResult": {
        "type": "object",
        "required": [
          "id",
          "topicId",
          "postNumber",
          "createdAt",
          "rank"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "topicId": {
            "type": "string"
          },
          "postNumber": {
            "type": "integer"
          },
          "bodyDocumentId": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "rank": {
            "type": "number",
            "description": "ts_rank relevance score"
          }
        }
      },
      "SearchDocumentResult": {
        "type": "object",
        "required": [
          "blockId",
          "documentId",
          "blockType",
          "position",
          "snippet",
          "rank"
        ],
        "properties": {
          "blockId": {
            "type": "string"
          },
          "documentId": {
            "type": "string"
          },
          "blockType": {
            "type": "string"
          },
          "position": {
            "type": "string"
          },
          "snippet": {
            "type": "string",
            "description": "Plain-text excerpt (ts_headline, no markup)"
          },
          "rank": {
            "type": "number",
            "description": "ts_rank relevance score"
          }
        }
      },
      "SearchNoteResult": {
        "type": "object",
        "required": [
          "id",
          "title",
          "content",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "FeedItem": {
        "type": "object",
        "required": [
          "id",
          "customerId",
          "ecosystemId",
          "source",
          "entityType",
          "action",
          "summary",
          "isRead",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "ecosystemId": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "entityId": {
            "type": "string",
            "nullable": true
          },
          "action": {
            "type": "string"
          },
          "actorId": {
            "type": "string",
            "nullable": true
          },
          "summary": {
            "type": "string"
          },
          "metadata": {
            "type": "string",
            "nullable": true
          },
          "isRead": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "FeedPage": {
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedItem"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        }
      },
      "FeedUnreadCount": {
        "type": "object",
        "required": [
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer"
          }
        }
      },
      "FeedReadAllResult": {
        "type": "object",
        "required": [
          "updated"
        ],
        "properties": {
          "updated": {
            "type": "integer"
          }
        }
      },
      "FeatureFlag": {
        "type": "object",
        "required": [
          "id",
          "key",
          "description",
          "enabled",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "key": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "ServerBag": {
        "type": "object",
        "required": [
          "key",
          "value",
          "description",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "description": "Arbitrary JSON value"
          },
          "description": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "AccessAuditEntry": {
        "type": "object",
        "required": [
          "id",
          "ownerKind",
          "ownerId",
          "actorKind",
          "actorId",
          "actorEmail",
          "action",
          "subjectKind",
          "subjectId",
          "targetFeature",
          "targetItemId",
          "roleId",
          "before",
          "after",
          "at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ownerKind": {
            "type": "string"
          },
          "ownerId": {
            "type": "string"
          },
          "actorKind": {
            "type": "string"
          },
          "actorId": {
            "type": "string"
          },
          "actorEmail": {
            "type": "string",
            "nullable": true
          },
          "action": {
            "type": "string"
          },
          "subjectKind": {
            "type": "string",
            "nullable": true
          },
          "subjectId": {
            "type": "string",
            "nullable": true
          },
          "targetFeature": {
            "type": "string",
            "nullable": true
          },
          "targetItemId": {
            "type": "string",
            "nullable": true
          },
          "roleId": {
            "type": "string",
            "nullable": true
          },
          "before": {
            "nullable": true,
            "description": "Pre-change state (action-shaped)"
          },
          "after": {
            "nullable": true,
            "description": "Post-change state (action-shaped)"
          },
          "at": {
            "type": "string"
          }
        }
      },
      "AccessAuditPage": {
        "type": "object",
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessAuditEntry"
            }
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer",
            "description": "Clamped 1..200"
          },
          "total": {
            "type": "integer",
            "description": "Saturates at a 10,000-row count cap"
          }
        }
      },
      "TeamMember": {
        "type": "object",
        "required": [
          "id",
          "teamId",
          "memberKind",
          "userId",
          "role",
          "addedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "memberKind": {
            "type": "string",
            "enum": [
              "customer",
              "persona"
            ],
            "description": "which principal userId names — 'customer' (customer.customers) or 'persona' (persona.personas). Present on every response: GET list rows, the add-persona 201, and the by-email add 201 (always a customer)."
          },
          "userId": {
            "type": "string",
            "description": "the member principal id — a customer id, or a persona id when memberKind is 'persona'"
          },
          "role": {
            "type": "string"
          },
          "addedAt": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "the member's email (resolved; null for a persona member or a foreign customer)"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "personaSlug": {
            "type": "string",
            "nullable": true,
            "description": "the persona's slug when memberKind is 'persona' (null for a customer member)"
          },
          "personaName": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "TeamMemberList": {
        "type": "object",
        "required": [
          "members"
        ],
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamMember"
            }
          }
        }
      },
      "TeamMemberCounts": {
        "type": "object",
        "required": [
          "counts"
        ],
        "properties": {
          "counts": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "teamId",
                "count"
              ],
              "properties": {
                "teamId": {
                  "type": "string"
                },
                "count": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "AccessGrant": {
        "type": "object",
        "required": [
          "feature",
          "itemVerbs",
          "subitemVerbs"
        ],
        "properties": {
          "feature": {
            "type": "string",
            "description": "a feature-area key, e.g. 'projects' | 'personas'"
          },
          "itemVerbs": {
            "type": "string",
            "description": "top-level item verbs, comma-letter subset of 'C,R,U,D,M' (M = manage access)"
          },
          "subitemVerbs": {
            "type": "string",
            "description": "sub-item verbs, subset of 'C,R,U,D'"
          }
        }
      },
      "AccessRole": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "description",
          "isSystem",
          "defaultFor",
          "grants"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "isSystem": {
            "type": "boolean"
          },
          "defaultFor": {
            "type": "string",
            "enum": [
              "",
              "customer",
              "persona"
            ],
            "description": "which member kind holds this role implicitly as the workspace default"
          },
          "grants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessGrant"
            }
          }
        }
      },
      "AccessRoleList": {
        "type": "object",
        "required": [
          "roles"
        ],
        "properties": {
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessRole"
            }
          }
        }
      },
      "AccessRoleEnvelope": {
        "type": "object",
        "required": [
          "role"
        ],
        "properties": {
          "role": {
            "$ref": "#/components/schemas/AccessRole"
          }
        }
      },
      "AccessAssignment": {
        "type": "object",
        "required": [
          "id",
          "subjectKind",
          "subjectId",
          "scopeFeature",
          "scopeItemId",
          "roleId"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "subjectKind": {
            "type": "string",
            "enum": [
              "customer",
              "persona",
              "team"
            ]
          },
          "subjectId": {
            "type": "string"
          },
          "scopeFeature": {
            "type": "string",
            "description": "'' = workspace-wide"
          },
          "scopeItemId": {
            "type": "string",
            "description": "'' = workspace-wide"
          },
          "roleId": {
            "type": "string"
          },
          "roleSlug": {
            "type": "string"
          },
          "roleName": {
            "type": "string"
          },
          "grantedBy": {
            "type": "string",
            "nullable": true
          },
          "grantedAt": {
            "type": "string"
          }
        }
      },
      "AccessAssignmentList": {
        "type": "object",
        "required": [
          "assignments"
        ],
        "properties": {
          "assignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessAssignment"
            }
          },
          "restricted": {
            "type": "boolean",
            "description": "present on item-scoped listings: whether the item is RESTRICTED"
          }
        }
      },
      "AccessAssignmentEnvelope": {
        "type": "object",
        "required": [
          "assignment"
        ],
        "properties": {
          "assignment": {
            "$ref": "#/components/schemas/AccessAssignment"
          }
        }
      },
      "AccessRestriction": {
        "type": "object",
        "required": [
          "restricted"
        ],
        "properties": {
          "restricted": {
            "type": "boolean"
          }
        }
      },
      "AccessEffective": {
        "type": "object",
        "required": [
          "itemVerbs",
          "subitemVerbs",
          "restricted",
          "decidedBy"
        ],
        "properties": {
          "itemVerbs": {
            "type": "string"
          },
          "subitemVerbs": {
            "type": "string"
          },
          "restricted": {
            "type": "boolean"
          },
          "decidedBy": {
            "type": "object",
            "additionalProperties": true,
            "description": "per-verb provenance (the explainer): verb → {kind: 'owner'|'admin-role'|'grant', roleSlug?, via?, scopeItemId?}; sub-item verbs keyed 'sub:<verb>'"
          }
        }
      },
      "StorageAttachment": {
        "type": "object",
        "required": [
          "id",
          "ecosystemId",
          "customerId",
          "ownerType",
          "objectKey",
          "storageKind",
          "filename",
          "contentType",
          "sizeBytes",
          "contentHash",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "ownerType": {
            "type": "string",
            "description": "e.g. 'standalone', 'chat_message', 'document'"
          },
          "ownerId": {
            "type": "string",
            "nullable": true,
            "description": "Polymorphic domain owner (NOT the tenant)."
          },
          "objectKey": {
            "type": "string",
            "description": "R2 object key the presigned URLs address."
          },
          "storageKind": {
            "type": "string",
            "description": "Backing store, e.g. 'r2'."
          },
          "filename": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer"
          },
          "contentHash": {
            "type": "string"
          },
          "width": {
            "type": "integer",
            "nullable": true
          },
          "height": {
            "type": "integer",
            "nullable": true
          },
          "durationMs": {
            "type": "integer",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "ready"
            ],
            "description": "'pending' (presigned, awaiting upload) → 'ready' (bytes confirmed)."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Caller-supplied JSON metadata (jsonb) — intentionally open."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "StoragePresignedUpload": {
        "type": "object",
        "required": [
          "attachment",
          "uploadUrl"
        ],
        "properties": {
          "attachment": {
            "$ref": "#/components/schemas/StorageAttachment"
          },
          "uploadUrl": {
            "type": "string",
            "format": "uri",
            "description": "Presigned PUT URL — upload the bytes directly to R2."
          }
        }
      },
      "StorageDeduplicated": {
        "type": "object",
        "required": [
          "attachment",
          "deduplicated"
        ],
        "properties": {
          "attachment": {
            "$ref": "#/components/schemas/StorageAttachment"
          },
          "deduplicated": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        }
      },
      "StorageQuotaExceeded": {
        "type": "object",
        "required": [
          "error",
          "used",
          "quota",
          "requested"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Error"
          },
          "used": {
            "type": "integer",
            "description": "Bytes currently used by ready attachments."
          },
          "quota": {
            "type": "integer",
            "description": "The caller’s total quota in bytes."
          },
          "requested": {
            "type": "integer",
            "description": "Declared size of the rejected upload."
          }
        }
      },
      "StorageAttachmentEnvelope": {
        "type": "object",
        "required": [
          "attachment"
        ],
        "properties": {
          "attachment": {
            "$ref": "#/components/schemas/StorageAttachment"
          }
        }
      },
      "StorageDownload": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Presigned GET URL — download the bytes directly from R2."
          }
        }
      },
      "SyncManifestEntry": {
        "type": "object",
        "required": [
          "resource",
          "schemaVersion"
        ],
        "properties": {
          "resource": {
            "type": "string"
          },
          "schemaVersion": {
            "type": "integer"
          }
        }
      },
      "SyncChange": {
        "type": "object",
        "required": [
          "resource",
          "id",
          "op",
          "syncVersion"
        ],
        "properties": {
          "resource": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "op": {
            "type": "string",
            "enum": [
              "upsert",
              "delete"
            ]
          },
          "syncVersion": {
            "type": "string",
            "description": "Server-assigned monotonic version (bigint as string)"
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Full row for upserts; absent for deletes"
          }
        }
      },
      "SyncPullResponse": {
        "type": "object",
        "required": [
          "manifest",
          "changes",
          "cursor",
          "hasMore"
        ],
        "properties": {
          "manifest": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SyncManifestEntry"
            }
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SyncChange"
            }
          },
          "cursor": {
            "type": "string",
            "description": "Opaque; echo back on the next pull"
          },
          "hasMore": {
            "type": "boolean"
          }
        }
      },
      "SyncPushOp": {
        "type": "object",
        "required": [
          "opId",
          "resource",
          "rowId",
          "type"
        ],
        "properties": {
          "opId": {
            "type": "string",
            "format": "uuid",
            "description": "Client-generated UUIDv7 idempotency key"
          },
          "resource": {
            "type": "string"
          },
          "rowId": {
            "type": "string",
            "format": "uuid",
            "description": "Client-generated row id (offline creation)"
          },
          "type": {
            "type": "string",
            "enum": [
              "upsert",
              "delete"
            ]
          },
          "baseVersion": {
            "type": "string",
            "description": "sync_version the client last saw; stale → conflict"
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "SyncPushRequest": {
        "type": "object",
        "required": [
          "deviceId",
          "ops"
        ],
        "properties": {
          "deviceId": {
            "type": "string"
          },
          "ops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SyncPushOp"
            },
            "minItems": 1,
            "maxItems": 500
          }
        }
      },
      "SyncPushResult": {
        "type": "object",
        "required": [
          "opId",
          "status"
        ],
        "properties": {
          "opId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "applied",
              "conflict",
              "rejected"
            ]
          },
          "reason": {
            "type": "string"
          },
          "current": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true
          },
          "newVersion": {
            "type": "string",
            "description": "Post-apply sync_version; present only on `applied` results that wrote a row (absent for an idempotent no-op delete). Clients SHOULD adopt it as the row's new baseVersion for subsequent staged edits."
          }
        }
      },
      "SyncPushResponse": {
        "type": "object",
        "required": [
          "results",
          "watermark"
        ],
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SyncPushResult"
            }
          },
          "watermark": {
            "type": "string"
          }
        }
      },
      "Theme": {
        "type": "object",
        "required": [
          "key",
          "label",
          "basedOn",
          "data",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "basedOn": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "UsageStorageQuota": {
        "type": "object",
        "required": [
          "quotaBytes",
          "usageBytes",
          "availableBytes"
        ],
        "properties": {
          "quotaBytes": {
            "type": "integer",
            "description": "Per-user quota in bytes (override or 5 GB default)"
          },
          "usageBytes": {
            "type": "integer",
            "description": "Live sum of ready, non-deleted attachment bytes"
          },
          "availableBytes": {
            "type": "integer",
            "description": "max(0, quotaBytes - usageBytes)"
          }
        }
      },
      "UsageStorageQuotaRow": {
        "type": "object",
        "required": [
          "userId",
          "ecosystemId",
          "quotaBytes",
          "updatedAt"
        ],
        "properties": {
          "userId": {
            "type": "string"
          },
          "ecosystemId": {
            "type": "string",
            "description": "Ecosystem id the override is scoped to"
          },
          "quotaBytes": {
            "type": "integer"
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "Workspace": {
        "type": "object",
        "required": [
          "slug",
          "name",
          "type"
        ],
        "properties": {
          "slug": {
            "type": "string",
            "description": "Routable workspace slug (caller-scoped)"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "individual",
              "organization",
              "team"
            ]
          }
        }
      },
      "WorkspaceMember": {
        "type": "object",
        "required": [
          "userId",
          "isAdmin",
          "addedAt"
        ],
        "properties": {
          "userId": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "isAdmin": {
            "type": "boolean",
            "description": "Admin of any of the org's teams (the roster's strongest role)"
          },
          "addedAt": {
            "type": "string",
            "description": "Earliest membership across the org's teams"
          }
        }
      }
    }
  },
  "paths": {
    "/health": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "Liveness probe",
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/system/version": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "Build / version info",
        "responses": {
          "200": {
            "description": "version"
          }
        }
      }
    },
    "/auth/register": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Create an account (email + password)",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "password",
                  "name"
                ],
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "token + refreshToken + user",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/AuthResult"
                    },
                    {
                      "type": "object",
                      "required": [
                        "emailVerificationRequired"
                      ],
                      "properties": {
                        "emailVerificationRequired": {
                          "type": "boolean"
                        },
                        "emailInUse": {
                          "type": "boolean"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/login": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Sign in (may require a second factor)",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "password"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "Email address"
                  },
                  "slug": {
                    "type": "string",
                    "description": "User id (login handle)"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Email, user id, or a verified phone number (E.164) — classified server-side"
                  },
                  "password": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "token + refreshToken + user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            }
          },
          "202": {
            "description": "second factor required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaChallenge"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/login/mfa/sms/send": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Send the SMS login code to the verified primary phone",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "MFA pending token"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "code sent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/login/mfa": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Complete login by satisfying the second factor → aal=2 session",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "method",
                  "code"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "MFA pending token"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "sms",
                      "totp",
                      "recovery"
                    ]
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 40
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "token + refreshToken + user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/login/mfa/webauthn/options": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "WebAuthn 2nd-factor: assertion options bound to the pending challenge",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "MFA pending token"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "options + next pending token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "options",
                    "token"
                  ],
                  "properties": {
                    "options": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "PublicKeyCredentialRequestOptionsJSON"
                    },
                    "token": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/login/mfa/webauthn": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "WebAuthn 2nd-factor: verify the assertion → aal=2 session",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "response"
                ],
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "response": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "AuthenticationResponseJSON"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "token + refreshToken + user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/login/webauthn/options": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Passwordless passkey: assertion options for an account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "identifier"
                ],
                "properties": {
                  "identifier": {
                    "type": "string",
                    "description": "Email or login slug"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "options + login challenge token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "options",
                    "token"
                  ],
                  "properties": {
                    "options": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "token": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/login/webauthn": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Passwordless passkey: verify the assertion → aal=2 session",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "response"
                ],
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "response": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "AuthenticationResponseJSON"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "token + refreshToken + user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/refresh": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Rotate refresh token → new JWT",
        "responses": {
          "200": {
            "description": "token + refreshToken",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefreshResult"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/revoke": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Sign out (revoke refresh token)",
        "responses": {
          "204": {
            "description": "revoked"
          }
        }
      }
    },
    "/auth/me": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "Current user",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "auth"
        ],
        "summary": "Update the caller's own profile (name, slug, avatar, public-profile toggle)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "At least one profile field is required.",
                "minProperties": 1,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9_-]{1,63}$"
                  },
                  "avatarUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 1024
                  },
                  "publicProfileEnabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "user (same shape as GET /auth/me)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/slug-available/{slug}": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "Check whether a login slug is available to the caller",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "availability",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "available"
                  ],
                  "properties": {
                    "available": {
                      "type": "boolean"
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "format",
                        "taken"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/revoke-all": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Revoke all sessions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "revoked"
          }
        }
      }
    },
    "/auth/change-password": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Change password (revokes sessions)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "currentPassword",
                  "newPassword"
                ],
                "properties": {
                  "currentPassword": {
                    "type": "string"
                  },
                  "newPassword": {
                    "type": "string",
                    "minLength": 8
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "changed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/tokens": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "List the caller’s API tokens (metadata only; raw values never returned)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "API tokens",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiToken"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Mint an API token (raw value shown once)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true
                  },
                  "scope": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "REST path prefixes the token may reach"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "API token + raw value (shown once)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTokenCreated"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/tokens/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "auth"
        ],
        "summary": "Revoke an API token",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "revoked"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/tokens/scopes": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "List available REST path-prefix scopes that may be assigned to an API token",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "scope prefixes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "prefixes"
                  ],
                  "properties": {
                    "prefixes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Distinct 2-segment path prefixes derived from the live OpenAPI spec (e.g. \"/content/markdown\")"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/applications/{appId}/tokens": {
      "parameters": [
        {
          "name": "appId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "ecosystem"
        ],
        "summary": "List an application’s API tokens (metadata only; raw values never returned)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "API tokens",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiToken"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Mint an API token for the application (raw value shown once)",
        "description": "The application must belong to the caller’s ecosystem (404 otherwise). Minting also grants the app CRUD on its ecosystem’s default bucket so the token works immediately.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "API token + raw value (shown once)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTokenCreated"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/applications/{appId}/tokens/{id}": {
      "parameters": [
        {
          "name": "appId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Revoke one of the application’s API tokens",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "revoked"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/move": {
      "post": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Move an ecosystem-scoped row (and its aggregate children) to another ecosystem (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "schema",
                  "table",
                  "id",
                  "target"
                ],
                "properties": {
                  "schema": {
                    "type": "string",
                    "description": "Postgres schema of the row’s table"
                  },
                  "table": {
                    "type": "string",
                    "description": "table name within the schema"
                  },
                  "id": {
                    "type": "string",
                    "description": "row id (uuid, or an rdid for rdid-addressed tables)"
                  },
                  "target": {
                    "type": "string",
                    "description": "destination ecosystem (uuid or rdid)"
                  },
                  "dryRun": {
                    "type": "boolean",
                    "description": "report what would move without writing"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Source/destination ecosystem + per-table moved counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schema": {
                      "type": "string"
                    },
                    "table": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "from": {
                      "type": "string"
                    },
                    "to": {
                      "type": "string"
                    },
                    "dryRun": {
                      "type": "boolean"
                    },
                    "moved": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/capabilities": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "List all capability grants, or one user via ?userId (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "capabilities"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/capabilities/grant": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Grant a capability to a user (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "capability"
                ],
                "properties": {
                  "userId": {
                    "type": "string"
                  },
                  "capability": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "granted"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/capabilities/revoke": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Revoke a capability from a user (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "capability"
                ],
                "properties": {
                  "userId": {
                    "type": "string"
                  },
                  "capability": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "revoked"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/clients": {
      "get": {
        "tags": [
          "oauth"
        ],
        "summary": "List OAuth clients (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OAuth clients",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "slug",
                      "name",
                      "allowedReturnOrigins",
                      "isInternal"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "allowedReturnOrigins": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "defaultEcosystemId": {
                        "type": "string",
                        "nullable": true
                      },
                      "isInternal": {
                        "type": "boolean"
                      },
                      "appTokenPrefix": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "oauth"
        ],
        "summary": "Create an OAuth client + issue its app token (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "slug",
                  "name",
                  "defaultEcosystemId"
                ],
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "allowedReturnOrigins": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "defaultEcosystemId": {
                    "type": "string"
                  },
                  "jwtAudience": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Client + one-time app token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "client"
                  ],
                  "properties": {
                    "client": {
                      "type": "object",
                      "required": [
                        "id",
                        "slug",
                        "name",
                        "allowedReturnOrigins",
                        "isInternal"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "allowedReturnOrigins": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "defaultEcosystemId": {
                          "type": "string",
                          "nullable": true
                        },
                        "isInternal": {
                          "type": "boolean"
                        },
                        "appTokenPrefix": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    },
                    "appToken": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/clients/{slug}": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "oauth"
        ],
        "summary": "Get a client + its linked providers (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Client + linked providers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "client",
                    "providers"
                  ],
                  "properties": {
                    "client": {
                      "type": "object",
                      "required": [
                        "id",
                        "slug",
                        "name",
                        "allowedReturnOrigins",
                        "isInternal"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "allowedReturnOrigins": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "defaultEcosystemId": {
                          "type": "string",
                          "nullable": true
                        },
                        "isInternal": {
                          "type": "boolean"
                        },
                        "appTokenPrefix": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    },
                    "providers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "slug",
                          "name",
                          "authType"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "authType": {
                            "type": "string",
                            "enum": [
                              "oauth2_code",
                              "oauth2_access_token",
                              "oidc_id_token"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "oauth"
        ],
        "summary": "Update a client (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "slug",
                  "name",
                  "defaultEcosystemId"
                ],
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "allowedReturnOrigins": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "defaultEcosystemId": {
                    "type": "string"
                  },
                  "jwtAudience": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Client",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "allowedReturnOrigins",
                    "isInternal"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "allowedReturnOrigins": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultEcosystemId": {
                      "type": "string",
                      "nullable": true
                    },
                    "isInternal": {
                      "type": "boolean"
                    },
                    "appTokenPrefix": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "oauth"
        ],
        "summary": "Delete a client (admin; internal clients are protected)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/clients/{slug}/rotate-token": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "oauth"
        ],
        "summary": "Rotate a client app token (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "One-time app token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "appToken",
                    "appTokenPrefix"
                  ],
                  "properties": {
                    "appToken": {
                      "type": "string"
                    },
                    "appTokenPrefix": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/clients/{slug}/providers/{providerSlug}": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "providerSlug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "oauth"
        ],
        "summary": "Link a provider to a client, optional per-client credential override (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clientIdOverride": {
                    "type": "string",
                    "nullable": true
                  },
                  "clientSecretOverride": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Provider linked to client",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "clientSlug",
                    "providerSlug",
                    "hasOverrides"
                  ],
                  "properties": {
                    "clientSlug": {
                      "type": "string"
                    },
                    "providerSlug": {
                      "type": "string"
                    },
                    "hasOverrides": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "oauth"
        ],
        "summary": "Unlink a provider from a client (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "unlinked"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/provider-templates": {
      "get": {
        "tags": [
          "oauth"
        ],
        "summary": "Built-in provider templates (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Built-in provider templates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "templates"
                  ],
                  "properties": {
                    "templates": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "required": [
                          "slug",
                          "name",
                          "authType"
                        ],
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "authType": {
                            "type": "string",
                            "enum": [
                              "oauth2_code",
                              "oauth2_access_token",
                              "oidc_id_token"
                            ]
                          },
                          "authorizeUrl": {
                            "type": "string",
                            "nullable": true
                          },
                          "tokenUrl": {
                            "type": "string",
                            "nullable": true
                          },
                          "userinfoUrl": {
                            "type": "string",
                            "nullable": true
                          },
                          "defaultScopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "identityMapping": {
                            "type": "object",
                            "properties": {
                              "subjectField": {
                                "type": "string"
                              },
                              "emailField": {
                                "type": "string"
                              },
                              "nameField": {
                                "type": "string"
                              },
                              "avatarField": {
                                "type": "string"
                              },
                              "verificationUrl": {
                                "type": "string"
                              },
                              "jwksUrl": {
                                "type": "string"
                              },
                              "requireEmailVerified": {
                                "type": "boolean"
                              },
                              "allowedAudiences": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "secondaryEmailUrl": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/providers": {
      "get": {
        "tags": [
          "oauth"
        ],
        "summary": "List OAuth providers (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OAuth providers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "slug",
                      "name",
                      "authType",
                      "clientId",
                      "scopes",
                      "identityMapping"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "authType": {
                        "type": "string",
                        "enum": [
                          "oauth2_code",
                          "oauth2_access_token",
                          "oidc_id_token"
                        ]
                      },
                      "authorizeUrl": {
                        "type": "string",
                        "nullable": true
                      },
                      "tokenUrl": {
                        "type": "string",
                        "nullable": true
                      },
                      "userinfoUrl": {
                        "type": "string",
                        "nullable": true
                      },
                      "clientId": {
                        "type": "string"
                      },
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "identityMapping": {
                        "type": "object",
                        "properties": {
                          "subjectField": {
                            "type": "string"
                          },
                          "emailField": {
                            "type": "string"
                          },
                          "nameField": {
                            "type": "string"
                          },
                          "avatarField": {
                            "type": "string"
                          },
                          "verificationUrl": {
                            "type": "string"
                          },
                          "jwksUrl": {
                            "type": "string"
                          },
                          "requireEmailVerified": {
                            "type": "boolean"
                          },
                          "allowedAudiences": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "secondaryEmailUrl": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "oauth"
        ],
        "summary": "Create a provider from a template or full spec (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "clientId",
                  "clientSecret"
                ],
                "properties": {
                  "templateSlug": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "clientId": {
                    "type": "string"
                  },
                  "clientSecret": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "authorizeUrl": {
                    "type": "string",
                    "nullable": true
                  },
                  "tokenUrl": {
                    "type": "string",
                    "nullable": true
                  },
                  "userinfoUrl": {
                    "type": "string",
                    "nullable": true
                  },
                  "authType": {
                    "type": "string",
                    "enum": [
                      "oauth2_code",
                      "oauth2_access_token",
                      "oidc_id_token"
                    ]
                  },
                  "identityMapping": {
                    "type": "object",
                    "required": [
                      "subjectField",
                      "emailField",
                      "nameField",
                      "avatarField"
                    ],
                    "properties": {
                      "subjectField": {
                        "type": "string"
                      },
                      "emailField": {
                        "type": "string"
                      },
                      "nameField": {
                        "type": "string"
                      },
                      "avatarField": {
                        "type": "string"
                      },
                      "verificationUrl": {
                        "type": "string"
                      },
                      "requireEmailVerified": {
                        "type": "boolean"
                      },
                      "allowedAudiences": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "secondaryEmailUrl": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Provider",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "authType",
                    "clientId",
                    "scopes",
                    "identityMapping"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "authType": {
                      "type": "string",
                      "enum": [
                        "oauth2_code",
                        "oauth2_access_token",
                        "oidc_id_token"
                      ]
                    },
                    "authorizeUrl": {
                      "type": "string",
                      "nullable": true
                    },
                    "tokenUrl": {
                      "type": "string",
                      "nullable": true
                    },
                    "userinfoUrl": {
                      "type": "string",
                      "nullable": true
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "identityMapping": {
                      "type": "object",
                      "properties": {
                        "subjectField": {
                          "type": "string"
                        },
                        "emailField": {
                          "type": "string"
                        },
                        "nameField": {
                          "type": "string"
                        },
                        "avatarField": {
                          "type": "string"
                        },
                        "verificationUrl": {
                          "type": "string"
                        },
                        "jwksUrl": {
                          "type": "string"
                        },
                        "requireEmailVerified": {
                          "type": "boolean"
                        },
                        "allowedAudiences": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "secondaryEmailUrl": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/providers/{slug}": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "oauth"
        ],
        "summary": "Get a provider (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Provider",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "authType",
                    "clientId",
                    "scopes",
                    "identityMapping"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "authType": {
                      "type": "string",
                      "enum": [
                        "oauth2_code",
                        "oauth2_access_token",
                        "oidc_id_token"
                      ]
                    },
                    "authorizeUrl": {
                      "type": "string",
                      "nullable": true
                    },
                    "tokenUrl": {
                      "type": "string",
                      "nullable": true
                    },
                    "userinfoUrl": {
                      "type": "string",
                      "nullable": true
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "identityMapping": {
                      "type": "object",
                      "properties": {
                        "subjectField": {
                          "type": "string"
                        },
                        "emailField": {
                          "type": "string"
                        },
                        "nameField": {
                          "type": "string"
                        },
                        "avatarField": {
                          "type": "string"
                        },
                        "verificationUrl": {
                          "type": "string"
                        },
                        "jwksUrl": {
                          "type": "string"
                        },
                        "requireEmailVerified": {
                          "type": "boolean"
                        },
                        "allowedAudiences": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "secondaryEmailUrl": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "oauth"
        ],
        "summary": "Update a provider (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "clientId": {
                    "type": "string"
                  },
                  "clientSecret": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "authorizeUrl": {
                    "type": "string",
                    "nullable": true
                  },
                  "tokenUrl": {
                    "type": "string",
                    "nullable": true
                  },
                  "userinfoUrl": {
                    "type": "string",
                    "nullable": true
                  },
                  "identityMapping": {
                    "type": "object",
                    "required": [
                      "subjectField",
                      "emailField",
                      "nameField",
                      "avatarField"
                    ],
                    "properties": {
                      "subjectField": {
                        "type": "string"
                      },
                      "emailField": {
                        "type": "string"
                      },
                      "nameField": {
                        "type": "string"
                      },
                      "avatarField": {
                        "type": "string"
                      },
                      "verificationUrl": {
                        "type": "string"
                      },
                      "requireEmailVerified": {
                        "type": "boolean"
                      },
                      "allowedAudiences": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "secondaryEmailUrl": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Provider",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "authType",
                    "clientId",
                    "scopes",
                    "identityMapping"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "authType": {
                      "type": "string",
                      "enum": [
                        "oauth2_code",
                        "oauth2_access_token",
                        "oidc_id_token"
                      ]
                    },
                    "authorizeUrl": {
                      "type": "string",
                      "nullable": true
                    },
                    "tokenUrl": {
                      "type": "string",
                      "nullable": true
                    },
                    "userinfoUrl": {
                      "type": "string",
                      "nullable": true
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "identityMapping": {
                      "type": "object",
                      "properties": {
                        "subjectField": {
                          "type": "string"
                        },
                        "emailField": {
                          "type": "string"
                        },
                        "nameField": {
                          "type": "string"
                        },
                        "avatarField": {
                          "type": "string"
                        },
                        "verificationUrl": {
                          "type": "string"
                        },
                        "jwksUrl": {
                          "type": "string"
                        },
                        "requireEmailVerified": {
                          "type": "boolean"
                        },
                        "allowedAudiences": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "secondaryEmailUrl": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "oauth"
        ],
        "summary": "Delete a provider (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/signin/providers": {
      "get": {
        "tags": [
          "oauth"
        ],
        "summary": "OAuth providers available for a client",
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "providers"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/signin/complete": {
      "post": {
        "tags": [
          "oauth"
        ],
        "summary": "Complete an OAuth sign-in (SPA flow) → token + refreshToken + user",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "clientSlug",
                  "providerSlug"
                ],
                "properties": {
                  "clientSlug": {
                    "type": "string"
                  },
                  "providerSlug": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "accessToken": {
                    "type": "string"
                  },
                  "idToken": {
                    "type": "string"
                  },
                  "redirectUri": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "token + refreshToken + user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/signin/start": {
      "get": {
        "tags": [
          "oauth"
        ],
        "summary": "Begin the server redirect flow → 302 to the provider",
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "providerId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "return",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "redirect to provider"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/signin/callback": {
      "get": {
        "tags": [
          "oauth"
        ],
        "summary": "Provider redirect target → 302 back with a single-use exchange code",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "redirect to returnUrl with code"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/signin/exchange": {
      "post": {
        "tags": [
          "oauth"
        ],
        "summary": "Trade a single-use exchange code → token + refreshToken + user",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "token + refreshToken + user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/signin/authorize": {
      "get": {
        "tags": [
          "oauth"
        ],
        "summary": "Central SSO authorize — silent re-login from the central session, else → central login",
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "return",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "redirect to returnUrl with a fresh exchange code, or to the central login page"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/signin/login": {
      "post": {
        "tags": [
          "oauth"
        ],
        "summary": "Central credential login → sets the SSO session, returns the brand redirect URL",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "clientId",
                  "return",
                  "password"
                ],
                "properties": {
                  "clientId": {
                    "type": "string"
                  },
                  "return": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "identifier": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "SSO session established; navigate the browser to redirectUrl",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "redirectUrl"
                  ],
                  "properties": {
                    "redirectUrl": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/signin/logout": {
      "get": {
        "tags": [
          "oauth"
        ],
        "summary": "Central single-logout (browser) — revoke + clear the SSO cookie, then 302 back",
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "return",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "logged out (no return requested)"
          },
          "302": {
            "description": "redirect to the validated return (when clientId + return are given)"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "oauth"
        ],
        "summary": "Central logout (programmatic, no redirect)",
        "responses": {
          "204": {
            "description": "logged out"
          }
        }
      }
    },
    "/processing/run": {
      "post": {
        "tags": [
          "processing"
        ],
        "summary": "Run an AI action on demand for a saved target",
        "description": "Loads the saved target server-side and enqueues a high-priority (interactive) job. Idempotent per content version via the dedup key. Returns 202 with the job id.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "targetKind",
                  "targetId"
                ],
                "properties": {
                  "targetKind": {
                    "type": "string",
                    "description": "Saved entity kind, e.g. 'content.markdown'"
                  },
                  "targetId": {
                    "type": "string",
                    "description": "Row id of the saved entity"
                  },
                  "jobType": {
                    "type": "string",
                    "description": "Optional; defaults to the registered job for the targetKind"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Job enqueued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "jobId",
                    "deduped"
                  ],
                  "properties": {
                    "jobId": {
                      "type": "string"
                    },
                    "deduped": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/jobs/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "processing"
        ],
        "summary": "Read a single job (poll for completion)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Job status + result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "status"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "claimed",
                        "succeeded",
                        "dead"
                      ]
                    },
                    "result": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/jobs/{id}/stream": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "processing"
        ],
        "summary": "Server-sent completion stream for a job",
        "description": "Opens an SSE stream that emits one `job` event ({ id, status, result }) when the job reaches a terminal state, then closes. Emits immediately if already terminal. Closes after 60s with no event if still running (client should fall back to polling).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "text/event-stream of job events"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/jobs/claim": {
      "post": {
        "tags": [
          "processing"
        ],
        "summary": "Claim queued jobs (worker pull)",
        "description": "Atomically claim up to `batch` queued jobs for this worker. Returns an empty array when no jobs are available — never blocks. Ecosystem-scoped via RLS to the caller's api-token.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jobTypes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Filter to specific job types; absent = any type"
                  },
                  "minPriority": {
                    "type": "integer",
                    "description": "Claim only jobs with priority >= this value (interactive lane = 100)"
                  },
                  "batch": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "Max jobs to claim (default 1)"
                  },
                  "leaseMs": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "Lease duration in ms (default 30 000)"
                  },
                  "workerId": {
                    "type": "string",
                    "description": "Label for the claimed rows; defaults to api-token name or userId"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Claimed jobs (may be empty)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "jobs"
                  ],
                  "properties": {
                    "jobs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AiProcessingClaimedJob"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/jobs/{id}/heartbeat": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "processing"
        ],
        "summary": "Extend the lease on a claimed job",
        "description": "Workers call this periodically while processing a slow job to prevent the reaper from reclaiming it. Returns 404 when the lease guard fails.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "leaseToken"
                ],
                "properties": {
                  "leaseToken": {
                    "type": "string",
                    "description": "Opaque lease token returned by /claim"
                  },
                  "leaseMs": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "New lease duration in ms (default 30 000)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Extended lease expiry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "leaseExpiresAt"
                  ],
                  "properties": {
                    "leaseExpiresAt": {
                      "type": "string",
                      "description": "New lease expiry timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/jobs/{id}/complete": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "processing"
        ],
        "summary": "Mark a claimed job succeeded",
        "description": "Stores the result jsonb and transitions the job to succeeded. Returns 404 when the lease guard fails (wrong token, wrong ecosystem, or already finished).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "leaseToken",
                  "result"
                ],
                "properties": {
                  "leaseToken": {
                    "type": "string",
                    "description": "Opaque lease token returned by /claim"
                  },
                  "result": {
                    "description": "Arbitrary result jsonb"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Job marked succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/jobs/{id}/fail": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "processing"
        ],
        "summary": "Record a job failure",
        "description": "Records an error and either re-queues the job with exponential backoff (when retry:true and attempts remain) or moves it to dead. Returns 404 when the lease guard fails.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "leaseToken",
                  "error"
                ],
                "properties": {
                  "leaseToken": {
                    "type": "string",
                    "description": "Opaque lease token returned by /claim"
                  },
                  "error": {
                    "type": "string",
                    "description": "Human-readable error stored as last_error"
                  },
                  "retry": {
                    "type": "boolean",
                    "description": "Re-queue if attempts remain (default true)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Failure recorded; retry info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "willRetry"
                  ],
                  "properties": {
                    "willRetry": {
                      "type": "boolean",
                      "description": "True when the job was re-queued"
                    },
                    "runAt": {
                      "type": "string",
                      "nullable": true,
                      "description": "Scheduled re-run timestamp (null when dead)"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/jobs": {
      "post": {
        "tags": [
          "processing"
        ],
        "summary": "Enqueue an ad-hoc job (management)",
        "description": "Ad-hoc / explicit enqueue path (task family 3). Requires a user JWT. The caller's ecosystemId becomes the owning ecosystem. Returns { id, deduped }.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jobType",
                  "targetKind",
                  "targetId",
                  "payload"
                ],
                "properties": {
                  "jobType": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Discriminator for worker routing (e.g. categorize_and_tag)"
                  },
                  "targetKind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Namespace of the target entity (e.g. content.markdown)"
                  },
                  "targetId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "UUID of the target entity"
                  },
                  "payload": {
                    "description": "Arbitrary job-specific input stored as jsonb"
                  },
                  "priority": {
                    "type": "integer",
                    "description": "Higher value = claimed first; defaults to 0"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Job enqueued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "deduped"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "ID of the enqueued (or existing deduped) job"
                    },
                    "deduped": {
                      "type": "boolean",
                      "description": "True when an existing job with the same dedupKey was returned"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "processing"
        ],
        "summary": "List ecosystem jobs (management)",
        "description": "List the caller's ecosystem jobs, newest first. Requires a user JWT. Optional ?status= filter and ?limit= cap (default 50, max 200).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "claimed",
                "succeeded",
                "dead"
              ]
            },
            "description": "Filter to a specific job lifecycle status; absent = all statuses"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Max rows to return; default 50, capped at 200"
          }
        ],
        "responses": {
          "200": {
            "description": "Ecosystem jobs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "jobs"
                  ],
                  "properties": {
                    "jobs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AiProcessingJob"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/webhooks": {
      "post": {
        "tags": [
          "processing"
        ],
        "summary": "Register a webhook endpoint",
        "description": "Register a new outbound webhook target. The signing secret (`secret`) is returned exactly once in the response — store it; it cannot be retrieved again. The URL must be https:// and resolve to a publicly routable address (SSRF guard).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "eventTypes"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "HTTPS delivery target. Private/loopback/link-local URLs are rejected."
                  },
                  "eventTypes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Event types to subscribe to (e.g. [\"job.succeeded\", \"job.failed\"])"
                  },
                  "description": {
                    "type": "string",
                    "description": "Optional human-readable label"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Webhook endpoint created (secret shown once)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiProcessingWebhookEndpointCreated"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "processing"
        ],
        "summary": "List webhook endpoints (secret redacted)",
        "description": "List active (non-deleted) webhook endpoints for the caller's ecosystem. The `secret` field is never included in list responses.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "endpoints"
                  ],
                  "properties": {
                    "endpoints": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AiProcessingWebhookEndpoint"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/webhooks/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "patch": {
        "tags": [
          "processing"
        ],
        "summary": "Update a webhook endpoint (active / eventTypes)",
        "description": "Toggle `active` or replace `eventTypes`. The URL and secret are immutable after creation. Returns 404 when not found or owned by another ecosystem.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "properties": {
                  "active": {
                    "type": "boolean",
                    "description": "Enable or disable delivery"
                  },
                  "eventTypes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Replace the subscribed event-type list"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated endpoint (secret redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiProcessingWebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "processing"
        ],
        "summary": "Soft-delete a webhook endpoint",
        "description": "Marks the endpoint as deleted (sets `deleted_at`). The row is preserved for audit but hidden from future list results and excluded from deliveries. Returns 404 when not found, already deleted, or owned by another ecosystem.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Endpoint soft-deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/webhooks/{id}/deliveries": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "processing"
        ],
        "summary": "List delivery attempts for a webhook endpoint",
        "description": "Returns up to 200 delivery-attempt rows for the endpoint, newest first. Returns 404 when the endpoint is not found, soft-deleted, or belongs to another ecosystem.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Delivery attempts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "deliveries"
                  ],
                  "properties": {
                    "deliveries": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AiProcessingWebhookDelivery"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/applications/{appId}/schema-grants": {
      "parameters": [
        {
          "name": "appId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Get an application’s schema permissions (per bucket + per table CRUD)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The application’s schema grants",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "grants"
                  ],
                  "properties": {
                    "grants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "schemaId",
                          "crud",
                          "tables"
                        ],
                        "properties": {
                          "schemaId": {
                            "type": "string",
                            "description": "the bucket id the grant is for"
                          },
                          "crud": {
                            "type": "string",
                            "pattern": "^$|^[CRUD](,[CRUD])*$"
                          },
                          "tables": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "tableId",
                                "crud"
                              ],
                              "properties": {
                                "tableId": {
                                  "type": "string"
                                },
                                "crud": {
                                  "type": "string",
                                  "pattern": "^$|^[CRUD](,[CRUD])*$"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Reconcile an application’s schema permissions",
        "description": "Persists the app’s grants as per-app bucket access-groups. Buckets must belong to the app’s ecosystem (404 otherwise); each table must belong to its bucket.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "grants"
                ],
                "properties": {
                  "grants": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "schemaId",
                        "crud",
                        "tables"
                      ],
                      "properties": {
                        "schemaId": {
                          "type": "string",
                          "description": "the bucket id the grant is for"
                        },
                        "crud": {
                          "type": "string",
                          "pattern": "^$|^[CRUD](,[CRUD])*$"
                        },
                        "tables": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "tableId",
                              "crud"
                            ],
                            "properties": {
                              "tableId": {
                                "type": "string"
                              },
                              "crud": {
                                "type": "string",
                                "pattern": "^$|^[CRUD](,[CRUD])*$"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "reconciled"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tokens": {
      "get": {
        "tags": [
          "tokens"
        ],
        "summary": "List the caller’s token principals (metadata only; secret never returned)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to tokens bound to this ecosystem (rdid or uuid; must be manageable by the caller) — the per-product Tokens view"
          },
          {
            "name": "workspace",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Scope every op to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own tokens. Unknown/foreign slug: 404."
          }
        ],
        "responses": {
          "200": {
            "description": "Token principals",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TokenPrincipal"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "tokens"
        ],
        "summary": "Mint a token principal (raw `adh_…` secret shown once)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "workspace",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Scope every op to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own tokens. Unknown/foreign slug: 404."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true
                  },
                  "ecosystemId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "The ecosystem (rdid or uuid; must be manageable by the caller) the token — and its isolated bucket — binds to. Omitted: the owner’s own ecosystem."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Token principal + raw secret (shown once)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenPrincipalCreated"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tokens/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "tokens"
        ],
        "summary": "Revoke a token principal (also tears down its bucket)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "workspace",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Scope every op to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own tokens. Unknown/foreign slug: 404."
          }
        ],
        "responses": {
          "204": {
            "description": "revoked"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integrations": {
      "get": {
        "tags": [
          "integrations"
        ],
        "summary": "List a target ecosystem's connections (secrets redacted)",
        "description": "Returns every integration connection OWNED by the target ecosystem `ecosystemId` (the caller must manage it). Secret columns are never included. 400 when `ecosystemId` is omitted; 404/403 when the ecosystem is unknown / not the caller's.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connections",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "connections"
                  ],
                  "properties": {
                    "connections": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IntegrationConnection"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/providers": {
      "get": {
        "tags": [
          "integrations"
        ],
        "summary": "List the provider catalog",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Provider catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "providers"
                  ],
                  "properties": {
                    "providers": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IntegrationProvider"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/providers/{providerId}/auth-url": {
      "parameters": [
        {
          "name": "providerId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "integrations"
        ],
        "summary": "Get the OAuth authorize URL for a provider",
        "description": "Only valid for oauth providers (400 otherwise). 404 for an unknown provider. The authorize URL uses the target ecosystem `ecosystemId`'s client id; the caller must manage it (400 when omitted; 404/403 when unknown / not the caller's).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirectUri",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serviceType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scopes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorize URL + round-trip state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "url",
                    "state"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/providers/{providerId}/link-token": {
      "parameters": [
        {
          "name": "providerId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "integrations"
        ],
        "summary": "Mint a Plaid Link token",
        "description": "Only valid for plaid_link providers (400 otherwise). 404 for an unknown provider. The link token is minted for the target ecosystem `ecosystemId`; the caller must manage it (404/403 when unknown / not the caller's).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ecosystemId"
                ],
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "description": "Target ecosystem id (the caller must manage it)"
                  },
                  "serviceType": {
                    "type": "string",
                    "description": "Defaults to the provider primary service type"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Plaid link token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "linkToken"
                  ],
                  "properties": {
                    "linkToken": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/providers/{providerId}/register-instance": {
      "parameters": [
        {
          "name": "providerId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "integrations"
        ],
        "summary": "Register a self-hosted OAuth instance (Mastodon)",
        "description": "Only valid for oauth_instance providers (400 otherwise). 404 for an unknown provider. The instance is registered under the target ecosystem `ecosystemId`; the caller must manage it (404/403 when unknown / not the caller's).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ecosystemId",
                  "instanceUrl",
                  "redirectUri"
                ],
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "description": "Target ecosystem id (the caller must manage it)"
                  },
                  "instanceUrl": {
                    "type": "string"
                  },
                  "redirectUri": {
                    "type": "string"
                  },
                  "serviceType": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Instance registration → authorize URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "state",
                    "authorizeUrl",
                    "clientId"
                  ],
                  "properties": {
                    "state": {
                      "type": "string"
                    },
                    "authorizeUrl": {
                      "type": "string"
                    },
                    "clientId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/connect": {
      "post": {
        "tags": [
          "integrations"
        ],
        "summary": "Connect an integration (polymorphic by auth method)",
        "description": "Finishes any auth method's connect flow and persists the connection under the target ecosystem `ecosystemId` the client names; the caller must manage it (404/403 otherwise). Returns the redacted connection (tokens never echoed).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrationConnectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Connected (redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationConnection"
                }
              }
            }
          },
          "400": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/{connectionId}": {
      "parameters": [
        {
          "name": "connectionId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "integrations"
        ],
        "summary": "Disconnect a connection (ecosystem-authorized)",
        "description": "Soft-deletes the connection and tombstones every synced-data row it produced. The owning ecosystem is derived from the connection; the caller must manage it. 404 when the connection is absent/deleted; 403 when the caller cannot manage its ecosystem.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/{connectionId}/sync": {
      "parameters": [
        {
          "name": "connectionId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "integrations"
        ],
        "summary": "Trigger an immediate sync (sync now)",
        "description": "Runs the connection's worker once, independent of the background scheduler. The owning ecosystem is derived from the connection; the caller must manage it. 404 when absent/deleted; 403 when the caller cannot manage its ecosystem; 503 when no worker is registered for its provider:serviceType (retryable once a worker ships).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "202": {
            "description": "Sync dispatched",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/{connectionId}/actions/{actionType}": {
      "parameters": [
        {
          "name": "connectionId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "actionType",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "integrations"
        ],
        "summary": "Act as the user (outbound action)",
        "description": "Performs one outbound action (e.g. send an email, post a status) as the connection, and records exactly one action-log row. The provider is derived from the connection (never in the URL). 404 when not the caller's; 422 when no action handler is registered for its provider:actionType; 400 on an unknown actionType or invalid body. An optional `Idempotency-Key` header makes a repeat collapse onto the first row (no re-perform).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional client key; a repeat returns the first recorded result."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrationActionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action recorded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationActionResult"
                }
              }
            }
          },
          "400": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/{connectionId}/settings": {
      "parameters": [
        {
          "name": "connectionId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "patch": {
        "tags": [
          "integrations"
        ],
        "summary": "Update per-connection sync settings",
        "description": "Ecosystem-authorized, validated write of the caller-tunable sync settings the sync worker reads (e.g. gmailLabelIds / gmailWindowDays / redditSubreddits / redditKeywords). The owning ecosystem is derived from the connection; the caller must manage it. 404 when absent/deleted; 403 when the caller cannot manage its ecosystem; 400 on an invalid body.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "gmailLabelIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Gmail label ids to sync (default INBOX)."
                  },
                  "gmailWindowDays": {
                    "type": "integer",
                    "description": "Days of history to sync (default 30, max 366)."
                  },
                  "redditSubreddits": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Subreddits to watch (name or r/name; max 50)."
                  },
                  "redditKeywords": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Keywords to match within watched subreddits (max 50)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated sync settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "syncSettings"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "syncSettings": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/ecosystems/{ecosystemId}/provider-configs": {
      "parameters": [
        {
          "name": "ecosystemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "integrations"
        ],
        "summary": "List an ecosystem's provider configs (secrets masked)",
        "description": "Every stored provider config for the ecosystem, secrets masked to `hasSecret`. The ecosystemId must be the caller's own ecosystem (403 otherwise).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Masked provider configs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "configs"
                  ],
                  "properties": {
                    "configs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IntegrationProviderConfig"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/ecosystems/{ecosystemId}/provider-configs/{providerId}": {
      "parameters": [
        {
          "name": "ecosystemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "providerId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "integrations"
        ],
        "summary": "Get one of an ecosystem's provider configs (secret masked)",
        "description": "404 for an unknown provider or no stored row.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Masked provider config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationProviderConfig"
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "integrations"
        ],
        "summary": "Upsert an ecosystem's provider config",
        "description": "Replaces the non-secret config; a blank/absent clientSecret preserves the stored encrypted secret, a present one is encrypted at rest. The change invalidates the resolver cache so the ecosystem's new creds drive its flows immediately. The ecosystemId must be the caller's own ecosystem (403 otherwise).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "OAuth providers send clientId/scopes/…/clientSecret; api_key providers send the spec-driven `fields` map (+ optional `enabled`). The route branches by auth method.",
                "properties": {
                  "clientId": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "authUrl": {
                    "type": "string"
                  },
                  "tokenUrl": {
                    "type": "string"
                  },
                  "userinfoUrl": {
                    "type": "string"
                  },
                  "validateUrl": {
                    "type": "string"
                  },
                  "credentialStyle": {
                    "type": "string",
                    "enum": [
                      "form_body",
                      "basic_auth"
                    ]
                  },
                  "endpoints": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "clientSecret": {
                    "type": "string",
                    "description": "Blank/absent preserves the existing secret"
                  },
                  "fields": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "api_key providers: the provider's configFields keyed by field key (the one secret is split into the encrypted slot; a blank/absent secret preserves the stored one)."
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "api_key providers: false pauses the provider without deleting its secret."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Masked provider config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationProviderConfig"
                }
              }
            }
          },
          "400": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "integrations"
        ],
        "summary": "Delete an ecosystem's provider config",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/admin/configs": {
      "get": {
        "tags": [
          "integrations"
        ],
        "summary": "List provider global configs (admin; secrets masked)",
        "description": "Paged by limit/offset (limit defaults to 50, capped at 100; offset defaults to 0). Returns a pagination envelope: `items` is the page; `total` is the unfiltered provider-config count; `limit`/`offset` echo the applied paging.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Masked provider configs (paginated)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total",
                    "limit",
                    "offset"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IntegrationGlobalConfig"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "Unfiltered count of provider configs"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/admin/configs/{providerId}": {
      "parameters": [
        {
          "name": "providerId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "integrations"
        ],
        "summary": "Get one provider global config (admin; secret masked)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Masked provider config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationGlobalConfig"
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "integrations"
        ],
        "summary": "Upsert a provider global config (admin)",
        "description": "Merges the non-secret config; a blank/absent clientSecret preserves the stored encrypted secret, a present one is encrypted at rest.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clientId": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "authUrl": {
                    "type": "string"
                  },
                  "tokenUrl": {
                    "type": "string"
                  },
                  "userinfoUrl": {
                    "type": "string"
                  },
                  "validateUrl": {
                    "type": "string"
                  },
                  "credentialStyle": {
                    "type": "string",
                    "enum": [
                      "form_body",
                      "basic_auth"
                    ]
                  },
                  "endpoints": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "clientSecret": {
                    "type": "string",
                    "description": "Blank/absent preserves the existing secret"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Masked provider config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationGlobalConfig"
                }
              }
            }
          },
          "400": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "integrations"
        ],
        "summary": "Delete a provider global config (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Problem Details (RFC 9457)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/public/invitations": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Request to join an ecosystem (unauthenticated). Optionally addressed by ecosystem rdid/uuid; defaults to the hub.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicInvitationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/invitations/verify": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Complete an invite-backed account by verifying its email link.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteVerifyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verified + joined",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteVerifyResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/invitations/preview": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Preview an invitation by token (state + masked destination + ecosystem name).",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invitation preview",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitePreview"
                }
              }
            }
          }
        }
      }
    },
    "/auth/invitations/accept": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "A logged-in user accepts an invitation by token.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteAcceptRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted or verification required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteAcceptResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/ecosystems/{ecosystemId}/invitation-requests": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "List an ecosystem’s join requests (owner-scoped)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invitation requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EcoManagedRowList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/ecosystems/{ecosystemId}/invitation-requests/{id}": {
      "delete": {
        "tags": [
          "auth"
        ],
        "summary": "Delete an ecosystem join request (owner-scoped)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/ecosystems/{ecosystemId}/pending-users": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "List an ecosystem’s pending users (owner-scoped)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pending users",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EcoManagedRowList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Add pending users to an ecosystem (owner-scoped)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EcoAddPendingUsersBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created pending users",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EcoManagedRowList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/ecosystems/{ecosystemId}/pending-users/{id}": {
      "delete": {
        "tags": [
          "auth"
        ],
        "summary": "Delete a pending user from an ecosystem (owner-scoped)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/ecosystems/{ecosystemId}/invitations": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "List an ecosystem’s sent invitations (owner-scoped)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invitations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EcoManagedRowList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Send invitations (email/SMS) for an ecosystem (owner-scoped)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EcoSendInvitesBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Sent invitations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EcoManagedRowList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/ecosystems/{ecosystemId}/invitations/{id}": {
      "delete": {
        "tags": [
          "auth"
        ],
        "summary": "Delete a sent invitation from an ecosystem (owner-scoped)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/ecosystems/{ecosystemId}/admin-notes": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "List a subject’s admin notes within an ecosystem (owner-scoped)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectTable",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Admin notes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EcoManagedRowList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "auth"
        ],
        "summary": "Reconcile a subject’s admin notes within an ecosystem (owner-scoped)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EcoNotesReconcileBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/ecosystems/{ecosystemId}/entity-history": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "List a subject’s entity history within an ecosystem (owner-scoped)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ecosystemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectTable",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Entity history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EcoManagedRowList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/user-methods": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "List user auth methods (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "auth methods",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AuthUserMethod"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Create a user auth method (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "provider"
                ],
                "properties": {
                  "userId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "provider": {
                    "type": "string",
                    "minLength": 1
                  },
                  "providerId": {
                    "type": "string",
                    "nullable": true
                  },
                  "credential": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "created auth method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthUserMethod"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/user-methods/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "Get a user auth method (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "auth method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthUserMethod"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "auth"
        ],
        "summary": "Update a user auth method (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerId": {
                    "type": "string"
                  },
                  "credential": {
                    "type": "string"
                  },
                  "clearCredential": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "updated auth method",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthUserMethod"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "auth"
        ],
        "summary": "Delete a user auth method (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/methods": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "List auth method settings (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "auth method settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AuthMethodSetting"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Create an auth method setting (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "method"
                ],
                "properties": {
                  "method": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "created setting",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthMethodSetting"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/methods/{method}": {
      "parameters": [
        {
          "name": "method",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "Get an auth method setting (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "auth method setting",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthMethodSetting"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "auth"
        ],
        "summary": "Enable or disable an auth method setting, upserting it (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "enabled"
                ],
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "upserted setting",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthMethodSetting"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "auth"
        ],
        "summary": "Delete an auth method setting (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/my-methods": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "List the caller's own auth methods",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "auth methods",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AuthUserMethod"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/my-methods/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "auth"
        ],
        "summary": "Remove one of the caller's own auth methods (keeping at least one)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/link-password": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Set or replace the caller's email/password credential",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "password"
                ],
                "properties": {
                  "password": {
                    "type": "string",
                    "minLength": 8
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "linked"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/link-provider": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Link a verified OAuth provider identity to the caller",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "clientSlug",
                  "providerSlug"
                ],
                "properties": {
                  "clientSlug": {
                    "type": "string"
                  },
                  "providerSlug": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "accessToken": {
                    "type": "string"
                  },
                  "idToken": {
                    "type": "string"
                  },
                  "redirectUri": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "linked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "linked",
                    "provider"
                  ],
                  "properties": {
                    "linked": {
                      "type": "boolean"
                    },
                    "provider": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/buckets/{bucketId}/types/{typeId}/rows": {
      "get": {
        "tags": [
          "bucket"
        ],
        "summary": "List rows of a bucket-type table (acting as an app/persona)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asType",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rows",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketRowList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "bucket"
        ],
        "summary": "Create a bucket-type row (acting as an app/persona)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asType",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BucketRow"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/buckets/{bucketId}/types/{typeId}/rows/{rowId}": {
      "put": {
        "tags": [
          "bucket"
        ],
        "summary": "Update a bucket-type row (acting as an app/persona)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asType",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BucketRow"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "bucket"
        ],
        "summary": "Delete a bucket-type row (acting as an app/persona)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asType",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted (soft or hard)"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/buckets/{bucketId}/access-groups": {
      "get": {
        "tags": [
          "bucket"
        ],
        "summary": "List access groups in a bucket",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Access groups",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketAccessGroupList"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "bucket"
        ],
        "summary": "Create an access group in a bucket",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "bucketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created access group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketAccessGroup"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/access-groups": {
      "get": {
        "tags": [
          "bucket"
        ],
        "summary": "List every access group the caller can see, across all buckets",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Access groups",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketAccessGroupList"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/access-groups/{groupId}": {
      "get": {
        "tags": [
          "bucket"
        ],
        "summary": "Get an access group with its members + grants",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Access group detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketAccessGroupDetail"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "bucket"
        ],
        "summary": "Rename / edit an access group",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "At least one of name or description is required.",
                "minProperties": 1,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated access group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketAccessGroup"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "bucket"
        ],
        "summary": "Delete a custom access group (cascades members + grants)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/access-groups/{groupId}/members": {
      "post": {
        "tags": [
          "bucket"
        ],
        "summary": "Add a member (user/organization/persona/app/token) to an access group",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "memberType",
                  "memberId"
                ],
                "properties": {
                  "memberType": {
                    "type": "string",
                    "enum": [
                      "user",
                      "organization",
                      "persona",
                      "app",
                      "token"
                    ]
                  },
                  "memberId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Added member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketAccessGroupMember"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/access-groups/{groupId}/members/{memberId}": {
      "delete": {
        "tags": [
          "bucket"
        ],
        "summary": "Remove a member from an access group",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/access-groups/{groupId}/grants": {
      "put": {
        "tags": [
          "bucket"
        ],
        "summary": "Upsert a grant (bucket / bucket_type / row : crud) for an access group",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "targetType",
                  "targetId",
                  "crud"
                ],
                "properties": {
                  "targetType": {
                    "type": "string",
                    "enum": [
                      "bucket",
                      "bucket_type",
                      "row"
                    ]
                  },
                  "targetId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  },
                  "crud": {
                    "type": "string",
                    "description": "comma-separated CRUD subset (or '' for none)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upserted grant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketGrant"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/access-groups/{groupId}/grants/{grantId}": {
      "delete": {
        "tags": [
          "bucket"
        ],
        "summary": "Remove a grant from an access group",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/conversations": {
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "List the caller's chat conversations",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Conversations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChatConversation"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "chat"
        ],
        "summary": "Create a chat conversation",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatConversationCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatConversation"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/conversations/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "Get a conversation with its messages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Conversation + messages",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatConversationDetail"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "chat"
        ],
        "summary": "Rename a conversation",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatConversationRename"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Renamed"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "chat"
        ],
        "summary": "Soft-delete a conversation",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/conversations/{id}/messages": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "chat"
        ],
        "summary": "Send a message and stream the assistant turn (SSE)",
        "description": "Sends a user message and streams the assistant response as Server-Sent Events (`text/event-stream`). The stream emits an `open` event, then `token`, `tool_call_started`, `tool_call_completed`, and a terminal `done` event; failures surface as an `error` event. The response is always 200 even when the conversation is missing or the turn fails — those conditions are reported in-band via the `error` event rather than an HTTP status.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatSendMessage"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "SSE stream of chat-turn events",
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ChatStreamEvent"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/conversations/{id}/messages/{mid}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "mid",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "Get a single message",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatMessage"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "chat"
        ],
        "summary": "Edit a user message",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatMessageEdit"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Edited"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "chat"
        ],
        "summary": "Soft-delete a message",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/me/communication-settings": {
      "get": {
        "tags": [
          "settings"
        ],
        "summary": "The caller's communication/presence dial (saved row, or the open defaults)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The communication dial",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunicationSettings"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "settings"
        ],
        "summary": "Replace the caller's communication/presence dial (upsert; full representation)",
        "description": "Masks must combine only the known AUDIENCE bits (PUBLIC=1, HUB=2, TEAM=4, ORG=8, FRIEND=32); 0 means nobody. Blocks always override the dial, and appear_offline hides presence from everyone.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "dmAudienceMask",
                  "presenceAudienceMask",
                  "appearOffline"
                ],
                "properties": {
                  "dmAudienceMask": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "AUDIENCE bitmask of who may DM the user (0 = nobody; default PUBLIC|HUB = 3)"
                  },
                  "presenceAudienceMask": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "AUDIENCE bitmask of who may see the user presence (0 = nobody; default PUBLIC|HUB = 3)"
                  },
                  "appearOffline": {
                    "type": "boolean",
                    "description": "When true, presence is hidden from EVERYONE regardless of the mask"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved communication dial",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunicationSettings"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/me/appearance": {
      "get": {
        "tags": [
          "settings"
        ],
        "summary": "The caller's appearance preferences (empty object when never saved)",
        "description": "Every adh site reads this on sign-in so a user's colour mode and accessibility settings follow them across the family (the sites span many registrable domains, so a browser-local copy cannot). A signed-out visitor follows their OS setting instead.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The appearance preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppearanceSettings"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "settings"
        ],
        "summary": "Replace the caller's appearance preferences (upsert; full representation)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "colorMode": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "light",
                      "dark"
                    ],
                    "description": "The user's colour scheme; 'auto' follows the operating system"
                  },
                  "reduceMotion": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "on",
                      "off"
                    ]
                  },
                  "contrast": {
                    "type": "string",
                    "enum": [
                      "default",
                      "high",
                      "extra-high"
                    ]
                  },
                  "textSize": {
                    "type": "string",
                    "enum": [
                      "default",
                      "small",
                      "large",
                      "extra-large"
                    ]
                  },
                  "spacing": {
                    "type": "string",
                    "enum": [
                      "compact",
                      "comfortable",
                      "spacious"
                    ]
                  },
                  "focusOutlines": {
                    "type": "boolean"
                  },
                  "underlineLinks": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved appearance preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppearanceSettings"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/levels": {
      "get": {
        "tags": [
          "gamification"
        ],
        "summary": "The level ladder",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Levels",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GamificationLevel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/badges": {
      "get": {
        "tags": [
          "gamification"
        ],
        "summary": "The global badge catalog",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Badge definitions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GamificationBadge"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/leaderboard": {
      "get": {
        "tags": [
          "gamification"
        ],
        "summary": "Ranked leaderboard by summed points for a subject kind",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "subjectType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "user"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "week",
                "month"
              ],
              "default": "all"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated leaderboard",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationLeaderboard"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/realms/{ecosystemId}/boards/{statKey}": {
      "parameters": [
        {
          "name": "ecosystemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "statKey",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "gamification"
        ],
        "summary": "Per-realm leaderboard for one boardable stat (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "window",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "rolling30",
                "allTime",
                "trending",
                "season"
              ],
              "default": "trending"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked board (public persona entries)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationBoard"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/realms/{ecosystemId}/config": {
      "parameters": [
        {
          "name": "ecosystemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "gamification"
        ],
        "summary": "Read a realm’s gamification config (admin) — defaults when unset",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Realm config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationRealmConfig"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "gamification"
        ],
        "summary": "Update a realm’s gamification config (admin, partial) — enabling it (false → true) triggers a retroactive replay",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "skin": {
                    "type": "string",
                    "enum": [
                      "rpg",
                      "plain"
                    ]
                  },
                  "surfaces": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "boolean"
                    }
                  },
                  "seasons": {
                    "$ref": "#/components/schemas/GamificationSeasons",
                    "description": "null clears seasons; an object sets the window (anchor + lengthDays 1..366)"
                  },
                  "timezone": {
                    "type": "string",
                    "description": "IANA zone for the realm's day/streak boundary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated config (with replay result when just enabled)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationRealmConfigUpdate"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/realms/{ecosystemId}/catalog": {
      "parameters": [
        {
          "name": "ecosystemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "gamification"
        ],
        "summary": "A realm’s effective catalog (admin) — defaults + realm overrides, source-tagged",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Effective catalog (badges + levels)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationCatalog"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/realms/{ecosystemId}/badges": {
      "parameters": [
        {
          "name": "ecosystemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "gamification"
        ],
        "summary": "Author a realm badge (admin) — overrides the same (badgeLine, tier) default; POST /replay to backfill",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GamificationRealmBadgeInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The inserted realm badge row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationRealmBadge"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/realms/{ecosystemId}/badges/{id}": {
      "parameters": [
        {
          "name": "ecosystemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "gamification"
        ],
        "summary": "Update a realm-owned badge (admin) — 404 for a platform default",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GamificationRealmBadgeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated realm badge row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationRealmBadge"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "gamification"
        ],
        "summary": "Delete a realm-owned badge (admin) — clears its holdings first; 404 for a default",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "deleted"
                  ],
                  "properties": {
                    "deleted": {
                      "type": "string",
                      "description": "The deleted badge id"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/realms/{ecosystemId}/levels": {
      "parameters": [
        {
          "name": "ecosystemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "gamification"
        ],
        "summary": "Replace a realm’s level ladder (admin) — must start at 0 and be strictly increasing; POST /replay to backfill",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rungs"
                ],
                "properties": {
                  "rungs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "name",
                        "minPoints"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "minPoints": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The replaced ladder + replay hint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationRealmLevelsUpdate"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/realms/{ecosystemId}/event-types": {
      "parameters": [
        {
          "name": "ecosystemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "gamification"
        ],
        "summary": "List a realm’s custom event types (owner or admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Realm custom event types",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GamificationRealmEventType"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "gamification"
        ],
        "summary": "Register a realm custom event type (owner or admin) — 409 on a duplicate name",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GamificationRealmEventTypeInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created event type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationRealmEventType"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/realms/{ecosystemId}/event-types/{id}": {
      "parameters": [
        {
          "name": "ecosystemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "gamification"
        ],
        "summary": "Update a realm-owned custom event type (owner or admin) — 409 on a name collision",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GamificationRealmEventTypeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated event type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationRealmEventType"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "gamification"
        ],
        "summary": "Delete a realm-owned custom event type (owner or admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "deleted"
                  ],
                  "properties": {
                    "deleted": {
                      "type": "string",
                      "description": "The deleted event type id"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/realms/{ecosystemId}/events": {
      "parameters": [
        {
          "name": "ecosystemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "gamification"
        ],
        "summary": "Ingest a realm custom event (owner or admin) — bumps the type’s stat and awards any newly-earned badges",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "subjectType",
                  "subjectId",
                  "dedupeKey"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "A custom event type defined for this realm"
                  },
                  "subjectType": {
                    "type": "string"
                  },
                  "subjectId": {
                    "type": "string"
                  },
                  "dedupeKey": {
                    "type": "string",
                    "description": "Required idempotency key the caller owns (e.g. the source event id); the same key never double-counts"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deduped no-op (dedupeKey already seen)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationCustomEventResult"
                }
              }
            }
          },
          "201": {
            "description": "Ingested — stat bumped, badges evaluated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationCustomEventResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/subjects/{subjectType}/{subjectId}": {
      "parameters": [
        {
          "name": "subjectType",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "subjectId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "gamification"
        ],
        "summary": "A subject’s gamification summary (points, level, badges, opt-out)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationSummary"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/subjects/{subjectType}/{subjectId}/points": {
      "parameters": [
        {
          "name": "subjectType",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "subjectId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "gamification"
        ],
        "summary": "A subject’s point ledger (newest first)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated point ledger",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationPointsPage"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/subjects/{subjectType}/{subjectId}/preference": {
      "parameters": [
        {
          "name": "subjectType",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "subjectId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "gamification"
        ],
        "summary": "Set a subject’s opt-out (self for a user, or admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "optedOut"
                ],
                "properties": {
                  "optedOut": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated preference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationPreference"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/award": {
      "post": {
        "tags": [
          "gamification"
        ],
        "summary": "Award points to a subject (admin) — grants any newly-earned badges",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "subjectType",
                  "subjectId",
                  "amount",
                  "reason"
                ],
                "properties": {
                  "subjectType": {
                    "type": "string"
                  },
                  "subjectId": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "integer"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "sourceType": {
                    "type": "string"
                  },
                  "sourceId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Award result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationAwardResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gamification/replay": {
      "post": {
        "tags": [
          "gamification"
        ],
        "summary": "Retroactively backfill awards a subject’s telemetry already earned (admin) — `{ecosystemId}` replays the whole realm, `{subjectType, subjectId, ecosystemId}` replays one subject",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ecosystemId"
                ],
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "description": "The target realm to replay"
                  },
                  "subjectType": {
                    "type": "string",
                    "description": "With subjectId, replay just this one subject instead of the whole realm"
                  },
                  "subjectId": {
                    "type": "string",
                    "description": "Must be provided together with subjectType"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replay result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationReplayResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/customer/login": {
      "post": {
        "tags": [
          "customer"
        ],
        "summary": "Authenticate one of the caller's end-customers (email + password)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "email or identifier is required (identifier is the generic alias).",
                "required": [
                  "password"
                ],
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "identifier": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "customer access token + opaque refresh token + customerId",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerAuthResult"
                }
              }
            }
          },
          "202": {
            "description": "second factor required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaChallenge"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/customer/login/mfa/sms/send": {
      "post": {
        "tags": [
          "customer"
        ],
        "summary": "Send the SMS login code to the challenged customer's verified primary phone",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "MFA pending token"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "code sent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/customer/login/mfa": {
      "post": {
        "tags": [
          "customer"
        ],
        "summary": "Complete customer login by satisfying the second factor → aal=2 session",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "method",
                  "code"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "MFA pending token"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "sms",
                      "totp",
                      "recovery"
                    ]
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 40
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "customer access token + opaque refresh token + customerId",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerAuthResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/customer/refresh": {
      "post": {
        "tags": [
          "customer"
        ],
        "summary": "Rotate a live customer session (presented refresh token is single-use)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "refreshToken"
                ],
                "properties": {
                  "refreshToken": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The opaque refresh token from a prior login/refresh."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "new customer access token + rotated refresh token + customerId",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerAuthResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/customer/register": {
      "post": {
        "tags": [
          "customer"
        ],
        "summary": "Provision one of the caller's end-customers with an ADH password credential",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "password"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8,
                    "description": "Must be at least 8 characters."
                  },
                  "displayName": {
                    "type": "string",
                    "maxLength": 255
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "the new end-customer id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerRegisterResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/customer/resolve": {
      "post": {
        "tags": [
          "customer"
        ],
        "summary": "Map one of the caller's external user ids onto a stable ADH customerId (BYO bridge)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "externalId"
                ],
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "The developer's own end-user id (the BYO join key)."
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "displayName": {
                    "type": "string",
                    "maxLength": 255
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "the resolved (idempotent upsert) customer id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResolveResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/customer/revoke": {
      "post": {
        "tags": [
          "customer"
        ],
        "summary": "Revoke a customer refresh session (logout); idempotent",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "refreshToken"
                ],
                "properties": {
                  "refreshToken": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "session revoked (idempotent — always 204)"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/discussion/topics": {
      "get": {
        "tags": [
          "discussion"
        ],
        "summary": "List the ecosystem’s live discussion topics (most-recently-active first)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "communityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The ecosystem’s live topics, most-recently-active first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DiscussionTopic"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "discussion"
        ],
        "summary": "Create a topic (atomically born with its opening post; community admin only)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title",
                  "body",
                  "communityId"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Opening-post markdown; stored as a content.markdown body document."
                  },
                  "communityId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36,
                    "description": "Community instance to create under; the caller must be its admin (else 403)."
                  },
                  "categoryId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36,
                    "description": "Optional category to file the topic under; must belong to the same community (else 400)."
                  },
                  "isPublic": {
                    "type": "boolean",
                    "description": "Whether anonymous callers can read the topic via /public/discussion (default true)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created topic",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscussionTopic"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/discussion/topics/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "discussion"
        ],
        "summary": "Get one live topic",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The topic",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscussionTopic"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "discussion"
        ],
        "summary": "Edit a topic title (author/admin) and/or moderation flags (community moderator)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "isPinned": {
                    "type": "boolean",
                    "description": "Community moderator only."
                  },
                  "isLocked": {
                    "type": "boolean",
                    "description": "Community moderator only."
                  },
                  "answeredPostId": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 36,
                    "description": "Topic author or community moderator; must be a live post in this topic (or null to clear)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated topic",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscussionTopic"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "discussion"
        ],
        "summary": "Soft-delete a topic (author or admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Topic deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/discussion/topics/{id}/posts": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "discussion"
        ],
        "summary": "List a topic’s live posts (with resolved markdown bodies), thread order",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The topic’s live posts in thread order (post_number ASC)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DiscussionPost"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "discussion"
        ],
        "summary": "Reply to a topic (bumps the topic’s reply count + last activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Reply markdown; stored as a content.markdown body document."
                  },
                  "parentPostId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36,
                    "description": "Id of the post this reply nests under (a flat reply when omitted)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created reply post",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscussionPost"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/discussion/posts/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "discussion"
        ],
        "summary": "Soft-delete a reply post (author or admin; not the opening post)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Post deleted"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/discussion/topics": {
      "get": {
        "tags": [
          "discussion"
        ],
        "summary": "List the hub’s live PUBLIC topics (anonymous; author id omitted)",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The ecosystem’s live topics, most-recently-active first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DiscussionTopic"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/public/discussion/topics/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "discussion"
        ],
        "summary": "Get one live PUBLIC hub topic (404 if missing/private/deleted — indistinguishable)",
        "responses": {
          "200": {
            "description": "The public topic",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscussionTopic"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/discussion/topics/{id}/posts": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "discussion"
        ],
        "summary": "List a PUBLIC topic’s live posts (with resolved markdown bodies), thread order",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The topic’s live posts in thread order (post_number ASC)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DiscussionPost"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/feature-flags/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "ecosystem"
        ],
        "summary": "An ecosystem's feature flags, by key (owner or admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Flags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flags"
                  ],
                  "properties": {
                    "flags": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EcosystemFeatureFlag"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Create one flag on the ecosystem (409 if the key exists)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "key"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": false
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1024
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created flag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EcosystemFeatureFlag"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/feature-flags/{id}/{key}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "key",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Update one existing flag (404 if missing)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1024
                  }
                },
                "description": "At least one of enabled, description is required"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated flag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EcosystemFeatureFlag"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Remove one flag",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/server-bag/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "ecosystem"
        ],
        "summary": "An ecosystem's server-bag entries, by key (owner or admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Bags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "bags"
                  ],
                  "properties": {
                    "bags": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EcosystemServerBagEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Create one bag entry on the ecosystem (409 if the key exists)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "key",
                  "value"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "value": {
                    "description": "Arbitrary JSON value"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1024
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EcosystemServerBagEntry"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/server-bag/{id}/{key}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "key",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Update one existing bag entry (404 if missing)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "description": "Arbitrary JSON value"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1024
                  }
                },
                "description": "At least one of value, description is required"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EcosystemServerBagEntry"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Remove one bag entry",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/communities/{slug}": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "community"
        ],
        "summary": "Get one community instance (+ its settings) by slug",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The community instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Community"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/communities/{id}/categories": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "community"
        ],
        "summary": "List a community’s categories (display order; private instance: members only → 404)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The community’s categories, in display order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CommunityCategory"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "community"
        ],
        "summary": "Create a category (community admin only)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "slug",
                  "name"
                ],
                "properties": {
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Unique per community."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "color": {
                    "type": "string",
                    "maxLength": 16,
                    "description": "Display color (e.g. a hex string)."
                  },
                  "displayOrder": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Sort order within the community."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunityCategory"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/communities/{id}/categories/{catId}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "catId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "community"
        ],
        "summary": "Edit a category (community admin only)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "properties": {
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "color": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "displayOrder": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "isPublic": {
                    "type": "boolean"
                  },
                  "isArchived": {
                    "type": "boolean",
                    "description": "true archives (the admin \"delete\") — hidden from every list, discussions retained."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunityCategory"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/communities/{id}/topics": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "community"
        ],
        "summary": "List a community’s live topics (filter by category, sort, paged; private instance: members only → 404)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "popular",
                "trending"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The community’s live topics + a total count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DiscussionTopic"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/communities/{id}/members": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "community"
        ],
        "summary": "List the membership roster (community admin only)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The community’s membership roster",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CommunityMember"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "community"
        ],
        "summary": "Grant a membership role (community admin only; idempotent upsert; the grantee must be a real customer → 404)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customerId",
                  "role"
                ],
                "properties": {
                  "customerId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "moderator",
                      "member"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The granted membership row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunityMember"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/communities/{id}/members/me": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "community"
        ],
        "summary": "Get the caller’s OWN role in a community (null when not a member)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The caller’s role, or null when they hold no membership",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "role"
                  ],
                  "properties": {
                    "role": {
                      "type": "string",
                      "nullable": true,
                      "description": "owner | admin | moderator | member, or null (not a member)."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "community"
        ],
        "summary": "Update the caller’s OWN membership bio (members only; \"\" clears it)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "bio"
                ],
                "properties": {
                  "bio": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "One-line \"what I’m building\" intro for this community."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated membership row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunityMember"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/communities/{id}/directory": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "community"
        ],
        "summary": "The people directory: every member with display identity, bio, role, and activity (public instance: any signed-in user; private: members only → 404)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The community’s members, oldest joiner first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CommunityDirectoryEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/communities/{id}/profiles": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "community"
        ],
        "summary": "Resolve member display identities: ?ids=a,b,c (batch, ≤200) or ?q=prefix (autocomplete, ≤8) (public instance: any signed-in user; private: members only → 404)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The matching members’ display profiles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CommunityProfile"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/communities/{id}/members/{customerId}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "customerId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "community"
        ],
        "summary": "Revoke a membership (community admin only; the owner cannot be removed)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Membership revoked"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/communities/{slug}": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "community"
        ],
        "summary": "Get one PUBLIC hub community by slug (404 if missing/private — indistinguishable)",
        "responses": {
          "200": {
            "description": "The public community instance (no settings)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCommunity"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/communities/{id}/categories": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "community"
        ],
        "summary": "List a PUBLIC hub community’s public categories",
        "responses": {
          "200": {
            "description": "The community’s categories, in display order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CommunityCategory"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/communities/{id}/topics": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "community"
        ],
        "summary": "List a PUBLIC hub community’s public topics (author id omitted)",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "popular",
                "trending"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The community’s live topics + a total count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DiscussionTopic"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown": {
      "parameters": [
        {
          "name": "workspace",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own documents. Unknown/foreign slug: 404."
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List/search the caller's markdown documents (metadata only)",
        "description": "Lists the caller’s documents, most-recently-updated first. Optional filters narrow the set: `q` (free-text, case-insensitive substring across title, body, category, and tags), `category` (exact match), and `tag` (set membership).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Free-text query matched across title, body, category, and tags.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Restrict to documents with this exact category.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "description": "Restrict to documents whose tag set contains this tag.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Restrict to documents whose frontmatter adh_source equals this value. Used by researchUpsert to look up an existing doc without scanning the full export.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of document metadata, most-recently-updated first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total",
                    "page",
                    "pageSize"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MarkdownDocumentSummary"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create a markdown document (writes the head + version 1)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "content"
                ],
                "properties": {
                  "content": {
                    "type": "string",
                    "description": "Full raw markdown (stored byte-exact)."
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Optional; derived from frontmatter/H1 if omitted."
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Optional classification label."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "maxItems": 100,
                    "description": "Optional tag set (trimmed + de-duplicated server-side)."
                  },
                  "author": {
                    "type": "object",
                    "description": "Author of this revision; omit to attribute to the calling customer. customer/user are pinned to the caller; other types are caller-asserted (unverified).",
                    "properties": {
                      "type": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "Lower-cased. e.g. 'customer', 'user', 'persona', 'agent', 'system'."
                      },
                      "id": {
                        "type": "string",
                        "maxLength": 128,
                        "description": "Id within that type's namespace (ignored for customer/user — pinned to the caller)."
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Display label; ignored for customer/user (taken from the principal)."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkdownDocument"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown/categories": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List the caller's existing category names (autocomplete source)",
        "description": "The account's full set of category names (content.categories), scoped to the caller and ecosystem, distinct and alphabetical — the autocomplete/browse source for the research classification UI.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Distinct category names, sorted alphabetically",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringList"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown/tags": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List the caller's existing tag labels (autocomplete source)",
        "description": "The account's full set of tag labels (content.keywords), scoped to the caller and ecosystem, distinct and alphabetical — the autocomplete/browse source for the research tag field.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Distinct tag labels, sorted alphabetically",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringList"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown/export": {
      "parameters": [
        {
          "name": "workspace",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own documents. Unknown/foreign slug: 404."
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Bulk export the caller's documents WITH content (download a whole set)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "All documents (with content), ordered by createdAt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "truncated"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MarkdownDocument"
                      }
                    },
                    "truncated": {
                      "type": "boolean",
                      "description": "True if more documents remain (the export stopped at its approximate byte budget)."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "workspace",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own documents. Unknown/foreign slug: 404."
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get a markdown document (with content)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkdownDocument"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update a document; any real change appends a full-state version",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "At least one of content/title/category/tags. A content or title change appends a full-state version (author attaches to it); a category/tags-only change updates the head in place WITHOUT a new version; a no-op returns the doc unchanged.",
                "properties": {
                  "content": {
                    "type": "string",
                    "description": "New raw markdown; a real change bumps current_version."
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 200,
                    "nullable": true,
                    "description": "Classification label; send null to clear, omit to leave unchanged."
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "maxItems": 100,
                    "description": "Replacement tag set (trimmed + de-duplicated); omit to leave unchanged."
                  },
                  "author": {
                    "type": "object",
                    "description": "Author of this revision; omit to attribute to the calling customer. customer/user are pinned to the caller; other types are caller-asserted (unverified).",
                    "properties": {
                      "type": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "Lower-cased. e.g. 'customer', 'user', 'persona', 'agent', 'system'."
                      },
                      "id": {
                        "type": "string",
                        "maxLength": 128,
                        "description": "Id within that type's namespace (ignored for customer/user — pinned to the caller)."
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Display label; ignored for customer/user (taken from the principal)."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkdownDocument"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Soft-delete a document",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown/{id}/raw": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "workspace",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own documents. Unknown/foreign slug: 404."
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get the raw markdown bytes (text/markdown), with an ETag",
        "description": "Returns the content verbatim. Send If-None-Match with the ETag for a 304.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Raw markdown content",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified (ETag matched)"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown/{id}/publish": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "workspace",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own documents. Unknown/foreign slug: 404."
        }
      ],
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Publish a document under an author-defined public route slug",
        "description": "Makes the document readable UNAUTHENTICATED at /public/users/{slug}/papers/{route}. The route is lowercase, url-safe, and UNIQUE PER AUTHOR — a collision with another of the caller’s live papers returns 409.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "route"
                ],
                "properties": {
                  "route": {
                    "type": "string",
                    "description": "Public route slug: lowercase, url-safe ([a-z0-9_-], leading alphanumeric), 2–128 chars."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The published document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkdownDocument"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown/{id}/unpublish": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "workspace",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own documents. Unknown/foreign slug: 404."
        }
      ],
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Unpublish a document (revert to a private draft, freeing its route)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The unpublished document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkdownDocument"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown/{id}/finalize": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "workspace",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own documents. Unknown/foreign slug: 404."
        }
      ],
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Finalize a document (stage='final'; content becomes immutable)",
        "description": "Marks the document final: content/title edits and version restores are rejected with 409 until definalize. Publication state is deliberately NOT covered — a final document can still be published/unpublished. Idempotent: re-finalizing a final document is a 200 no-op.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The finalized document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkdownDocument"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown/{id}/definalize": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "workspace",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own documents. Unknown/foreign slug: 404."
        }
      ],
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Definalize a document (revert to stage='draft'; edits work again)",
        "description": "Reverts a final document to an editable draft, lifting the content-immutability guard. Idempotent: definalizing a draft is a 200 no-op.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The definalized document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkdownDocument"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown/{id}/versions": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "workspace",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own documents. Unknown/foreign slug: 404."
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List a document’s versions, newest first (metadata only)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Version metadata, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MarkdownDocumentVersionSummary"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown/{id}/versions/{version}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "version",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "workspace",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own documents. Unknown/foreign slug: 404."
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get one version (with content)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The version snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkdownDocumentVersion"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/markdown/{id}/versions/{version}/restore": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "version",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "workspace",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to). Omitted: the caller’s own documents. Unknown/foreign slug: 404."
        }
      ],
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Restore a version (re-applies its full state as a new version; non-destructive)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The document after restore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkdownDocument"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messaging/log": {
      "get": {
        "tags": [
          "messaging"
        ],
        "summary": "List the message log (admin), newest first, with optional filters",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Message-log page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingLogPage"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messaging/log/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "messaging"
        ],
        "summary": "Get a single message-log entry by id (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Message-log entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingLogEntry"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messaging/me/messages": {
      "get": {
        "tags": [
          "messaging"
        ],
        "summary": "The caller's own message history (self), newest first",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Message-log page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingLogPage"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messaging/status": {
      "get": {
        "tags": [
          "messaging"
        ],
        "summary": "Which messaging channels are configured + enabled (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Provider status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingStatus"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messaging/templates": {
      "get": {
        "tags": [
          "messaging"
        ],
        "summary": "List the available outbound message templates (any signed-in user)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Templates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MessagingTemplate"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messaging/send": {
      "post": {
        "tags": [
          "messaging"
        ],
        "summary": "Send an email/SMS to a user — freeform or via a template (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "channel"
                ],
                "description": "Provide either body or templateId, not both.",
                "properties": {
                  "userId": {
                    "type": "string",
                    "maxLength": 36,
                    "description": "Target user id"
                  },
                  "channel": {
                    "type": "string",
                    "enum": [
                      "email",
                      "sms"
                    ]
                  },
                  "subject": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Email subject (freeform)"
                  },
                  "body": {
                    "type": "string",
                    "description": "Freeform message body"
                  },
                  "templateId": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Template id (alternative to body)"
                  },
                  "templateVars": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Substitution values for the template placeholders"
                  },
                  "recipient": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Override recipient; required for SMS, optional for email"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingSendResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Send failed (e.g. provider unconfigured); logged with status failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingSendResult"
                }
              }
            }
          }
        }
      }
    },
    "/messaging/ecosystems/{id}/status": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "messaging"
        ],
        "summary": "Which messaging channels are configured for this ecosystem (owner/admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Provider status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingStatus"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messaging/ecosystems/{id}/log": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "messaging"
        ],
        "summary": "This ecosystem's message log, newest first (owner/admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Message-log page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingLogPage"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messaging/ecosystems/{id}/send": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "messaging"
        ],
        "summary": "Send an email/SMS via this ecosystem's providers — freeform or template (owner/admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "channel"
                ],
                "description": "Provide either body or templateId, not both.",
                "properties": {
                  "userId": {
                    "type": "string",
                    "maxLength": 36,
                    "description": "Target customer id (within this ecosystem)"
                  },
                  "channel": {
                    "type": "string",
                    "enum": [
                      "email",
                      "sms"
                    ]
                  },
                  "subject": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Email subject (freeform)"
                  },
                  "body": {
                    "type": "string",
                    "description": "Freeform message body"
                  },
                  "templateId": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Template id (alternative to body)"
                  },
                  "templateVars": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Template placeholder values"
                  },
                  "recipient": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Override recipient; required for SMS, optional for email"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingSendResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Send failed (logged)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagingSendResult"
                }
              }
            }
          }
        }
      }
    },
    "/notifications/preferences/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "notifications"
        ],
        "summary": "Reset the caller's notification preferences (id must be the caller's user id)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Preferences cleared"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notifications": {
      "get": {
        "tags": [
          "notifications"
        ],
        "summary": "List the caller's in-app notifications (paginated, filterable)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter to these categories (repeatable; the union). Absent = all."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inbox",
                "archived",
                "trashed"
              ],
              "default": "inbox"
            },
            "description": "Inbox lifecycle bucket to list; default inbox."
          },
          {
            "name": "read",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter by read state; absent = both."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of notifications",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total",
                    "page",
                    "pageSize"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Notification"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notifications/preferences": {
      "get": {
        "tags": [
          "notifications"
        ],
        "summary": "List the caller's notification preferences (all categories)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "All preferences (one per category)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preferences"
                  ],
                  "properties": {
                    "preferences": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NotificationPreference"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "notifications"
        ],
        "summary": "Create a notification preference for one category",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "category",
                  "email",
                  "sms"
                ],
                "properties": {
                  "category": {
                    "type": "string",
                    "enum": [
                      "account",
                      "community_reply",
                      "community_mention",
                      "admin_announcement",
                      "direct_message"
                    ]
                  },
                  "email": {
                    "type": "boolean"
                  },
                  "sms": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Preference created; all preferences returned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preferences"
                  ],
                  "properties": {
                    "preferences": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NotificationPreference"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "notifications"
        ],
        "summary": "Bulk upsert notification preferences across categories",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "preferences"
                ],
                "properties": {
                  "preferences": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "required": [
                        "category",
                        "email",
                        "sms"
                      ],
                      "properties": {
                        "category": {
                          "type": "string",
                          "enum": [
                            "account",
                            "community_reply",
                            "community_mention",
                            "admin_announcement",
                            "direct_message"
                          ]
                        },
                        "email": {
                          "type": "boolean"
                        },
                        "sms": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "All preferences (one per category)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preferences"
                  ],
                  "properties": {
                    "preferences": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NotificationPreference"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notifications/preferences/{category}": {
      "parameters": [
        {
          "name": "category",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "notifications"
        ],
        "summary": "Get the caller's preference for one category (defaults if unset)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Preference for the category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreference"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notifications/unread-count": {
      "get": {
        "tags": [
          "notifications"
        ],
        "summary": "Count the caller's unread notifications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Unread count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notifications/read-all": {
      "post": {
        "tags": [
          "notifications"
        ],
        "summary": "Mark all of the caller's notifications as read",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notifications/{id}/read": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "notifications"
        ],
        "summary": "Mark one notification as read",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notifications/{id}/unread": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "notifications"
        ],
        "summary": "Mark one notification as unread",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notifications/{id}/archive": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "notifications"
        ],
        "summary": "Archive one notification",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notifications/{id}/trash": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "notifications"
        ],
        "summary": "Trash one notification",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/friends": {
      "get": {
        "tags": [
          "friends"
        ],
        "summary": "The caller's accepted friends (each entry names the OTHER user; paginated)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the caller's friends",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total",
                    "page",
                    "pageSize"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FriendEntry"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/friends/requests": {
      "get": {
        "tags": [
          "friends"
        ],
        "summary": "Pending friend requests — ?direction=received (default, the caller's inbox) | sent",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ],
              "default": "received"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of pending friend requests, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total",
                    "page",
                    "pageSize"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Friendship"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "friends"
        ],
        "summary": "Send a friend request (idempotent on the unordered pair; mutual → auto-accept)",
        "description": "Creates a pending friendship with the caller as requester. If an edge for the unordered pair already exists in either direction no second row is created: a pending request FROM the other user is auto-accepted (both sides asked), a pending request from the caller or an accepted friendship is returned as-is, and a declined edge flips back to pending with the caller as requester. Refused (403) while a block exists in either direction between the two users.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId"
                ],
                "properties": {
                  "userId": {
                    "type": "string",
                    "description": "The customer id of the user to befriend"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The existing (or auto-accepted / re-requested) friendship",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Friendship"
                }
              }
            }
          },
          "201": {
            "description": "The created pending friendship",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Friendship"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/friends/requests/{id}/accept": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "friends"
        ],
        "summary": "Accept a pending friend request (addressee only)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The accepted friendship",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Friendship"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/friends/requests/{id}/decline": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "friends"
        ],
        "summary": "Decline a pending friend request (addressee only)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The declined friendship",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Friendship"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/friends/{userId}": {
      "parameters": [
        {
          "name": "userId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "friends"
        ],
        "summary": "Remove the friendship/request between the caller and a user (either party)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Friendship removed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/follows/following": {
      "get": {
        "tags": [
          "follows"
        ],
        "summary": "Users the caller follows (paginated)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the caller's outbound follows, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total",
                    "page",
                    "pageSize"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Follow"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/follows/followers": {
      "get": {
        "tags": [
          "follows"
        ],
        "summary": "Users following the caller (paginated)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the caller's inbound follows, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total",
                    "page",
                    "pageSize"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Follow"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/follows/{userId}": {
      "parameters": [
        {
          "name": "userId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "follows"
        ],
        "summary": "Follow a user (idempotent — one-way, no permission semantics)",
        "description": "Creates the caller→user follow edge. A follow is a subscription, not a grant: it needs no consent and carries no permission weight. Idempotent — repeating the call returns the existing edge (200) instead of creating a second row.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The already-existing follow",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Follow"
                }
              }
            }
          },
          "201": {
            "description": "The created follow",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Follow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "follows"
        ],
        "summary": "Unfollow a user",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Follow removed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/blocks": {
      "get": {
        "tags": [
          "blocks"
        ],
        "summary": "Users the caller has blocked (paginated)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the caller's blocks, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total",
                    "page",
                    "pageSize"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserBlock"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/blocks/{userId}": {
      "parameters": [
        {
          "name": "userId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "blocks"
        ],
        "summary": "Block a user (idempotent; severs any friendship between the pair)",
        "description": "Creates the caller→user block. Blocking removes any existing friendship or pending request between the two users in the same transaction, and new friend requests are refused (403) while a block exists in either direction. Follows are untouched — they carry no permission weight. Idempotent — repeating the call returns the existing block (200) instead of creating a second row.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The already-existing block",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserBlock"
                }
              }
            }
          },
          "201": {
            "description": "The created block",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserBlock"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "blocks"
        ],
        "summary": "Unblock a user (does NOT restore a severed friendship)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Block removed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/bookmarks": {
      "get": {
        "tags": [
          "bookmarks"
        ],
        "summary": "List the caller's bookmarks (newest first, paginated)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetKind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of bookmarks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total",
                    "page",
                    "pageSize"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Bookmark"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "bookmarks"
        ],
        "summary": "Add or re-affirm a bookmark (idempotent on the caller + target)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "targetKind",
                  "targetId"
                ],
                "properties": {
                  "targetKind": {
                    "type": "string"
                  },
                  "targetId": {
                    "type": "string"
                  },
                  "notify": {
                    "type": "boolean",
                    "description": "Also subscribe to the target’s activity notifications (default false)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created (or re-affirmed) bookmark",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bookmark"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/bookmarks/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "bookmarks"
        ],
        "summary": "Remove one of the caller's bookmarks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Bookmark removed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/notes": {
      "get": {
        "tags": [
          "notes"
        ],
        "summary": "List the caller's notes (newest first, paginated)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of notes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total",
                    "page",
                    "pageSize"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Note"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "notes"
        ],
        "summary": "Create a note (a markdown doc + a marker); the title derives from the first line",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "content"
                ],
                "properties": {
                  "content": {
                    "type": "string",
                    "description": "The note’s raw markdown body."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created note",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Note"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/notes/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "notes"
        ],
        "summary": "Un-note a doc (removes the marker only; the markdown doc survives)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Note removed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/reactions": {
      "get": {
        "tags": [
          "interactions"
        ],
        "summary": "List all reactions on a target (public within the ecosystem)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "targetKind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reactions on the target",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Reaction"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "interactions"
        ],
        "summary": "Add a reaction (idempotent on the caller's target+emoji)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "targetKind",
                  "targetId",
                  "emoji"
                ],
                "properties": {
                  "targetKind": {
                    "type": "string"
                  },
                  "targetId": {
                    "type": "string"
                  },
                  "emoji": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reaction already existed (idempotent)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reaction"
                }
              }
            }
          },
          "201": {
            "description": "Reaction created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reaction"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/reactions/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "interactions"
        ],
        "summary": "Remove one of the caller's reactions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Reaction removed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/poll-votes": {
      "get": {
        "tags": [
          "interactions"
        ],
        "summary": "Tally a poll — per-option counts + the caller’s chosen options",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "pollId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Poll tally",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PollTally"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "interactions"
        ],
        "summary": "Cast a vote (single-choice polls replace the caller’s prior vote)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "optionId"
                ],
                "properties": {
                  "optionId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Vote already existed (idempotent)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PollVote"
                }
              }
            }
          },
          "201": {
            "description": "Vote cast",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PollVote"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/poll-votes/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "interactions"
        ],
        "summary": "Remove one of the caller's votes",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Vote removed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/contacts": {
      "get": {
        "tags": [
          "contacts"
        ],
        "summary": "List the caller's contact methods (email + phone)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The caller’s contact methods",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ContactMethod"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "contacts"
        ],
        "summary": "Add a contact method (unverified). First of a kind becomes primary.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "value"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "email",
                      "phone"
                    ]
                  },
                  "value": {
                    "type": "string",
                    "maxLength": 255
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Contact created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactMethod"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/contacts/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "contacts"
        ],
        "summary": "Delete a contact method (the primary email cannot be deleted)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Contact deleted"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/contacts/{id}/verify/start": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "contacts"
        ],
        "summary": "Send a 6-digit verification code to the contact",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "202": {
            "description": "Code sent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/contacts/{id}/verify/confirm": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "contacts"
        ],
        "summary": "Confirm a contact with the code that was sent",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 16
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/mfa": {
      "get": {
        "tags": [
          "mfa"
        ],
        "summary": "The caller's enrolled second factors + preferred method",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Factor status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "sms",
                    "totp",
                    "webauthn",
                    "totpPending",
                    "recoveryRemaining",
                    "preferredMethod"
                  ],
                  "properties": {
                    "sms": {
                      "type": "boolean"
                    },
                    "totp": {
                      "type": "boolean"
                    },
                    "webauthn": {
                      "type": "boolean"
                    },
                    "totpPending": {
                      "type": "boolean",
                      "description": "A TOTP enrollment awaits confirmation"
                    },
                    "recoveryRemaining": {
                      "type": "integer",
                      "description": "Unused recovery codes"
                    },
                    "preferredMethod": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "sms",
                        "totp",
                        "webauthn",
                        null
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/mfa/preference": {
      "get": {
        "tags": [
          "mfa"
        ],
        "summary": "The caller’s preferred 2FA method",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Preference",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preferredMethod"
                  ],
                  "properties": {
                    "preferredMethod": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "sms",
                        "totp",
                        "webauthn",
                        null
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "mfa"
        ],
        "summary": "Set the preferred 2FA method",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "method"
                ],
                "properties": {
                  "method": {
                    "type": "string",
                    "enum": [
                      "sms",
                      "totp",
                      "webauthn"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Preference",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preferredMethod"
                  ],
                  "properties": {
                    "preferredMethod": {
                      "type": "string",
                      "enum": [
                        "sms",
                        "totp",
                        "webauthn"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/mfa/recovery": {
      "get": {
        "tags": [
          "mfa"
        ],
        "summary": "How many unused recovery codes remain",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Remaining",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "remaining"
                  ],
                  "properties": {
                    "remaining": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/mfa/recovery/regenerate": {
      "post": {
        "tags": [
          "mfa"
        ],
        "summary": "Generate a fresh recovery-code set (invalidates the old one); shown once",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Plaintext recovery codes (returned once)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "codes"
                  ],
                  "properties": {
                    "codes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/mfa/totp/enroll": {
      "post": {
        "tags": [
          "mfa"
        ],
        "summary": "Begin TOTP enrollment → otpauth URI + secret (shown once)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Provisioning material",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "secret",
                    "otpauthUri"
                  ],
                  "properties": {
                    "secret": {
                      "type": "string",
                      "description": "Base32 secret (for manual entry)"
                    },
                    "otpauthUri": {
                      "type": "string",
                      "description": "otpauth:// URI to render as a QR code"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/mfa/totp/confirm": {
      "post": {
        "tags": [
          "mfa"
        ],
        "summary": "Confirm TOTP enrollment with a current code",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 16
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/mfa/totp": {
      "delete": {
        "tags": [
          "mfa"
        ],
        "summary": "Remove the enrolled authenticator",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "removed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/mfa/webauthn": {
      "get": {
        "tags": [
          "mfa"
        ],
        "summary": "The caller's registered passkeys / security keys",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Credentials",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "kind",
                          "createdAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "passkey",
                              "security_key"
                            ]
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "lastUsedAt": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/mfa/webauthn/register/options": {
      "post": {
        "tags": [
          "mfa"
        ],
        "summary": "Begin passkey/security-key registration → ceremony options + challenge token",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "passkey",
                      "security_key"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Creation options + signed challenge token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "options",
                    "token"
                  ],
                  "properties": {
                    "options": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "PublicKeyCredentialCreationOptionsJSON"
                    },
                    "token": {
                      "type": "string",
                      "description": "Signed registration challenge token"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/mfa/webauthn/register/verify": {
      "post": {
        "tags": [
          "mfa"
        ],
        "summary": "Complete passkey/security-key registration",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "response"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Registration challenge token"
                  },
                  "response": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "RegistrationResponseJSON"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/mfa/webauthn/{id}": {
      "delete": {
        "tags": [
          "mfa"
        ],
        "summary": "Remove a registered passkey / security key",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "removed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/privacy": {
      "get": {
        "tags": [
          "account"
        ],
        "summary": "List the caller's per-row privacy grants (optionally one target table)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "targetTable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The caller’s privacy grants",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PrivacyGrant"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "account"
        ],
        "summary": "Set one card row's audience (upsert; PUBLIC/HUB only, 0 = only-me)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "targetTable",
                  "targetId",
                  "audienceMask"
                ],
                "properties": {
                  "targetTable": {
                    "type": "string",
                    "enum": [
                      "avatar",
                      "social_links",
                      "addresses",
                      "contact_methods"
                    ]
                  },
                  "targetId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "audienceMask": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Bitmask of audiences: 1=PUBLIC, 2=HUB (or their OR, 3). 0 = only-me. TEAM/ORG/AI bits are rejected with 400."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored grant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivacyGrant"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects": {
      "parameters": [
        {
          "name": "workspace",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Scope to this WORKSPACE’s owning principal (the caller’s own customer slug, or an organization the caller belongs to): the list pins to rows the principal OWNS, and a create stamps it as the owner. Omitted: the caller’s reach (owned / org / participating). Unknown/foreign slug: 404."
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "List the projects in the caller's reach (non-deleted, oldest first)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Projects",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Project"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "project"
        ],
        "summary": "Create a project (seeds default statuses + a project.created activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "ecosystemId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36,
                    "description": "the owning ecosystem; defaulted to the caller ecosystem when omitted. A non-admin passing a foreign owner is rejected by RLS."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "Get a project",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "project"
        ],
        "summary": "Update a project (+ a project.updated activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "color": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "archivedAt": {
                    "type": "string",
                    "maxLength": 40,
                    "nullable": true,
                    "description": "an ISO timestamp archives; null un-archives"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "project"
        ],
        "summary": "Soft-delete a project (+ a project.deleted activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects/{id}/statuses": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "List a project's board columns (by position)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Statuses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProjectStatus"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "project"
        ],
        "summary": "Add a board column (+ a status.created activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "key",
                  "label",
                  "category"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "todo",
                      "in_progress",
                      "done"
                    ]
                  },
                  "position": {
                    "type": "integer",
                    "description": "explicit column order; defaults to append (max+1)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectStatus"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects/{id}/statuses/{statusId}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "statusId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "patch": {
        "tags": [
          "project"
        ],
        "summary": "Rename / recategorize / reorder a column (+ a status.updated activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "todo",
                      "in_progress",
                      "done"
                    ]
                  },
                  "position": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectStatus"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "project"
        ],
        "summary": "Remove a column (+ a status.deleted activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects/{id}/participants": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "List a project's participants (by addedAt)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Participants",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProjectParticipant"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "project"
        ],
        "summary": "Attach a customer / persona / team (+ a participant.added activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "participantKind",
                  "participantId"
                ],
                "properties": {
                  "participantKind": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "persona",
                      "team"
                    ]
                  },
                  "participantId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Added participant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectParticipant"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects/{id}/participants/{participantId}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "participantId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "project"
        ],
        "summary": "Detach a participant by (kind, entity-id) (+ a participant.removed activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects/{id}/fields": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "List a project's custom fields (by position)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Fields",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProjectField"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "project"
        ],
        "summary": "Add a custom field (+ a field.created activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "key",
                  "label",
                  "type"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "number",
                      "date",
                      "select",
                      "user",
                      "checkbox"
                    ]
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "required (non-empty) for a select field; omitted for every other type"
                  },
                  "position": {
                    "type": "integer",
                    "description": "explicit field order; defaults to append (max+1)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectField"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects/{id}/fields/{fieldId}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "fieldId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "patch": {
        "tags": [
          "project"
        ],
        "summary": "Relabel / retype / reorder a field (+ a field.updated activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "At least one mutable field is required (a no-op patch is a 400). `key` is immutable.",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "number",
                      "date",
                      "select",
                      "user",
                      "checkbox"
                    ]
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "nullable": true,
                    "description": "null clears the list; a select field requires a non-empty list on the effective (post-patch) type"
                  },
                  "position": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectField"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "project"
        ],
        "summary": "Remove a field (cascades its stored values; + a field.deleted activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects/{id}/work-items": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "List a project's work items (non-deleted, by position)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Work items",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkItem"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "project"
        ],
        "summary": "Create a work item (refs validated in-project; + a work_item.created activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "description": {
                    "type": "string"
                  },
                  "statusId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36,
                    "description": "must be a status of this project; defaults to the lowest-position column"
                  },
                  "assigneeKind": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "persona",
                      "team"
                    ]
                  },
                  "assigneeId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36,
                    "description": "set with assigneeKind (both or neither); must be a current participant"
                  },
                  "priority": {
                    "type": "integer"
                  },
                  "startDate": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "date (YYYY-MM-DD)"
                  },
                  "dueDate": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "date (YYYY-MM-DD)"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "parentId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36,
                    "description": "a live work item in the same project (not self)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created work item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkItem"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/work-items/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "Get a work item (authorized via its parent project)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Work item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkItem"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "project"
        ],
        "summary": "Update a work item (+ a work_item.status_changed | .assigned | .updated activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "At least one mutable field is required (a no-op patch is a 400).",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "description": {
                    "type": "string"
                  },
                  "statusId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  },
                  "assigneeKind": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "persona",
                      "team"
                    ],
                    "nullable": true,
                    "description": "null clears the assignee (with assigneeId)"
                  },
                  "assigneeId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36,
                    "nullable": true
                  },
                  "priority": {
                    "type": "integer"
                  },
                  "startDate": {
                    "type": "string",
                    "maxLength": 10,
                    "nullable": true
                  },
                  "dueDate": {
                    "type": "string",
                    "maxLength": 10,
                    "nullable": true
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "parentId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36,
                    "nullable": true,
                    "description": "null detaches the parent"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Work item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkItem"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "project"
        ],
        "summary": "Soft-delete a work item (+ a work_item.deleted activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/work-items/{id}/children": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "A work item's direct children (non-deleted, by position)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Child work items",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkItem"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/work-items/{id}/fields": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "A work item's field form (every project field ⟕ its stored value)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Field values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkItemFieldValue"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "project"
        ],
        "summary": "Set / clear a batch of field values (+ a work_item.fields_updated activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "values"
                ],
                "properties": {
                  "values": {
                    "type": "array",
                    "description": "a batch of set/clear operations, applied in payload order; ALL entries are validated before any write, so a bad entry fails the whole batch. An empty array is a legal no-op.",
                    "items": {
                      "type": "object",
                      "required": [
                        "fieldId",
                        "value"
                      ],
                      "properties": {
                        "fieldId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 36
                        },
                        "value": {
                          "nullable": true,
                          "description": "the value to store (must match the field's type), or null to clear it"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Field values (the reconciled form)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkItemFieldValue"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/work-items/{id}/dependencies": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "A work item's dependencies (joined to the depended-on item titles, by createdAt)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Dependencies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkItemDependency"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "project"
        ],
        "summary": "Add a dependency edge (+ a dependency.added activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "dependsOnId"
                ],
                "properties": {
                  "dependsOnId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36,
                    "description": "a live work item in the same project (not self; must not close a cycle)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created dependency edge",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "ecosystemId",
                    "workItemId",
                    "dependsOnId",
                    "createdAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ecosystemId": {
                      "type": "string"
                    },
                    "workItemId": {
                      "type": "string",
                      "description": "the dependent item (the path {id})"
                    },
                    "dependsOnId": {
                      "type": "string",
                      "description": "the work item it depends on"
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/work-items/{id}/dependencies/{dependsOnId}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "dependsOnId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "project"
        ],
        "summary": "Remove a dependency edge (+ a dependency.removed activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects/{id}/research": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "project"
        ],
        "summary": "Mark this project as research (idempotent)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Marked as research",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "projectId",
                    "research"
                  ],
                  "properties": {
                    "projectId": {
                      "type": "string"
                    },
                    "research": {
                      "type": "boolean",
                      "description": "always true on success"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "project"
        ],
        "summary": "Un-mark this project as research",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Un-marked"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects/{id}/artifacts": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "List a project's artifacts (newest first), optionally filtered by direction",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ingested",
                "produced"
              ]
            },
            "description": "Filter to ingested | produced; omitted (or any other value) returns both."
          }
        ],
        "responses": {
          "200": {
            "description": "Artifacts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProjectArtifact"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "project"
        ],
        "summary": "Link an ingested / produced artifact (idempotent on direction + target)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "direction",
                  "targetKind",
                  "targetId"
                ],
                "properties": {
                  "direction": {
                    "type": "string",
                    "enum": [
                      "ingested",
                      "produced"
                    ]
                  },
                  "targetKind": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "the target's registry, e.g. 'content.markdown'"
                  },
                  "targetId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Linked artifact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectArtifact"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects/{id}/artifacts/{artifactId}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "artifactId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "project"
        ],
        "summary": "Un-link an artifact (soft delete; the target can be re-linked)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Un-linked"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/projects/{id}/activity": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "A project's activity trail (newest first, keyset-paginated)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "beforeId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Activity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProjectActivity"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/work-items/{id}/activity": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "A work item's activity trail (newest first, keyset-paginated)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "beforeId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Activity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProjectActivity"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/work-items/{id}/comments": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "project"
        ],
        "summary": "Append a comment to a work item (a comment.added activity)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created comment (activity row)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectActivity"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona-memory/global": {
      "post": {
        "tags": [
          "persona"
        ],
        "summary": "Create a global (persona-scope) memory",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "personaId",
                  "slug",
                  "memoryType",
                  "description",
                  "body"
                ],
                "properties": {
                  "personaId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "memoryType": {
                    "type": "string",
                    "enum": [
                      "user",
                      "feedback",
                      "project",
                      "reference"
                    ]
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1
                  },
                  "subjectTable": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "subjectId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "inferred",
                      "user_stated",
                      "tool"
                    ]
                  },
                  "confidence": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created global memory",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaMemory"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona-memory/recall": {
      "post": {
        "tags": [
          "persona"
        ],
        "summary": "Semantic recall of a persona’s memories (KNN)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "personaId",
                  "query"
                ],
                "properties": {
                  "personaId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  },
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "memoryType": {
                    "type": "string",
                    "enum": [
                      "user",
                      "feedback",
                      "project",
                      "reference"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ranked memory matches",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaMemoryRecallResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona-memory/embed-pending": {
      "post": {
        "tags": [
          "persona"
        ],
        "summary": "Backfill embeddings for pending memories",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "personaId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Backfill batch result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaMemoryEmbedResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/services": {
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "List the caller's LLM provider connections",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Persona services (redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PersonaService"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "persona"
        ],
        "summary": "Create an LLM provider connection",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "providerKind",
                  "baseUrl"
                ],
                "properties": {
                  "templateId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "providerKind": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "gemini"
                    ]
                  },
                  "baseUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "apiKey": {
                    "type": "string",
                    "description": "Plaintext provider key; stored, never returned"
                  },
                  "connectionSpec": {
                    "$ref": "#/components/schemas/ProviderConnectionSpec"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Persona service (redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaService"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/services/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "Get an LLM provider connection by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Persona service (redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaService"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "persona"
        ],
        "summary": "Update an LLM provider connection",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "baseUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "apiKey": {
                    "type": "string",
                    "description": "Plaintext provider key; stored, never returned"
                  },
                  "connectionSpec": {
                    "$ref": "#/components/schemas/ProviderConnectionSpec"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Persona service (redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaService"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "persona"
        ],
        "summary": "Delete an LLM provider connection",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/services/{id}/connect": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "persona"
        ],
        "summary": "Test the connection — probe the provider, persist status + cache the catalog",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Persona service (redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaService"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/services/{id}/models": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "Live provider model catalog — fetched fresh, not persisted",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Live provider model catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PersonaServiceModel"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/services/{id}/models/refresh": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "persona"
        ],
        "summary": "Re-fetch + persist the provider catalog (probes the provider, like connect)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Persona service (redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaService"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/provider-templates": {
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "List/search LLM provider templates (public; ?q= substring on name/kind, ?providerKind= exact, paginated)",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "providerKind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Provider templates with their models",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderTemplateList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "persona"
        ],
        "summary": "Create a provider template with its models in one call (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "providerKind",
                  "name",
                  "baseUrl"
                ],
                "properties": {
                  "providerKind": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "gemini"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "baseUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "documentationUrl": {
                    "type": "string",
                    "maxLength": 500,
                    "nullable": true
                  },
                  "statusUrl": {
                    "type": "string",
                    "maxLength": 500,
                    "nullable": true
                  },
                  "connectionSpec": {
                    "$ref": "#/components/schemas/ProviderConnectionSpec"
                  },
                  "models": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "description": "Model names. On create: the initial model list. On update: the FULL desired set (matching rows kept, missing inserted, absent deleted); omit to leave models unchanged."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderTemplate"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/provider-templates/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "One provider template with its models (public)",
        "responses": {
          "200": {
            "description": "Provider template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderTemplate"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "persona"
        ],
        "summary": "Update a provider template; optional full model-set sync (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerKind": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "anthropic",
                      "gemini"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "baseUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "documentationUrl": {
                    "type": "string",
                    "maxLength": 500,
                    "nullable": true
                  },
                  "statusUrl": {
                    "type": "string",
                    "maxLength": 500,
                    "nullable": true
                  },
                  "connectionSpec": {
                    "$ref": "#/components/schemas/ProviderConnectionSpec"
                  },
                  "models": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "description": "Model names. On create: the initial model list. On update: the FULL desired set (matching rows kept, missing inserted, absent deleted); omit to leave models unchanged."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderTemplate"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "persona"
        ],
        "summary": "Delete a provider template and its models (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/provider-templates/{id}/verify": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "persona"
        ],
        "summary": "Probe the live provider with a caller-supplied key — never stored — to verify kind/baseUrl speak the claimed contract (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "apiKey"
                ],
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Used for this one probe request only; not persisted."
                  },
                  "baseUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Optional base_url override for the probe — supply a concrete URL to verify a template whose stored base_url still carries url-var placeholders."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Probe outcome (a failed probe is ok:false, not an error status)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderTemplateVerifyResult"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/personas/{slug}": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get a public persona by slug (oldest match)",
        "responses": {
          "200": {
            "description": "Public persona",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPersona"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/personas/{slug}/sheet": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get a public persona's gamification character sheet",
        "responses": {
          "200": {
            "description": "Persona character sheet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaSheet"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/personas/{slug}/recap": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get a public persona's weekly gamification recap (surface-gated)",
        "responses": {
          "200": {
            "description": "Persona weekly recap",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonaWeeklyRecap"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/boards/{statKey}": {
      "parameters": [
        {
          "name": "statKey",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Public hub leaderboard for one boardable stat (surface-gated)",
        "parameters": [
          {
            "name": "window",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "rolling30",
                "allTime",
                "trending",
                "season"
              ],
              "default": "trending"
            },
            "description": "Ranking window (absent → trending). `season` ranks the hub realm’s current season; empty when the hub has no season config."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked board of public personas",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationBoard"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/boards/{statKey}/leagues": {
      "parameters": [
        {
          "name": "statKey",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Public hub league cohort of the current season board (surface-gated)",
        "parameters": [
          {
            "name": "league",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Zero-based league cohort of the current season board (30 ranks each, by season standing; absent → 0). Entries keep their GLOBAL season rank; empty when the hub has no season config."
          }
        ],
        "responses": {
          "200": {
            "description": "One league cohort of public personas",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamificationLeague"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/users/{ownerSlug}/personas/{personaSlug}": {
      "parameters": [
        {
          "name": "ownerSlug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "personaSlug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get a public persona scoped to its owner",
        "responses": {
          "200": {
            "description": "Public persona",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPersona"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/users/search": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Search public-profile users by slug or display name",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching public users (max 20)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicUserSearchHit"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/public/users/{slug}": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get a public user profile card and its public personas",
        "responses": {
          "200": {
            "description": "Public user profile card",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicUserProfile"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/users/{slug}/sheet": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get a user's creator gamification character sheet",
        "responses": {
          "200": {
            "description": "Creator character sheet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectSheet"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/orgs/{slug}/sheet": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get an organization's member-aggregate gamification character sheet",
        "responses": {
          "200": {
            "description": "Organization character sheet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgSheet"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/users/{slug}/papers": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "public"
        ],
        "summary": "List an author's published papers (metadata only)",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Free-text query matched across title, body, category, and tags."
          }
        ],
        "responses": {
          "200": {
            "description": "Published papers (metadata only), newest-updated first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PublicPaperSummary"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/users/{slug}/papers/{route}": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "route",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get a published paper by (author slug, route)",
        "responses": {
          "200": {
            "description": "The published paper (with content)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPaper"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/papers": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Search published papers across ALL authors (metadata + snippet)",
        "description": "Cross-author search over PUBLISHED, non-deleted markdown. `q` is a case-insensitive substring matched across title, body, category name, and tag labels; `tag` and `category` are exact-match filters. Each hit carries author attribution, the public route, classification, and a ~200-char match-context snippet — never the full body.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Free-text query matched across title, body, category, and tags."
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Restrict to papers whose tag set contains this exact tag."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Restrict to papers with this exact category."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of cross-author paper hits, newest-updated first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total",
                    "page",
                    "pageSize"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PublicPaperSearchHit"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/public/papers/tags": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Distinct tag labels used by published papers (cross-author facet source)",
        "responses": {
          "200": {
            "description": "Distinct tag labels, sorted alphabetically",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringList"
                }
              }
            }
          }
        }
      }
    },
    "/public/papers/categories": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Distinct category names used by published papers (cross-author facet source)",
        "responses": {
          "200": {
            "description": "Distinct category names, sorted alphabetically",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringList"
                }
              }
            }
          }
        }
      }
    },
    "/users/{slug}": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get a user card as a signed-in viewer (HUB + PUBLIC rows)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "User profile card (HUB + PUBLIC rows)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicUserProfile"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/registry/identifiers": {
      "post": {
        "tags": [
          "registry"
        ],
        "summary": "Create an rdid -> entity mapping",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rdid",
                  "entityType",
                  "entityId"
                ],
                "properties": {
                  "rdid": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "entityType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "entityId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "mapping",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryIdentifier"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/registry/identifiers/{rdid}": {
      "parameters": [
        {
          "name": "rdid",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "registry"
        ],
        "summary": "Resolve an rdid -> entity",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "mapping",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryIdentifier"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "registry"
        ],
        "summary": "Rename an rdid (entity/uuid unchanged)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rdid"
                ],
                "properties": {
                  "rdid": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "mapping",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryIdentifier"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "registry"
        ],
        "summary": "Delete an rdid mapping (creator-only)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/registry/identifiers/{rdid}/exists": {
      "parameters": [
        {
          "name": "rdid",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "registry"
        ],
        "summary": "Check whether an rdid is taken (never 404)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "existence",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "exists"
                  ],
                  "properties": {
                    "exists": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/personas/approvals": {
      "get": {
        "tags": [
          "registry"
        ],
        "summary": "List the persona-action approvals the caller may decide",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "the decidable approvals (newest first)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "approvals"
                  ],
                  "properties": {
                    "approvals": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RegistryPersonaApproval"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/personas/approvals/{id}/approve": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "registry"
        ],
        "summary": "Approve a parked action — runs it in the original acting context",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "the decided approval (with the captured result)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "approval"
                  ],
                  "properties": {
                    "approval": {
                      "$ref": "#/components/schemas/RegistryPersonaApproval"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/processing/personas/approvals/{id}/reject": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "registry"
        ],
        "summary": "Reject a parked action — no execution",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "the rejected approval",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "approval"
                  ],
                  "properties": {
                    "approval": {
                      "$ref": "#/components/schemas/RegistryPersonaApproval"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organization/organizations": {
      "post": {
        "tags": [
          "registry"
        ],
        "summary": "Create + provision an organization and its ownership chain",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "slug",
                  "name"
                ],
                "properties": {
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "defaultEcosystemSlug": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$",
                    "default": "default"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "provisioned organization (org + namespace + admin team + ecosystem)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryProvisionedOrganization"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organization/organizations/{key}": {
      "parameters": [
        {
          "name": "key",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "registry"
        ],
        "summary": "Resolve an organization by UUID, slug, or rdid",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryOrganization"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organization/organizations/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "patch": {
        "tags": [
          "registry"
        ],
        "summary": "Update an organization (name/description: org-team admin or site-admin; slug: site-admin only — re-mints the global rdids)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "At least one of name, slug, or description is required.",
                "minProperties": 1,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9_-]{1,63}$"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryOrganization"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "registry"
        ],
        "summary": "Soft-delete an organization + free its rdid (site-admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/namespaces": {
      "post": {
        "tags": [
          "registry"
        ],
        "summary": "Create a namespace + mint its rdid (site-admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ownerKind",
                  "ownerId",
                  "rdid"
                ],
                "properties": {
                  "ownerKind": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "organization",
                      "persona",
                      "ecosystem"
                    ]
                  },
                  "ownerId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  },
                  "rdid": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Reverse-domain prefix"
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9_-]{1,63}$"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "namespace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryNamespace"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/namespaces/{key}": {
      "parameters": [
        {
          "name": "key",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "registry"
        ],
        "summary": "Resolve a namespace by UUID or rdid",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "namespace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryNamespace"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/namespaces/{id}/ecosystems": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "registry"
        ],
        "summary": "Create an ecosystem under a namespace (site-admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "slug",
                  "name"
                ],
                "properties": {
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9_-]{1,63}$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "rdid": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Override; defaults to <namespace-prefix>.<slug>"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "ecosystem",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryEcosystem"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/namespaces/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "patch": {
        "tags": [
          "registry"
        ],
        "summary": "Update a namespace handle/label (site-admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "At least one of name or slug is required.",
                "minProperties": 1,
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9_-]{1,63}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "namespace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryNamespaceUpdate"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "registry"
        ],
        "summary": "Soft-delete a namespace + free its rdid (site-admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/personas/{id}/tokens": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "registry"
        ],
        "summary": "List a persona's API tokens (metadata only; raw values never returned)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "the persona's outstanding tokens (metadata only, newest first)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tokens"
                  ],
                  "properties": {
                    "tokens": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RegistryPersonaToken"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "registry"
        ],
        "summary": "Mint a scoped API token that lets the persona act (raw value shown once)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "subject"
                ],
                "properties": {
                  "subject": {
                    "type": "object",
                    "required": [
                      "kind"
                    ],
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "self",
                          "user",
                          "team",
                          "org"
                        ],
                        "description": "`self` (owner-gated) or `user` (the caller lets the persona act AS themselves, gated on the persona’s `may_act user` opt-in) or `team` (owner-gated; the persona acts AS the team `id` in the target `ecosystemId`, gated on `may_act team` + persona team-membership + the team’s reach into that ecosystem). `org` → 400 (not yet supported)."
                      },
                      "id": {
                        "type": "string",
                        "description": "The team id for a `team` subject (required for `team`). Ignored for `self` (derived from the persona) and `user` (always the authenticated caller, never a param)."
                      },
                      "ecosystemId": {
                        "type": "string",
                        "description": "The TARGET ecosystem a `team` subject acts in (required for `team`); ignored for the other kinds."
                      }
                    }
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true,
                    "description": "Omitted/null defaults to a bounded 90-day TTL (never a non-expiring token); an explicit value is honored."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "the minted token metadata + its raw value (shown once)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryPersonaTokenCreated"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/personas/{id}/tokens/{tokenId}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "tokenId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "registry"
        ],
        "summary": "Revoke one of the persona's tokens — the explicit kill switch (scoped to this persona)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "revoked"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/mcp-servers": {
      "get": {
        "tags": [
          "registry"
        ],
        "summary": "List registered third-party MCP servers, secrets redacted (site-admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "the registered servers (newest first, secrets redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "servers"
                  ],
                  "properties": {
                    "servers": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RegistryAgentMcpServer"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "registry"
        ],
        "summary": "Register a new third-party MCP server (site-admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "slug",
                  "name",
                  "url"
                ],
                "properties": {
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[a-z0-9][a-z0-9-]*$",
                    "description": "The globally-unique `<server>` handle in `mcp.<server>.<tool>`"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "url": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "The remote MCP server's http(s) endpoint URL"
                  },
                  "authSecret": {
                    "type": "string",
                    "description": "Optional per-server bearer secret; stored encrypted, never returned"
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": false,
                    "description": "Opt-in; defaults to disabled (contributes no tools until enabled)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "the registered server (secret redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "server"
                  ],
                  "properties": {
                    "server": {
                      "$ref": "#/components/schemas/RegistryAgentMcpServer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/mcp-servers/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "registry"
        ],
        "summary": "Get one third-party MCP server, secret redacted (site-admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "the server (secret redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "server"
                  ],
                  "properties": {
                    "server": {
                      "$ref": "#/components/schemas/RegistryAgentMcpServer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "registry"
        ],
        "summary": "Update / enable / disable / rotate the secret of an MCP server (site-admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "All fields optional. A blank or absent authSecret PRESERVES the stored secret; a present non-empty value rotates it.",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "url": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "authSecret": {
                    "type": "string",
                    "description": "Blank/absent preserves the stored secret; a non-empty value rotates it"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "the updated server (secret redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "server"
                  ],
                  "properties": {
                    "server": {
                      "$ref": "#/components/schemas/RegistryAgentMcpServer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "registry"
        ],
        "summary": "Soft-delete a third-party MCP server (site-admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "deleted (soft delete; the source stops surfacing its tools)"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/search/discussions": {
      "get": {
        "tags": [
          "search"
        ],
        "summary": "Search discussions — topics by title, posts by body (via content.markdown)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "topics",
                "posts"
              ]
            },
            "description": "Restrict to one collection; omit to search both."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching topics and posts (ranked), with per-collection paging",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "topics",
                    "posts",
                    "page",
                    "pageSize",
                    "topicsHasMore",
                    "postsHasMore"
                  ],
                  "properties": {
                    "topics": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SearchDiscussionTopicResult"
                      }
                    },
                    "posts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SearchDiscussionPostResult"
                      }
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    },
                    "topicsHasMore": {
                      "type": "boolean"
                    },
                    "postsHasMore": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/search/documents": {
      "get": {
        "tags": [
          "search"
        ],
        "summary": "Full-text search the caller's document blocks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching document blocks (ranked) with a plain-text snippet",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results",
                    "limit",
                    "hasMore"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SearchDocumentResult"
                      }
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/search/notes": {
      "get": {
        "tags": [
          "search"
        ],
        "summary": "Full-text search the caller's notes (markdown body)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching notes, most-recently-updated first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results",
                    "limit"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SearchNoteResult"
                      }
                    },
                    "limit": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/feed": {
      "get": {
        "tags": [
          "personal"
        ],
        "summary": "List the caller's activity feed (filterable, paginated)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "entityType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unread",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Feed page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedPage"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/feed/unread-count": {
      "get": {
        "tags": [
          "personal"
        ],
        "summary": "Count the caller’s unread feed entries",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Unread count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedUnreadCount"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/feed/read-all": {
      "post": {
        "tags": [
          "personal"
        ],
        "summary": "Mark all of the caller’s feed entries as read",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Number marked read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedReadAllResult"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/feed/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "personal"
        ],
        "summary": "Get one of the caller’s feed entries",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Feed entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedItem"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "personal"
        ],
        "summary": "Delete one of the caller’s feed entries",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/feed/{id}/read": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "personal"
        ],
        "summary": "Mark one of the caller’s feed entries as read",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Marked read"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/system/feature-flags": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "List feature flags (public; optional ?scope=system and ?key= exact-match filter)",
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "description": "By default the response unions the hub ecosystem's PRODUCT flags (hub rows are projected with id: 0) with the site-wide system.feature_flags rows. `scope=system` returns ONLY the system.feature_flags rows — the admin management view, which edits by serial id and must not receive the id-less hub-product rows.",
            "schema": {
              "type": "string",
              "enum": [
                "system"
              ]
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Feature flags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FeatureFlag"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "system"
        ],
        "summary": "Create a feature flag (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "key"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1024
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created flag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureFlag"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/system/feature-flags/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "system"
        ],
        "summary": "Update a feature flag (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1024
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated flag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureFlag"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "system"
        ],
        "summary": "Delete a feature flag (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/system/server-bag": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "List server-bag entries (public; optional ?key= exact-match filter)",
        "parameters": [
          {
            "name": "key",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Server bag entries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ServerBag"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "system"
        ],
        "summary": "Create a server-bag entry (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "key",
                  "value"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "value": {
                    "description": "Arbitrary JSON value"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1024
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerBag"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/system/server-bag/{key}": {
      "parameters": [
        {
          "name": "key",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "system"
        ],
        "summary": "Update a server-bag entry (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "description": "Arbitrary JSON value"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1024
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerBag"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "system"
        ],
        "summary": "Delete a server-bag entry (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/system/access-audit": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "Admin-only, cross-workspace access-audit trail (paginated, newest first)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Audit page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessAuditPage"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/system/debug-env": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "Env vars the backend reads (local-only, masked; 404 on deployed envs)",
        "responses": {
          "200": {
            "description": "Masked env entries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "entries"
                  ],
                  "properties": {
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "value",
                          "secret"
                        ],
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string",
                            "description": "Masked when secret"
                          },
                          "secret": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/team/members": {
      "get": {
        "tags": [
          "team"
        ],
        "summary": "List a team's members (email-resolved)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Members",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMemberList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "team"
        ],
        "summary": "Add a member to a team by email",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "teamId",
                  "email"
                ],
                "properties": {
                  "teamId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 255
                  },
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Added member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMember"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/team/members/personas": {
      "post": {
        "tags": [
          "team"
        ],
        "summary": "Add a persona to a team (requires the persona may act via teams)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "teamId",
                  "personaKey"
                ],
                "properties": {
                  "teamId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  },
                  "personaKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "the persona addressed by its registry key: uuid, persona rdid, or owned-namespace rdid"
                  },
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Added persona member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMember"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/team/members/counts": {
      "get": {
        "tags": [
          "team"
        ],
        "summary": "Member count per team in scope (the All-teams landing)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Counts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMemberCounts"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/team/members/{id}": {
      "delete": {
        "tags": [
          "team"
        ],
        "summary": "Remove a member from a team",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/roles": {
      "get": {
        "tags": [
          "access"
        ],
        "summary": "List a workspace's roles with their per-feature grants",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "workspace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Roles",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRoleList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "access"
        ],
        "summary": "Create a custom role (workspace admins; ≤20 live custom roles)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "workspace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "slug",
                  "name",
                  "grants"
                ],
                "properties": {
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[a-z0-9][a-z0-9-]*$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "defaultFor": {
                    "type": "string",
                    "enum": [
                      "",
                      "customer",
                      "persona"
                    ]
                  },
                  "grants": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/AccessGrant"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRoleEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/roles/{id}": {
      "patch": {
        "tags": [
          "access"
        ],
        "summary": "Edit a role (name/description/default/grants; the system admin role is immutable)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "defaultFor": {
                    "type": "string",
                    "enum": [
                      "",
                      "customer",
                      "persona"
                    ]
                  },
                  "grants": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/AccessGrant"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRoleEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "access"
        ],
        "summary": "Soft-delete a custom role (refused while assignments still reference it)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/assignments": {
      "get": {
        "tags": [
          "access"
        ],
        "summary": "List assignments (workspace-wide for admins; per-item for M holders)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "workspace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "feature",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Assignments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessAssignmentList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "access"
        ],
        "summary": "Grant (or replace) a role for a subject at a scope — requires M + no-escalation",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "workspace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "subjectKind",
                  "subjectId",
                  "roleId"
                ],
                "properties": {
                  "subjectKind": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "persona",
                      "team"
                    ]
                  },
                  "subjectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  },
                  "feature": {
                    "type": "string",
                    "description": "with itemId: scope the grant to one item"
                  },
                  "itemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "roleId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replaced assignment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessAssignmentEnvelope"
                }
              }
            }
          },
          "201": {
            "description": "Created assignment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessAssignmentEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/assignments/{id}": {
      "delete": {
        "tags": [
          "access"
        ],
        "summary": "Revoke an assignment (requires M at its scope)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Revoked"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/items/restrict": {
      "post": {
        "tags": [
          "access"
        ],
        "summary": "Mark an item RESTRICTED (workspace-scope grants stop applying to it)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "workspace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "feature",
                  "itemId"
                ],
                "properties": {
                  "feature": {
                    "type": "string"
                  },
                  "itemId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Restriction state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRestriction"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/items/restore": {
      "post": {
        "tags": [
          "access"
        ],
        "summary": "Restore an item to inherited access (deletes its restriction row)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "workspace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "feature",
                  "itemId"
                ],
                "properties": {
                  "feature": {
                    "type": "string"
                  },
                  "itemId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Restriction state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRestriction"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/effective": {
      "get": {
        "tags": [
          "access"
        ],
        "summary": "A subject's effective verbs + provenance (the explainer; requires M)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "workspace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "feature",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectKind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Effective access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessEffective"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/personas/{id}/tools": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "registry"
        ],
        "summary": "List a persona's grantable tool catalog + each tool's grant/autonomy state",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "the grantable tool catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tools"
                  ],
                  "properties": {
                    "tools": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RegistryPersonaToolCatalogItem"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "registry"
        ],
        "summary": "Grant a tool to a persona (owner/admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "toolName"
                ],
                "properties": {
                  "toolName": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "the granted tool",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tool"
                  ],
                  "properties": {
                    "tool": {
                      "$ref": "#/components/schemas/RegistryPersonaToolCatalogItem"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/personas/{id}/tools/{toolName}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "toolName",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "patch": {
        "tags": [
          "registry"
        ],
        "summary": "Set a tool grant's autonomy flag (404 if the tool isn't granted)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "autonomous"
                ],
                "properties": {
                  "autonomous": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "the updated grant",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tool"
                  ],
                  "properties": {
                    "tool": {
                      "$ref": "#/components/schemas/RegistryPersonaToolGrant"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "registry"
        ],
        "summary": "Revoke a tool from a persona (owner/admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "revoked (idempotent)"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/personas/user-actable": {
      "get": {
        "tags": [
          "registry"
        ],
        "summary": "List the personas the caller may configure per-tool toggles for (may_act user)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "the personas that may act for users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "personas"
                  ],
                  "properties": {
                    "personas": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RegistryUserActablePersona"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/personas/{id}/user-tools": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "registry"
        ],
        "summary": "List a persona's owner-granted tools + the caller's own per-tool allow toggle",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "the persona's granted tools annotated with the caller's toggle",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tools"
                  ],
                  "properties": {
                    "tools": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RegistryPersonaUserTool"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "registry"
        ],
        "summary": "Replace the caller's allowed-tool set for this persona (all-on / all-off / per-tool)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "allowed"
                ],
                "properties": {
                  "allowed": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "the tools the caller allows the persona to invoke for them; every name must be one of the persona's owner-granted tools (400 otherwise). [] clears; all names = all-on."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "the updated per-user tool view",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tools"
                  ],
                  "properties": {
                    "tools": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RegistryPersonaUserTool"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/personas/{id}/may-act": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "registry"
        ],
        "summary": "List the subject kinds a persona may act for (always includes seeded 'self')",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "the granted subject kinds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryPersonaMayAct"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "registry"
        ],
        "summary": "Grant a may_act subject kind (user/team/org) to a persona (owner/admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "user",
                      "team",
                      "org"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "the granted subject kinds after the grant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryPersonaMayAct"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/personas/{id}/may-act/{kind}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "kind",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "delete": {
        "tags": [
          "registry"
        ],
        "summary": "Revoke a may_act subject kind (user/team/org) from a persona; 'self' → 400",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "revoked (idempotent)"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/storage/uploads": {
      "post": {
        "tags": [
          "storage"
        ],
        "summary": "Begin an upload: reserve an attachment + presigned PUT URL",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "filename",
                  "contentType"
                ],
                "properties": {
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "contentType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "ownerType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32,
                    "description": "Polymorphic owner kind (defaults to 'standalone')."
                  },
                  "ecosystemId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36,
                    "nullable": true
                  },
                  "sizeBytes": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Declared size; enforced against the storage quota at init."
                  },
                  "contentHash": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "When it matches an existing ready object, the upload is deduplicated."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deduplicated — an identical object already exists; no new upload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageDeduplicated"
                }
              }
            }
          },
          "201": {
            "description": "Pending attachment + presigned PUT URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoragePresignedUpload"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Storage quota exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageQuotaExceeded"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "storage"
        ],
        "summary": "List the caller's attachments (newest first)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StorageAttachment"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/storage/uploads/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "storage"
        ],
        "summary": "Get one of the caller's attachments by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageAttachment"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "storage"
        ],
        "summary": "Delete an attachment (removes the R2 object, then the row)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/storage/uploads/{id}/complete": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "tags": [
          "storage"
        ],
        "summary": "Confirm an upload completed → mark the attachment ready",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Finalized (ready) attachment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageAttachmentEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/storage/downloads/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "storage"
        ],
        "summary": "Get a presigned download URL for an attachment",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Presigned download URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageDownload"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sync/pull": {
      "get": {
        "summary": "Delta-pull all changed rows for the caller across sync-registered resources",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max changes to return. Clamped server-side to 1..1000 regardless of the value supplied (non-finite or omitted values fall back to the default). Default 500.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Changes since the cursor, ordered by syncVersion",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncPullResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sync/push": {
      "post": {
        "summary": "Idempotent batch apply of offline mutations (LWW, delete-wins)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncPushRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-op results + watermark",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncPushResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/public/themes": {
      "get": {
        "tags": [
          "themes"
        ],
        "summary": "List every live theme (suite-wide; empty in production)",
        "responses": {
          "200": {
            "description": "Live themes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Theme"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/public/themes/{key}": {
      "parameters": [
        {
          "name": "key",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "themes"
        ],
        "summary": "Get one live theme by key",
        "responses": {
          "200": {
            "description": "A theme",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Theme"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/themes": {
      "post": {
        "tags": [
          "themes"
        ],
        "summary": "Create a live theme (staging/testing only)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "key",
                  "label",
                  "data"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "DNS-ish slug, unique among live themes"
                  },
                  "label": {
                    "type": "string"
                  },
                  "basedOn": {
                    "type": "string",
                    "nullable": true,
                    "description": "the seed theme key this derives from"
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created theme",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Theme"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/themes/{key}": {
      "parameters": [
        {
          "name": "key",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "tags": [
          "themes"
        ],
        "summary": "Update a live theme (staging/testing only)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "basedOn": {
                    "type": "string",
                    "nullable": true
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated theme",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Theme"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "themes"
        ],
        "summary": "Soft-delete a live theme (staging/testing only)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/usage/storage": {
      "get": {
        "tags": [
          "usage"
        ],
        "summary": "Get the caller's storage quota + current usage",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Quota summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageStorageQuota"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/usage/storage/{userId}": {
      "parameters": [
        {
          "name": "userId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "usage"
        ],
        "summary": "Get a user's storage quota + usage (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Quota summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageStorageQuota"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "usage"
        ],
        "summary": "Set a user's storage quota override (admin)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "quotaBytes"
                ],
                "properties": {
                  "quotaBytes": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "New quota in bytes (non-negative)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upserted quota override row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageStorageQuotaRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/workspaces": {
      "get": {
        "summary": "List the caller's workspaces (individual first, then orgs, then teams)",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The caller workspaces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Workspace"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/workspaces/{slug}/members": {
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "summary": "An organization workspace's roster: the distinct customers across the org's org-owned teams",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The organization members",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "members"
                  ],
                  "properties": {
                    "members": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkspaceMember"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/team-permissions": {
      "get": {
        "tags": [
          "access"
        ],
        "summary": "List team_permissions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "teamId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "permission": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "grantedBy": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "grantedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "teamId",
                      "permission",
                      "grantedBy",
                      "grantedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "access"
        ],
        "summary": "Create team_permissions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "teamId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "permission": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "grantedAt": {
                    "type": "string"
                  }
                },
                "required": [
                  "teamId",
                  "permission",
                  "grantedAt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "team_permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "permission": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "grantedBy": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "grantedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "teamId",
                    "permission",
                    "grantedBy",
                    "grantedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/access/team-permissions/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "access"
        ],
        "summary": "Get team_permissions by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "team_permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "permission": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "grantedBy": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "grantedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "teamId",
                    "permission",
                    "grantedBy",
                    "grantedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "access"
        ],
        "summary": "Update team_permissions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "teamId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "permission": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "grantedAt": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "team_permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "teamId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "permission": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "grantedBy": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "grantedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "teamId",
                    "permission",
                    "grantedBy",
                    "grantedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "access"
        ],
        "summary": "Delete team_permissions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/billing/subscription-tiers": {
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "List subscription_tiers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "key": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "description": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "displayOrder": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "isActive": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "key",
                      "name",
                      "description",
                      "displayOrder",
                      "isActive",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "billing"
        ],
        "summary": "Create subscription_tiers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "displayOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "key",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "subscription_tiers",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "key": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "displayOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "isActive": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "key",
                    "name",
                    "description",
                    "displayOrder",
                    "isActive",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/billing/subscription-tiers/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "Get subscription_tiers by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "subscription_tiers",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "key": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "displayOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "isActive": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "key",
                    "name",
                    "description",
                    "displayOrder",
                    "isActive",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "billing"
        ],
        "summary": "Update subscription_tiers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "displayOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "subscription_tiers",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "key": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "displayOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "isActive": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "key",
                    "name",
                    "description",
                    "displayOrder",
                    "isActive",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "billing"
        ],
        "summary": "Delete subscription_tiers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/billing/subscriptions": {
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "List subscriptions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "userId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "tierId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "status": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "source": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "startedAt": {
                        "type": "string"
                      },
                      "expiresAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "assignedBy": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "userId",
                      "ecosystemId",
                      "tierId",
                      "status",
                      "source",
                      "startedAt",
                      "expiresAt",
                      "assignedBy",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "billing"
        ],
        "summary": "Create subscriptions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "tierId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "source": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "startedAt": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "tierId",
                  "startedAt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "subscriptions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "tierId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "source": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "startedAt": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "assignedBy": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "ecosystemId",
                    "tierId",
                    "status",
                    "source",
                    "startedAt",
                    "expiresAt",
                    "assignedBy",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/billing/subscriptions/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "Get subscriptions by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "subscriptions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "tierId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "source": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "startedAt": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "assignedBy": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "ecosystemId",
                    "tierId",
                    "status",
                    "source",
                    "startedAt",
                    "expiresAt",
                    "assignedBy",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "billing"
        ],
        "summary": "Update subscriptions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "tierId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "source": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "startedAt": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "subscriptions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "tierId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "source": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "startedAt": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "assignedBy": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "ecosystemId",
                    "tierId",
                    "status",
                    "source",
                    "startedAt",
                    "expiresAt",
                    "assignedBy",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "billing"
        ],
        "summary": "Delete subscriptions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/billing/tier-entitlements": {
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "List tier_entitlements",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "tierId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "entitlementKey": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "valueType": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "value": {
                        "type": "string",
                        "maxLength": 64
                      }
                    },
                    "required": [
                      "id",
                      "tierId",
                      "entitlementKey",
                      "valueType",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "billing"
        ],
        "summary": "Create tier_entitlements",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "tierId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "entitlementKey": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "valueType": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "value": {
                    "type": "string",
                    "maxLength": 64
                  }
                },
                "required": [
                  "tierId",
                  "entitlementKey",
                  "valueType",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "tier_entitlements",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "tierId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "entitlementKey": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "valueType": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "value": {
                      "type": "string",
                      "maxLength": 64
                    }
                  },
                  "required": [
                    "id",
                    "tierId",
                    "entitlementKey",
                    "valueType",
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/billing/tier-entitlements/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "Get tier_entitlements by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "tier_entitlements",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "tierId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "entitlementKey": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "valueType": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "value": {
                      "type": "string",
                      "maxLength": 64
                    }
                  },
                  "required": [
                    "id",
                    "tierId",
                    "entitlementKey",
                    "valueType",
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "billing"
        ],
        "summary": "Update tier_entitlements",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "tierId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "entitlementKey": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "valueType": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "value": {
                    "type": "string",
                    "maxLength": 64
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "tier_entitlements",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "tierId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "entitlementKey": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "valueType": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "value": {
                      "type": "string",
                      "maxLength": 64
                    }
                  },
                  "required": [
                    "id",
                    "tierId",
                    "entitlementKey",
                    "valueType",
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "billing"
        ],
        "summary": "Delete tier_entitlements",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/bucket-types": {
      "get": {
        "tags": [
          "bucket"
        ],
        "summary": "List bucket_types",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "ecosystemId": {
                        "type": "string"
                      },
                      "bucketId": {
                        "type": "string"
                      },
                      "sqlTableName": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "description": {
                        "type": "string"
                      },
                      "refMode": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "metadata": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "bucketId",
                      "sqlTableName",
                      "name",
                      "description",
                      "refMode",
                      "metadata",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "bucket"
        ],
        "summary": "Create bucket_types",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "bucketId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "sqlTableName": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "description": {
                    "type": "string"
                  },
                  "refMode": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "metadata": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "bucketId",
                  "sqlTableName",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "bucket_types",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ecosystemId": {
                      "type": "string"
                    },
                    "bucketId": {
                      "type": "string"
                    },
                    "sqlTableName": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "description": {
                      "type": "string"
                    },
                    "refMode": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "metadata": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "bucketId",
                    "sqlTableName",
                    "name",
                    "description",
                    "refMode",
                    "metadata",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/bucket-types/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "bucket"
        ],
        "summary": "Get bucket_types by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "bucket_types",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ecosystemId": {
                      "type": "string"
                    },
                    "bucketId": {
                      "type": "string"
                    },
                    "sqlTableName": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "description": {
                      "type": "string"
                    },
                    "refMode": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "metadata": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "bucketId",
                    "sqlTableName",
                    "name",
                    "description",
                    "refMode",
                    "metadata",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "bucket"
        ],
        "summary": "Update bucket_types",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "bucketId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "sqlTableName": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "description": {
                    "type": "string"
                  },
                  "refMode": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "metadata": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "bucket_types",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ecosystemId": {
                      "type": "string"
                    },
                    "bucketId": {
                      "type": "string"
                    },
                    "sqlTableName": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "description": {
                      "type": "string"
                    },
                    "refMode": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "metadata": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "bucketId",
                    "sqlTableName",
                    "name",
                    "description",
                    "refMode",
                    "metadata",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "bucket"
        ],
        "summary": "Delete bucket_types",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/buckets": {
      "get": {
        "tags": [
          "bucket"
        ],
        "summary": "List buckets",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "ecosystemId": {
                        "type": "string"
                      },
                      "parentId": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "description": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "metadata": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "parentId",
                      "name",
                      "description",
                      "kind",
                      "metadata",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "bucket"
        ],
        "summary": "Create buckets",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "description": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "metadata": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "buckets",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ecosystemId": {
                      "type": "string"
                    },
                    "parentId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "description": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "metadata": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "parentId",
                    "name",
                    "description",
                    "kind",
                    "metadata",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bucket/buckets/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "bucket"
        ],
        "summary": "Get buckets by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "buckets",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ecosystemId": {
                      "type": "string"
                    },
                    "parentId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "description": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "metadata": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "parentId",
                    "name",
                    "description",
                    "kind",
                    "metadata",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "bucket"
        ],
        "summary": "Update buckets",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "description": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "metadata": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "buckets",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ecosystemId": {
                      "type": "string"
                    },
                    "parentId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "description": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "metadata": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "parentId",
                    "name",
                    "description",
                    "kind",
                    "metadata",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "bucket"
        ],
        "summary": "Delete buckets",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chat-mentions": {
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "List chat_mentions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "messageId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "mentionedParticipantId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "messageId",
                      "mentionedParticipantId",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "chat"
        ],
        "summary": "Create chat_mentions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "messageId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "mentionedParticipantId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "messageId",
                  "mentionedParticipantId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "chat_mentions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "messageId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "mentionedParticipantId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "messageId",
                    "mentionedParticipantId",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chat-mentions/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "Get chat_mentions by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "chat_mentions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "messageId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "mentionedParticipantId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "messageId",
                    "mentionedParticipantId",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "chat"
        ],
        "summary": "Update chat_mentions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "messageId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "mentionedParticipantId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "chat_mentions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "messageId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "mentionedParticipantId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "messageId",
                    "mentionedParticipantId",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "chat"
        ],
        "summary": "Delete chat_mentions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chat-messages": {
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "List chat_messages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "chatId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "senderParticipantId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "clientMessageId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "seq": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "role": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "body": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "toolCalls": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "toolCallId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "toolName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "replyToMessageId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "state": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "dateSent": {
                        "type": "string"
                      },
                      "dateDelivered": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "editedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "chatId",
                      "senderParticipantId",
                      "clientMessageId",
                      "seq",
                      "role",
                      "body",
                      "toolCalls",
                      "toolCallId",
                      "toolName",
                      "replyToMessageId",
                      "state",
                      "dateSent",
                      "dateDelivered",
                      "deletedAt",
                      "editedAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "chat"
        ],
        "summary": "Create chat_messages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "chatId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "senderParticipantId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientMessageId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "seq": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "role": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "body": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "toolCalls": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "toolCallId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "toolName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "replyToMessageId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "dateSent": {
                    "type": "string"
                  },
                  "dateDelivered": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "editedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "chatId",
                  "role",
                  "dateSent"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "chat_messages",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "chatId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "senderParticipantId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "clientMessageId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "seq": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "role": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "body": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "toolCalls": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "toolCallId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 64
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "toolName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "replyToMessageId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "dateSent": {
                      "type": "string"
                    },
                    "dateDelivered": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "editedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "chatId",
                    "senderParticipantId",
                    "clientMessageId",
                    "seq",
                    "role",
                    "body",
                    "toolCalls",
                    "toolCallId",
                    "toolName",
                    "replyToMessageId",
                    "state",
                    "dateSent",
                    "dateDelivered",
                    "deletedAt",
                    "editedAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chat-messages/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "Get chat_messages by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "chat_messages",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "chatId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "senderParticipantId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "clientMessageId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "seq": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "role": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "body": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "toolCalls": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "toolCallId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 64
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "toolName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "replyToMessageId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "dateSent": {
                      "type": "string"
                    },
                    "dateDelivered": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "editedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "chatId",
                    "senderParticipantId",
                    "clientMessageId",
                    "seq",
                    "role",
                    "body",
                    "toolCalls",
                    "toolCallId",
                    "toolName",
                    "replyToMessageId",
                    "state",
                    "dateSent",
                    "dateDelivered",
                    "deletedAt",
                    "editedAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "chat"
        ],
        "summary": "Update chat_messages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "chatId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "senderParticipantId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientMessageId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "seq": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "role": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "body": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "toolCalls": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "toolCallId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "toolName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "replyToMessageId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "dateSent": {
                    "type": "string"
                  },
                  "dateDelivered": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "editedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "chat_messages",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "chatId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "senderParticipantId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "clientMessageId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "seq": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "role": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "body": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "toolCalls": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "toolCallId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 64
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "toolName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "replyToMessageId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "dateSent": {
                      "type": "string"
                    },
                    "dateDelivered": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "editedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "chatId",
                    "senderParticipantId",
                    "clientMessageId",
                    "seq",
                    "role",
                    "body",
                    "toolCalls",
                    "toolCallId",
                    "toolName",
                    "replyToMessageId",
                    "state",
                    "dateSent",
                    "dateDelivered",
                    "deletedAt",
                    "editedAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "chat"
        ],
        "summary": "Delete chat_messages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chat-participants": {
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "List chat_participants",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "chatId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "participantId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "type": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "role": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "state": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "joinedAt": {
                        "type": "string"
                      },
                      "stateChangedAt": {
                        "type": "string"
                      },
                      "contactId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "lastReadMessageId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "chatId",
                      "participantId",
                      "type",
                      "role",
                      "state",
                      "joinedAt",
                      "stateChangedAt",
                      "contactId",
                      "lastReadMessageId",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "chat"
        ],
        "summary": "Create chat_participants",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "chatId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "participantId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "type": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "role": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "state": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "joinedAt": {
                    "type": "string"
                  },
                  "stateChangedAt": {
                    "type": "string"
                  },
                  "contactId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lastReadMessageId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "chatId",
                  "participantId",
                  "type",
                  "joinedAt",
                  "stateChangedAt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "chat_participants",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "chatId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "participantId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "role": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "joinedAt": {
                      "type": "string"
                    },
                    "stateChangedAt": {
                      "type": "string"
                    },
                    "contactId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastReadMessageId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "chatId",
                    "participantId",
                    "type",
                    "role",
                    "state",
                    "joinedAt",
                    "stateChangedAt",
                    "contactId",
                    "lastReadMessageId",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chat-participants/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "Get chat_participants by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "chat_participants",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "chatId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "participantId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "role": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "joinedAt": {
                      "type": "string"
                    },
                    "stateChangedAt": {
                      "type": "string"
                    },
                    "contactId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastReadMessageId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "chatId",
                    "participantId",
                    "type",
                    "role",
                    "state",
                    "joinedAt",
                    "stateChangedAt",
                    "contactId",
                    "lastReadMessageId",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "chat"
        ],
        "summary": "Update chat_participants",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "chatId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "participantId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "type": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "role": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "state": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "joinedAt": {
                    "type": "string"
                  },
                  "stateChangedAt": {
                    "type": "string"
                  },
                  "contactId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lastReadMessageId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "chat_participants",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "chatId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "participantId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "role": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "joinedAt": {
                      "type": "string"
                    },
                    "stateChangedAt": {
                      "type": "string"
                    },
                    "contactId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastReadMessageId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "chatId",
                    "participantId",
                    "type",
                    "role",
                    "state",
                    "joinedAt",
                    "stateChangedAt",
                    "contactId",
                    "lastReadMessageId",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "chat"
        ],
        "summary": "Delete chat_participants",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chat-plugins": {
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "List chat_plugins",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "messageId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "kind": {
                        "type": "string",
                        "maxLength": 40
                      },
                      "state": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "config": {
                        "type": "string"
                      },
                      "stateData": {
                        "type": "string"
                      },
                      "expiresAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "messageId",
                      "kind",
                      "state",
                      "config",
                      "stateData",
                      "expiresAt",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "chat"
        ],
        "summary": "Create chat_plugins",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "messageId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "kind": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "state": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "config": {
                    "type": "string"
                  },
                  "stateData": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "messageId",
                  "kind"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "chat_plugins",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "messageId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "config": {
                      "type": "string"
                    },
                    "stateData": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "messageId",
                    "kind",
                    "state",
                    "config",
                    "stateData",
                    "expiresAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chat-plugins/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "Get chat_plugins by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "chat_plugins",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "messageId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "config": {
                      "type": "string"
                    },
                    "stateData": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "messageId",
                    "kind",
                    "state",
                    "config",
                    "stateData",
                    "expiresAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "chat"
        ],
        "summary": "Update chat_plugins",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "messageId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "kind": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "state": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "config": {
                    "type": "string"
                  },
                  "stateData": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "chat_plugins",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "messageId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "config": {
                      "type": "string"
                    },
                    "stateData": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "messageId",
                    "kind",
                    "state",
                    "config",
                    "stateData",
                    "expiresAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "chat"
        ],
        "summary": "Delete chat_plugins",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chat-rich-content": {
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "List chat_rich_content",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "messageId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "displayOrder": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "kind": {
                        "type": "string",
                        "maxLength": 40
                      },
                      "payload": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "messageId",
                      "displayOrder",
                      "kind",
                      "payload",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "chat"
        ],
        "summary": "Create chat_rich_content",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "messageId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "displayOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "kind": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "payload": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "messageId",
                  "kind"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "chat_rich_content",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "messageId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "displayOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "payload": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "messageId",
                    "displayOrder",
                    "kind",
                    "payload",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chat-rich-content/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "Get chat_rich_content by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "chat_rich_content",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "messageId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "displayOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "payload": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "messageId",
                    "displayOrder",
                    "kind",
                    "payload",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "chat"
        ],
        "summary": "Update chat_rich_content",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "messageId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "displayOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "kind": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "payload": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "chat_rich_content",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "messageId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "displayOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "payload": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "messageId",
                    "displayOrder",
                    "kind",
                    "payload",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "chat"
        ],
        "summary": "Delete chat_rich_content",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chats": {
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "List chats",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerUserId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "type": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "description": {
                        "type": "string"
                      },
                      "headerImage": {
                        "type": "string",
                        "maxLength": 2048
                      },
                      "headerBackgroundImage": {
                        "type": "string",
                        "maxLength": 2048
                      },
                      "backgroundImage": {
                        "type": "string",
                        "maxLength": 2048
                      },
                      "state": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "security": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "model": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "personaSlug": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "personaId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ownerUserId",
                      "ecosystemId",
                      "type",
                      "name",
                      "description",
                      "headerImage",
                      "headerBackgroundImage",
                      "backgroundImage",
                      "state",
                      "security",
                      "model",
                      "personaSlug",
                      "personaId",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "chat"
        ],
        "summary": "Create chats",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ownerUserId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "type": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string"
                  },
                  "headerImage": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "headerBackgroundImage": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "backgroundImage": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "state": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "security": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "model": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "personaSlug": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "personaId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "ownerUserId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "chats",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerUserId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "headerImage": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "headerBackgroundImage": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "backgroundImage": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "security": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "model": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "personaSlug": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 64
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "personaId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ownerUserId",
                    "ecosystemId",
                    "type",
                    "name",
                    "description",
                    "headerImage",
                    "headerBackgroundImage",
                    "backgroundImage",
                    "state",
                    "security",
                    "model",
                    "personaSlug",
                    "personaId",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat/chats/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "Get chats by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "chats",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerUserId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "headerImage": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "headerBackgroundImage": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "backgroundImage": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "security": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "model": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "personaSlug": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 64
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "personaId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ownerUserId",
                    "ecosystemId",
                    "type",
                    "name",
                    "description",
                    "headerImage",
                    "headerBackgroundImage",
                    "backgroundImage",
                    "state",
                    "security",
                    "model",
                    "personaSlug",
                    "personaId",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "chat"
        ],
        "summary": "Update chats",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ownerUserId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "type": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string"
                  },
                  "headerImage": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "headerBackgroundImage": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "backgroundImage": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "state": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "security": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "model": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "personaSlug": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "personaId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "chats",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerUserId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "headerImage": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "headerBackgroundImage": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "backgroundImage": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "security": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "model": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "personaSlug": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 64
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "personaId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ownerUserId",
                    "ecosystemId",
                    "type",
                    "name",
                    "description",
                    "headerImage",
                    "headerBackgroundImage",
                    "backgroundImage",
                    "state",
                    "security",
                    "model",
                    "personaSlug",
                    "personaId",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "chat"
        ],
        "summary": "Delete chats",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/addresses": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List addresses",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "label": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "line1": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "line2": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "city": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "region": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "postalCode": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "country": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "ownerKind",
                      "ownerId",
                      "label",
                      "line1",
                      "line2",
                      "city",
                      "region",
                      "postalCode",
                      "country",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create addresses",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "line1": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "line2": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "postalCode": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "country": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "addresses",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "line1": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "line2": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "city": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "region": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "postalCode": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "country": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "label",
                    "line1",
                    "line2",
                    "city",
                    "region",
                    "postalCode",
                    "country",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/addresses/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get addresses by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "addresses",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "line1": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "line2": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "city": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "region": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "postalCode": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "country": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "label",
                    "line1",
                    "line2",
                    "city",
                    "region",
                    "postalCode",
                    "country",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update addresses",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "line1": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "line2": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "city": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "postalCode": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "country": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "addresses",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "line1": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "line2": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "city": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "region": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "postalCode": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "country": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "label",
                    "line1",
                    "line2",
                    "city",
                    "region",
                    "postalCode",
                    "country",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete addresses",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/categories": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List categories",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "description": {
                        "type": "string"
                      },
                      "color": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "icon": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "parentId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "sortOrder": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "name",
                      "description",
                      "color",
                      "icon",
                      "parentId",
                      "sortOrder",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create categories",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "icon": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "categories",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "color": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "icon": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "parentId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "name",
                    "description",
                    "color",
                    "icon",
                    "parentId",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/categories/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get categories by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "categories",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "color": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "icon": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "parentId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "name",
                    "description",
                    "color",
                    "icon",
                    "parentId",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update categories",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "icon": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "categories",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "color": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "icon": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "parentId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "name",
                    "description",
                    "color",
                    "icon",
                    "parentId",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete categories",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/category-items": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List category_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "categoryId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "targetKind": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "targetId": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "sortOrder": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "categoryId",
                      "targetKind",
                      "targetId",
                      "sortOrder",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create category_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "categoryId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "targetKind": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "targetId": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "categoryId",
                  "targetKind",
                  "targetId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "category_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "categoryId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "targetKind": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "targetId": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "categoryId",
                    "targetKind",
                    "targetId",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/category-items/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get category_items by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "category_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "categoryId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "targetKind": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "targetId": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "categoryId",
                    "targetKind",
                    "targetId",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update category_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "categoryId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "targetKind": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "targetId": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "category_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "categoryId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "targetKind": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "targetId": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "categoryId",
                    "targetKind",
                    "targetId",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete category_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/contacts": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List contacts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "personUserId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fullName": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "nickname": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 320
                      },
                      "phone": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "notes": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "ownerKind",
                      "ownerId",
                      "personUserId",
                      "fullName",
                      "nickname",
                      "email",
                      "phone",
                      "notes",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create contacts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "personUserId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fullName": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "nickname": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 320
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "notes": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "contacts",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "personUserId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fullName": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "nickname": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "email": {
                      "type": "string",
                      "maxLength": 320
                    },
                    "phone": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "personUserId",
                    "fullName",
                    "nickname",
                    "email",
                    "phone",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/contacts/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get contacts by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "contacts",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "personUserId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fullName": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "nickname": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "email": {
                      "type": "string",
                      "maxLength": 320
                    },
                    "phone": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "personUserId",
                    "fullName",
                    "nickname",
                    "email",
                    "phone",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update contacts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "personUserId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fullName": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "nickname": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 320
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "notes": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "contacts",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "personUserId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fullName": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "nickname": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "email": {
                      "type": "string",
                      "maxLength": 320
                    },
                    "phone": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "personUserId",
                    "fullName",
                    "nickname",
                    "email",
                    "phone",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete contacts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/counters": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List counters",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "value": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "name",
                      "value",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create counters",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "value": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "name",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "counters",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "value": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "name",
                    "value",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/counters/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get counters by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "counters",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "value": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "name",
                    "value",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update counters",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "value": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "counters",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "value": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "name",
                    "value",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete counters",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/dates": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List dates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "label": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "date": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "recurrence": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "contactId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "notes": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "ownerKind",
                      "ownerId",
                      "label",
                      "date",
                      "recurrence",
                      "contactId",
                      "notes",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create dates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "date": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "recurrence": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "contactId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "notes": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "dates",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "date": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "recurrence": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "contactId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "label",
                    "date",
                    "recurrence",
                    "contactId",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/dates/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get dates by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "dates",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "date": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "recurrence": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "contactId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "label",
                    "date",
                    "recurrence",
                    "contactId",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update dates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "date": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "recurrence": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "contactId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "notes": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "dates",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "date": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "recurrence": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "contactId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "label",
                    "date",
                    "recurrence",
                    "contactId",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete dates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/events": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "payload": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "type",
                      "payload",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "type": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "payload": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "type",
                  "payload"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "events",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "payload": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "type",
                    "payload",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/events/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get events by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "events",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "payload": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "type",
                    "payload",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "type": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "payload": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "events",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "type": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "payload": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "type",
                    "payload",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/feedback": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List feedback",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "userEmail": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "category": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "subject": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "body": {
                        "type": "string"
                      },
                      "platform": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "appVersion": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "osVersion": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "deviceInfo": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "status": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "adminNotes": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "userEmail",
                      "category",
                      "subject",
                      "body",
                      "platform",
                      "appVersion",
                      "osVersion",
                      "deviceInfo",
                      "status",
                      "adminNotes",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create feedback",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "userEmail": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "subject": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "body": {
                    "type": "string"
                  },
                  "platform": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "appVersion": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "osVersion": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "deviceInfo": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "adminNotes": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "userEmail",
                  "category",
                  "subject",
                  "body",
                  "platform"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "feedback",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userEmail": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "category": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "subject": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "body": {
                      "type": "string"
                    },
                    "platform": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "appVersion": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "osVersion": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "deviceInfo": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "adminNotes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "userEmail",
                    "category",
                    "subject",
                    "body",
                    "platform",
                    "appVersion",
                    "osVersion",
                    "deviceInfo",
                    "status",
                    "adminNotes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/feedback/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get feedback by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "feedback",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userEmail": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "category": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "subject": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "body": {
                      "type": "string"
                    },
                    "platform": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "appVersion": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "osVersion": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "deviceInfo": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "adminNotes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "userEmail",
                    "category",
                    "subject",
                    "body",
                    "platform",
                    "appVersion",
                    "osVersion",
                    "deviceInfo",
                    "status",
                    "adminNotes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update feedback",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "userEmail": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "subject": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "body": {
                    "type": "string"
                  },
                  "platform": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "appVersion": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "osVersion": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "deviceInfo": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "adminNotes": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "feedback",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userEmail": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "category": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "subject": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "body": {
                      "type": "string"
                    },
                    "platform": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "appVersion": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "osVersion": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "deviceInfo": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "adminNotes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "userEmail",
                    "category",
                    "subject",
                    "body",
                    "platform",
                    "appVersion",
                    "osVersion",
                    "deviceInfo",
                    "status",
                    "adminNotes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete feedback",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/key-value-pairs": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List key_value_pairs",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "key": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "value": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "key",
                      "value",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create key_value_pairs",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "key": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "value": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "key",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "key_value_pairs",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "key": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "value": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "key",
                    "value",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/key-value-pairs/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get key_value_pairs by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "key_value_pairs",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "key": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "value": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "key",
                    "value",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update key_value_pairs",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "key": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "value": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "key_value_pairs",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "key": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "value": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "key",
                    "value",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete key_value_pairs",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/keyword-items": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List keyword_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "keywordId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "targetKind": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "targetId": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "sortOrder": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "keywordId",
                      "targetKind",
                      "targetId",
                      "sortOrder",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create keyword_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "keywordId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "targetKind": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "targetId": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "keywordId",
                  "targetKind",
                  "targetId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "keyword_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "keywordId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "targetKind": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "targetId": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "keywordId",
                    "targetKind",
                    "targetId",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/keyword-items/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get keyword_items by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "keyword_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "keywordId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "targetKind": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "targetId": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "keywordId",
                    "targetKind",
                    "targetId",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update keyword_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "keywordId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "targetKind": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "targetId": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "keyword_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "keywordId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "targetKind": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "targetId": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "keywordId",
                    "targetKind",
                    "targetId",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete keyword_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/keywords": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List keywords",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "label": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "color": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "description": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "label",
                      "color",
                      "description",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create keywords",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "color": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "description": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "label"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "keywords",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "color": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "description": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "label",
                    "color",
                    "description",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/keywords/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get keywords by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "keywords",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "color": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "description": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "label",
                    "color",
                    "description",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update keywords",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "color": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "description": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "keywords",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "color": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "description": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "label",
                    "color",
                    "description",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete keywords",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/list-items": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List list_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "listId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "position": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "value": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "listId",
                      "position",
                      "value",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create list_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "listId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "position": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "value": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "listId",
                  "position",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "list_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "listId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "position": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "value": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "listId",
                    "position",
                    "value",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/list-items/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get list_items by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "list_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "listId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "position": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "value": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "listId",
                    "position",
                    "value",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update list_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "listId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "position": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "value": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "list_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "listId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "position": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "value": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "listId",
                    "position",
                    "value",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete list_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/lists": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List lists",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "description": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 1000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "name",
                      "description",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create lists",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "lists",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "name",
                    "description",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/lists/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get lists by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "lists",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "name",
                    "description",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update lists",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "lists",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "name",
                    "description",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete lists",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/locations": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List locations",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "place": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "region": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "country": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "endDate": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 32
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "notes": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "ownerKind",
                      "ownerId",
                      "place",
                      "region",
                      "country",
                      "startDate",
                      "endDate",
                      "notes",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create locations",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "place": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "country": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "startDate": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "endDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 32
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "notes": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "locations",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "place": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "region": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "country": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "startDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 32
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "place",
                    "region",
                    "country",
                    "startDate",
                    "endDate",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/locations/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get locations by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "locations",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "place": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "region": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "country": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "startDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 32
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "place",
                    "region",
                    "country",
                    "startDate",
                    "endDate",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update locations",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "place": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "country": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "startDate": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "endDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 32
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "notes": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "locations",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "place": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "region": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "country": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "startDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 32
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "place",
                    "region",
                    "country",
                    "startDate",
                    "endDate",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete locations",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/poll-options": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List poll_options",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "pollId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "text": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "sortOrder": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "pollId",
                      "text",
                      "sortOrder",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create poll_options",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "pollId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "pollId",
                  "text"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "poll_options",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "pollId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "text": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "pollId",
                    "text",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/poll-options/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get poll_options by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "poll_options",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "pollId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "text": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "pollId",
                    "text",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update poll_options",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "pollId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "poll_options",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "pollId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "text": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "pollId",
                    "text",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete poll_options",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/polls": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List polls",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "hostKind": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "hostId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 128
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "question": {
                        "type": "string"
                      },
                      "allowMultiple": {
                        "type": "boolean"
                      },
                      "expiresAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "hostKind",
                      "hostId",
                      "question",
                      "allowMultiple",
                      "expiresAt",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create polls",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "hostKind": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "hostId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 128
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "question": {
                    "type": "string"
                  },
                  "allowMultiple": {
                    "type": "boolean"
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "question"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "polls",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "hostKind": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "hostId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 128
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "question": {
                      "type": "string"
                    },
                    "allowMultiple": {
                      "type": "boolean"
                    },
                    "expiresAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "hostKind",
                    "hostId",
                    "question",
                    "allowMultiple",
                    "expiresAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/polls/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get polls by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "polls",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "hostKind": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "hostId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 128
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "question": {
                      "type": "string"
                    },
                    "allowMultiple": {
                      "type": "boolean"
                    },
                    "expiresAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "hostKind",
                    "hostId",
                    "question",
                    "allowMultiple",
                    "expiresAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update polls",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "hostKind": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "hostId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 128
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "question": {
                    "type": "string"
                  },
                  "allowMultiple": {
                    "type": "boolean"
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "polls",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "hostKind": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "hostId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 128
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "question": {
                      "type": "string"
                    },
                    "allowMultiple": {
                      "type": "boolean"
                    },
                    "expiresAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "hostKind",
                    "hostId",
                    "question",
                    "allowMultiple",
                    "expiresAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete polls",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/queue-items": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List queue_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "queueId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "payload": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "enqueuedAt": {
                        "type": "string"
                      },
                      "dequeuedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ackedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "nackedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "queueId",
                      "payload",
                      "status",
                      "enqueuedAt",
                      "dequeuedAt",
                      "ackedAt",
                      "nackedAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create queue_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "queueId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "payload": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "enqueuedAt": {
                    "type": "string"
                  },
                  "dequeuedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ackedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "nackedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "queueId",
                  "payload",
                  "status",
                  "enqueuedAt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "queue_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "queueId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "payload": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "enqueuedAt": {
                      "type": "string"
                    },
                    "dequeuedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ackedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "nackedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "queueId",
                    "payload",
                    "status",
                    "enqueuedAt",
                    "dequeuedAt",
                    "ackedAt",
                    "nackedAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/queue-items/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get queue_items by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "queue_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "queueId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "payload": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "enqueuedAt": {
                      "type": "string"
                    },
                    "dequeuedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ackedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "nackedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "queueId",
                    "payload",
                    "status",
                    "enqueuedAt",
                    "dequeuedAt",
                    "ackedAt",
                    "nackedAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update queue_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "queueId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "payload": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "enqueuedAt": {
                    "type": "string"
                  },
                  "dequeuedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ackedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "nackedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "queue_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "queueId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "payload": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "enqueuedAt": {
                      "type": "string"
                    },
                    "dequeuedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ackedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "nackedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "queueId",
                    "payload",
                    "status",
                    "enqueuedAt",
                    "dequeuedAt",
                    "ackedAt",
                    "nackedAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete queue_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/queues": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List queues",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "name",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create queues",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "queues",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "name",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/queues/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get queues by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "queues",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "name",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update queues",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "queues",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "name",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete queues",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/relationships": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List relationships",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "contactId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "relationshipKind": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "sinceDate": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "notes": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "ownerKind",
                      "ownerId",
                      "contactId",
                      "relationshipKind",
                      "sinceDate",
                      "notes",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create relationships",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "contactId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "relationshipKind": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "sinceDate": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "notes": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "contactId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "relationships",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "contactId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "relationshipKind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "sinceDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "contactId",
                    "relationshipKind",
                    "sinceDate",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/relationships/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get relationships by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "relationships",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "contactId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "relationshipKind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "sinceDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "contactId",
                    "relationshipKind",
                    "sinceDate",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update relationships",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "contactId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "relationshipKind": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "sinceDate": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "notes": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "relationships",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "contactId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "relationshipKind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "sinceDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "contactId",
                    "relationshipKind",
                    "sinceDate",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete relationships",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/social-links": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List social_links",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "platform": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "url": {
                        "type": "string",
                        "maxLength": 1024
                      },
                      "handle": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "sortOrder": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "ownerKind",
                      "ownerId",
                      "platform",
                      "url",
                      "handle",
                      "sortOrder",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create social_links",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "platform": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 1024
                  },
                  "handle": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "social_links",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "platform": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 1024
                    },
                    "handle": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "platform",
                    "url",
                    "handle",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/social-links/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get social_links by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "social_links",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "platform": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 1024
                    },
                    "handle": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "platform",
                    "url",
                    "handle",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update social_links",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "platform": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 1024
                  },
                  "handle": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "social_links",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "platform": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 1024
                    },
                    "handle": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "platform",
                    "url",
                    "handle",
                    "sortOrder",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete social_links",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/tags": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List tags",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "kind": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "label": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "level": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "sinceDate": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "notes": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "ownerKind",
                      "ownerId",
                      "kind",
                      "label",
                      "level",
                      "sinceDate",
                      "notes",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create tags",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "kind": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "level": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "sinceDate": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "notes": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "tags",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "level": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "sinceDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "kind",
                    "label",
                    "level",
                    "sinceDate",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/tags/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get tags by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "tags",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "level": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "sinceDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "kind",
                    "label",
                    "level",
                    "sinceDate",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update tags",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "kind": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "level": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "sinceDate": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "notes": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "tags",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "level": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "sinceDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "ownerKind",
                    "ownerId",
                    "kind",
                    "label",
                    "level",
                    "sinceDate",
                    "notes",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete tags",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/urls": {
      "get": {
        "tags": [
          "content"
        ],
        "summary": "List urls",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "originalUrl": {
                        "type": "string"
                      },
                      "canonicalUrl": {
                        "type": "string"
                      },
                      "canonicalUrlHash": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "title": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "description": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "note": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "previewStorageKey": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "previewUrl": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "previewStatus": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "previewError": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "previewGeneratedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "previewAttempts": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "originalUrl",
                      "canonicalUrl",
                      "canonicalUrlHash",
                      "title",
                      "description",
                      "note",
                      "previewStorageKey",
                      "previewUrl",
                      "previewStatus",
                      "previewError",
                      "previewGeneratedAt",
                      "previewAttempts",
                      "createdAt",
                      "updatedAt",
                      "isDeleted",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "content"
        ],
        "summary": "Create urls",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "originalUrl": {
                    "type": "string"
                  },
                  "canonicalUrl": {
                    "type": "string"
                  },
                  "canonicalUrlHash": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "title": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "previewStorageKey": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "previewUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "previewStatus": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "previewError": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "previewGeneratedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "previewAttempts": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "originalUrl",
                  "canonicalUrl",
                  "canonicalUrlHash"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "urls",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "originalUrl": {
                      "type": "string"
                    },
                    "canonicalUrl": {
                      "type": "string"
                    },
                    "canonicalUrlHash": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "title": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "note": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewStorageKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewStatus": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "previewError": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewGeneratedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewAttempts": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "originalUrl",
                    "canonicalUrl",
                    "canonicalUrlHash",
                    "title",
                    "description",
                    "note",
                    "previewStorageKey",
                    "previewUrl",
                    "previewStatus",
                    "previewError",
                    "previewGeneratedAt",
                    "previewAttempts",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/urls/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "content"
        ],
        "summary": "Get urls by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "urls",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "originalUrl": {
                      "type": "string"
                    },
                    "canonicalUrl": {
                      "type": "string"
                    },
                    "canonicalUrlHash": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "title": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "note": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewStorageKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewStatus": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "previewError": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewGeneratedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewAttempts": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "originalUrl",
                    "canonicalUrl",
                    "canonicalUrlHash",
                    "title",
                    "description",
                    "note",
                    "previewStorageKey",
                    "previewUrl",
                    "previewStatus",
                    "previewError",
                    "previewGeneratedAt",
                    "previewAttempts",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "content"
        ],
        "summary": "Update urls",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "originalUrl": {
                    "type": "string"
                  },
                  "canonicalUrl": {
                    "type": "string"
                  },
                  "canonicalUrlHash": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "title": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "previewStorageKey": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "previewUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "previewStatus": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "previewError": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "previewGeneratedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "previewAttempts": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "urls",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "originalUrl": {
                      "type": "string"
                    },
                    "canonicalUrl": {
                      "type": "string"
                    },
                    "canonicalUrlHash": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "title": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "note": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewStorageKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewStatus": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "previewError": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewGeneratedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "previewAttempts": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "originalUrl",
                    "canonicalUrl",
                    "canonicalUrlHash",
                    "title",
                    "description",
                    "note",
                    "previewStorageKey",
                    "previewUrl",
                    "previewStatus",
                    "previewError",
                    "previewGeneratedAt",
                    "previewAttempts",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "content"
        ],
        "summary": "Delete urls",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/customer/customers": {
      "get": {
        "tags": [
          "customer"
        ],
        "summary": "List customers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "externalId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "email": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "displayName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "avatarUrl": {
                        "type": "string",
                        "maxLength": 1024
                      },
                      "publicProfileEnabled": {
                        "type": "boolean"
                      },
                      "tokenVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "preferredMfaMethod": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 16
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "mfaFailedAttempts": {
                        "type": "integer",
                        "minimum": -32768,
                        "maximum": 32767
                      },
                      "mfaLockedUntil": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "externalId",
                      "email",
                      "displayName",
                      "slug",
                      "avatarUrl",
                      "publicProfileEnabled",
                      "tokenVersion",
                      "preferredMfaMethod",
                      "mfaFailedAttempts",
                      "mfaLockedUntil",
                      "deletedAt",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "customer"
        ],
        "summary": "Create customers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "email": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "displayName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "avatarUrl": {
                    "type": "string",
                    "maxLength": 1024
                  },
                  "publicProfileEnabled": {
                    "type": "boolean"
                  },
                  "tokenVersion": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "preferredMfaMethod": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 16
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "customers",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "email": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "displayName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "avatarUrl": {
                      "type": "string",
                      "maxLength": 1024
                    },
                    "publicProfileEnabled": {
                      "type": "boolean"
                    },
                    "tokenVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "preferredMfaMethod": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 16
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "mfaFailedAttempts": {
                      "type": "integer",
                      "minimum": -32768,
                      "maximum": 32767
                    },
                    "mfaLockedUntil": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "externalId",
                    "email",
                    "displayName",
                    "slug",
                    "avatarUrl",
                    "publicProfileEnabled",
                    "tokenVersion",
                    "preferredMfaMethod",
                    "mfaFailedAttempts",
                    "mfaLockedUntil",
                    "deletedAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/customer/customers/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "customer"
        ],
        "summary": "Get customers by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "customers",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "email": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "displayName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "avatarUrl": {
                      "type": "string",
                      "maxLength": 1024
                    },
                    "publicProfileEnabled": {
                      "type": "boolean"
                    },
                    "tokenVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "preferredMfaMethod": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 16
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "mfaFailedAttempts": {
                      "type": "integer",
                      "minimum": -32768,
                      "maximum": 32767
                    },
                    "mfaLockedUntil": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "externalId",
                    "email",
                    "displayName",
                    "slug",
                    "avatarUrl",
                    "publicProfileEnabled",
                    "tokenVersion",
                    "preferredMfaMethod",
                    "mfaFailedAttempts",
                    "mfaLockedUntil",
                    "deletedAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "customer"
        ],
        "summary": "Update customers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "email": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "displayName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "avatarUrl": {
                    "type": "string",
                    "maxLength": 1024
                  },
                  "publicProfileEnabled": {
                    "type": "boolean"
                  },
                  "tokenVersion": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "preferredMfaMethod": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 16
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "customers",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "email": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "displayName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "avatarUrl": {
                      "type": "string",
                      "maxLength": 1024
                    },
                    "publicProfileEnabled": {
                      "type": "boolean"
                    },
                    "tokenVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "preferredMfaMethod": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 16
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "mfaFailedAttempts": {
                      "type": "integer",
                      "minimum": -32768,
                      "maximum": 32767
                    },
                    "mfaLockedUntil": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "externalId",
                    "email",
                    "displayName",
                    "slug",
                    "avatarUrl",
                    "publicProfileEnabled",
                    "tokenVersion",
                    "preferredMfaMethod",
                    "mfaFailedAttempts",
                    "mfaLockedUntil",
                    "deletedAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "customer"
        ],
        "summary": "Delete customers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document/blocks": {
      "get": {
        "tags": [
          "document"
        ],
        "summary": "List blocks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "documentId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "position": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "blockType": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "contentText": {
                        "type": "string"
                      },
                      "contentMeta": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "lastOpId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "documentId",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "position",
                      "blockType",
                      "contentText",
                      "contentMeta",
                      "createdAt",
                      "updatedAt",
                      "isDeleted",
                      "lastOpId",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "document"
        ],
        "summary": "Create blocks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "documentId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "position": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "blockType": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "contentText": {
                    "type": "string"
                  },
                  "contentMeta": {
                    "type": "string"
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "lastOpId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "documentId",
                  "position",
                  "blockType"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "blocks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "documentId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "position": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "blockType": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "contentText": {
                      "type": "string"
                    },
                    "contentMeta": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "lastOpId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "documentId",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "position",
                    "blockType",
                    "contentText",
                    "contentMeta",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "lastOpId",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document/blocks/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "document"
        ],
        "summary": "Get blocks by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "blocks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "documentId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "position": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "blockType": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "contentText": {
                      "type": "string"
                    },
                    "contentMeta": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "lastOpId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "documentId",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "position",
                    "blockType",
                    "contentText",
                    "contentMeta",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "lastOpId",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "document"
        ],
        "summary": "Update blocks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "documentId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "position": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "blockType": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "contentText": {
                    "type": "string"
                  },
                  "contentMeta": {
                    "type": "string"
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "lastOpId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "blocks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "documentId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "position": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "blockType": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "contentText": {
                      "type": "string"
                    },
                    "contentMeta": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "lastOpId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "documentId",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "position",
                    "blockType",
                    "contentText",
                    "contentMeta",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "lastOpId",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "document"
        ],
        "summary": "Delete blocks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document/documents": {
      "get": {
        "tags": [
          "document"
        ],
        "summary": "List documents",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "title": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "docType": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "lastOpId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "lastSnapshotId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "title",
                      "docType",
                      "createdAt",
                      "updatedAt",
                      "isDeleted",
                      "lastOpId",
                      "lastSnapshotId",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "document"
        ],
        "summary": "Create documents",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "docType": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "lastOpId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lastSnapshotId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "documents",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "docType": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "lastOpId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastSnapshotId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "title",
                    "docType",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "lastOpId",
                    "lastSnapshotId",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document/documents/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "document"
        ],
        "summary": "Get documents by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "documents",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "docType": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "lastOpId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastSnapshotId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "title",
                    "docType",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "lastOpId",
                    "lastSnapshotId",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "document"
        ],
        "summary": "Update documents",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "docType": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "lastOpId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lastSnapshotId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "documents",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "docType": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "lastOpId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastSnapshotId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "title",
                    "docType",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "lastOpId",
                    "lastSnapshotId",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "document"
        ],
        "summary": "Delete documents",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document/marks": {
      "get": {
        "tags": [
          "document"
        ],
        "summary": "List marks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "blockId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "markType": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "startAnchor": {
                        "type": "string"
                      },
                      "endAnchor": {
                        "type": "string"
                      },
                      "markData": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "blockId",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "markType",
                      "startAnchor",
                      "endAnchor",
                      "markData",
                      "createdAt",
                      "updatedAt",
                      "isDeleted",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "document"
        ],
        "summary": "Create marks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "blockId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "markType": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "startAnchor": {
                    "type": "string"
                  },
                  "endAnchor": {
                    "type": "string"
                  },
                  "markData": {
                    "type": "string"
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "blockId",
                  "markType",
                  "startAnchor",
                  "endAnchor"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "marks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "blockId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "markType": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "startAnchor": {
                      "type": "string"
                    },
                    "endAnchor": {
                      "type": "string"
                    },
                    "markData": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "blockId",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "markType",
                    "startAnchor",
                    "endAnchor",
                    "markData",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document/marks/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "document"
        ],
        "summary": "Get marks by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "marks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "blockId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "markType": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "startAnchor": {
                      "type": "string"
                    },
                    "endAnchor": {
                      "type": "string"
                    },
                    "markData": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "blockId",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "markType",
                    "startAnchor",
                    "endAnchor",
                    "markData",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "document"
        ],
        "summary": "Update marks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "blockId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "markType": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "startAnchor": {
                    "type": "string"
                  },
                  "endAnchor": {
                    "type": "string"
                  },
                  "markData": {
                    "type": "string"
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "marks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "blockId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "markType": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "startAnchor": {
                      "type": "string"
                    },
                    "endAnchor": {
                      "type": "string"
                    },
                    "markData": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "blockId",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "markType",
                    "startAnchor",
                    "endAnchor",
                    "markData",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "document"
        ],
        "summary": "Delete marks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document/operations": {
      "get": {
        "tags": [
          "document"
        ],
        "summary": "List operations",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "documentId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "blockId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "clientId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "clientSeq": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "opType": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "opPayload": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "undoGroupId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "inverseOfOpId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "documentId",
                      "blockId",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "clientId",
                      "clientSeq",
                      "opType",
                      "opPayload",
                      "createdAt",
                      "undoGroupId",
                      "inverseOfOpId",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "document"
        ],
        "summary": "Create operations",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "documentId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "blockId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "clientId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "clientSeq": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "opType": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "opPayload": {
                    "type": "string"
                  },
                  "undoGroupId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "inverseOfOpId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "documentId",
                  "clientId",
                  "clientSeq",
                  "opType"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "operations",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "documentId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "blockId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "clientId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "clientSeq": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "opType": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "opPayload": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "undoGroupId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "inverseOfOpId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "documentId",
                    "blockId",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "clientId",
                    "clientSeq",
                    "opType",
                    "opPayload",
                    "createdAt",
                    "undoGroupId",
                    "inverseOfOpId",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document/operations/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "document"
        ],
        "summary": "Get operations by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "operations",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "documentId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "blockId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "clientId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "clientSeq": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "opType": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "opPayload": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "undoGroupId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "inverseOfOpId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "documentId",
                    "blockId",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "clientId",
                    "clientSeq",
                    "opType",
                    "opPayload",
                    "createdAt",
                    "undoGroupId",
                    "inverseOfOpId",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "document"
        ],
        "summary": "Update operations",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "documentId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "blockId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "clientId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "clientSeq": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "opType": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "opPayload": {
                    "type": "string"
                  },
                  "undoGroupId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "inverseOfOpId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "operations",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "documentId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "blockId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "clientId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "clientSeq": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "opType": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "opPayload": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "undoGroupId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "inverseOfOpId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "documentId",
                    "blockId",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "clientId",
                    "clientSeq",
                    "opType",
                    "opPayload",
                    "createdAt",
                    "undoGroupId",
                    "inverseOfOpId",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "document"
        ],
        "summary": "Delete operations",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document/versions": {
      "get": {
        "tags": [
          "document"
        ],
        "summary": "List versions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "documentId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "description": {
                        "type": "string"
                      },
                      "pinnedOpId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "pinnedSyncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "documentId",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "name",
                      "description",
                      "pinnedOpId",
                      "pinnedSyncVersion",
                      "createdAt",
                      "updatedAt",
                      "isDeleted",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "document"
        ],
        "summary": "Create versions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "documentId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string"
                  },
                  "pinnedOpId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "pinnedSyncVersion": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "documentId",
                  "name",
                  "pinnedOpId",
                  "pinnedSyncVersion"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "versions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "documentId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "pinnedOpId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "pinnedSyncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "documentId",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "name",
                    "description",
                    "pinnedOpId",
                    "pinnedSyncVersion",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document/versions/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "document"
        ],
        "summary": "Get versions by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "versions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "documentId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "pinnedOpId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "pinnedSyncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "documentId",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "name",
                    "description",
                    "pinnedOpId",
                    "pinnedSyncVersion",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "document"
        ],
        "summary": "Update versions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "documentId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string"
                  },
                  "pinnedOpId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "pinnedSyncVersion": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "versions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "documentId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "pinnedOpId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "pinnedSyncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "documentId",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "name",
                    "description",
                    "pinnedOpId",
                    "pinnedSyncVersion",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "document"
        ],
        "summary": "Delete versions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/applications": {
      "get": {
        "tags": [
          "ecosystem"
        ],
        "summary": "List applications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "ecosystemId": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "displayName": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "consumerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "slug",
                      "displayName",
                      "consumerKind",
                      "createdAt",
                      "updatedAt",
                      "isDeleted",
                      "deletedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Create applications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "displayName": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "consumerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "slug",
                  "displayName",
                  "consumerKind"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "applications",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ecosystemId": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "displayName": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "consumerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "slug",
                    "displayName",
                    "consumerKind",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/applications/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Get applications by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "applications",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ecosystemId": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "displayName": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "consumerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "slug",
                    "displayName",
                    "consumerKind",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Update applications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "displayName": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "consumerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "applications",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ecosystemId": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "displayName": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "consumerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "slug",
                    "displayName",
                    "consumerKind",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Delete applications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/ecosystem-capabilities": {
      "get": {
        "tags": [
          "ecosystem"
        ],
        "summary": "List ecosystem_capabilities",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "capability": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "config": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "ecosystemId",
                      "capability",
                      "config",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Create ecosystem_capabilities",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "capability": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "config": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "capability"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "ecosystem_capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "capability": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "config": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ecosystemId",
                    "capability",
                    "config",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/ecosystem-capabilities/{ecosystemId}/{capability}": {
      "parameters": [
        {
          "name": "ecosystemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "capability",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Get ecosystem_capabilities by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "ecosystem_capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "capability": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "config": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ecosystemId",
                    "capability",
                    "config",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Update ecosystem_capabilities",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "capability": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "config": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ecosystem_capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "capability": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "config": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ecosystemId",
                    "capability",
                    "config",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Delete ecosystem_capabilities",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/ecosystem-regions": {
      "get": {
        "tags": [
          "ecosystem"
        ],
        "summary": "List ecosystem_regions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "displayName": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "postgresHost": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "railwayServiceId": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "isDefaultForNewProjects": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "displayName",
                      "postgresHost",
                      "railwayServiceId",
                      "isDefaultForNewProjects",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Create ecosystem_regions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "postgresHost": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "railwayServiceId": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "isDefaultForNewProjects": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "displayName"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "ecosystem_regions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "displayName": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "postgresHost": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "railwayServiceId": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "isDefaultForNewProjects": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "displayName",
                    "postgresHost",
                    "railwayServiceId",
                    "isDefaultForNewProjects",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/ecosystem-regions/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Get ecosystem_regions by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "ecosystem_regions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "displayName": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "postgresHost": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "railwayServiceId": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "isDefaultForNewProjects": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "displayName",
                    "postgresHost",
                    "railwayServiceId",
                    "isDefaultForNewProjects",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Update ecosystem_regions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "postgresHost": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "railwayServiceId": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "isDefaultForNewProjects": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ecosystem_regions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "displayName": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "postgresHost": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "railwayServiceId": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "isDefaultForNewProjects": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "displayName",
                    "postgresHost",
                    "railwayServiceId",
                    "isDefaultForNewProjects",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Delete ecosystem_regions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/ecosystems": {
      "get": {
        "tags": [
          "ecosystem"
        ],
        "summary": "List ecosystems",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "description": {
                        "type": "string"
                      },
                      "region": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "dedicatedDbConnectionId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 128
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "primaryDomain": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "isDefault": {
                        "type": "boolean"
                      },
                      "isInfrastructure": {
                        "type": "boolean"
                      },
                      "namespaceId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "ownerId",
                      "slug",
                      "name",
                      "description",
                      "region",
                      "dedicatedDbConnectionId",
                      "primaryDomain",
                      "createdAt",
                      "updatedAt",
                      "isDeleted",
                      "isDefault",
                      "isInfrastructure",
                      "namespaceId"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Create ecosystems",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string"
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "dedicatedDbConnectionId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 128
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "primaryDomain": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "isDefault": {
                    "type": "boolean"
                  },
                  "isInfrastructure": {
                    "type": "boolean"
                  },
                  "namespaceId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "slug",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "ecosystems",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": {
                      "type": "string"
                    },
                    "region": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "dedicatedDbConnectionId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 128
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "primaryDomain": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isInfrastructure": {
                      "type": "boolean"
                    },
                    "namespaceId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "ownerId",
                    "slug",
                    "name",
                    "description",
                    "region",
                    "dedicatedDbConnectionId",
                    "primaryDomain",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "isDefault",
                    "isInfrastructure",
                    "namespaceId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ecosystem/ecosystems/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Get ecosystems by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "ecosystems",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": {
                      "type": "string"
                    },
                    "region": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "dedicatedDbConnectionId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 128
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "primaryDomain": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isInfrastructure": {
                      "type": "boolean"
                    },
                    "namespaceId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "ownerId",
                    "slug",
                    "name",
                    "description",
                    "region",
                    "dedicatedDbConnectionId",
                    "primaryDomain",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "isDefault",
                    "isInfrastructure",
                    "namespaceId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Update ecosystems",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string"
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "dedicatedDbConnectionId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 128
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "primaryDomain": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "isDefault": {
                    "type": "boolean"
                  },
                  "isInfrastructure": {
                    "type": "boolean"
                  },
                  "namespaceId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ecosystems",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": {
                      "type": "string"
                    },
                    "region": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "dedicatedDbConnectionId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 128
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "primaryDomain": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isInfrastructure": {
                      "type": "boolean"
                    },
                    "namespaceId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "ownerId",
                    "slug",
                    "name",
                    "description",
                    "region",
                    "dedicatedDbConnectionId",
                    "primaryDomain",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "isDefault",
                    "isInfrastructure",
                    "namespaceId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ecosystem"
        ],
        "summary": "Delete ecosystems",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-bookmarks": {
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "List integration_bookmarks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "connectionId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "externalId": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "sourceProvider": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "title": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "url": {
                        "type": "string"
                      },
                      "excerpt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "note": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tags": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "imageUrl": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "collectionId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "collectionName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isFavorite": {
                        "type": "boolean"
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "externalCreatedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "connectionId",
                      "externalId",
                      "sourceProvider",
                      "title",
                      "url",
                      "excerpt",
                      "note",
                      "tags",
                      "imageUrl",
                      "collectionId",
                      "collectionName",
                      "isFavorite",
                      "isDeleted",
                      "externalCreatedAt",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "integration"
        ],
        "summary": "Create integration_bookmarks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "sourceProvider": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "url": {
                    "type": "string"
                  },
                  "excerpt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tags": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "imageUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "collectionId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "collectionName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isFavorite": {
                    "type": "boolean"
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "externalCreatedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "connectionId",
                  "externalId",
                  "sourceProvider",
                  "title",
                  "url"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "integration_bookmarks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceProvider": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "url": {
                      "type": "string"
                    },
                    "excerpt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "note": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "imageUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "collectionId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "collectionName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isFavorite": {
                      "type": "boolean"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "externalCreatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "sourceProvider",
                    "title",
                    "url",
                    "excerpt",
                    "note",
                    "tags",
                    "imageUrl",
                    "collectionId",
                    "collectionName",
                    "isFavorite",
                    "isDeleted",
                    "externalCreatedAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-bookmarks/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "Get integration_bookmarks by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "integration_bookmarks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceProvider": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "url": {
                      "type": "string"
                    },
                    "excerpt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "note": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "imageUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "collectionId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "collectionName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isFavorite": {
                      "type": "boolean"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "externalCreatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "sourceProvider",
                    "title",
                    "url",
                    "excerpt",
                    "note",
                    "tags",
                    "imageUrl",
                    "collectionId",
                    "collectionName",
                    "isFavorite",
                    "isDeleted",
                    "externalCreatedAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "integration"
        ],
        "summary": "Update integration_bookmarks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "sourceProvider": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "url": {
                    "type": "string"
                  },
                  "excerpt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tags": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "imageUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "collectionId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "collectionName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isFavorite": {
                    "type": "boolean"
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "externalCreatedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "integration_bookmarks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceProvider": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "url": {
                      "type": "string"
                    },
                    "excerpt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "note": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "imageUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "collectionId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "collectionName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isFavorite": {
                      "type": "boolean"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "externalCreatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "sourceProvider",
                    "title",
                    "url",
                    "excerpt",
                    "note",
                    "tags",
                    "imageUrl",
                    "collectionId",
                    "collectionName",
                    "isFavorite",
                    "isDeleted",
                    "externalCreatedAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "integration"
        ],
        "summary": "Delete integration_bookmarks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-calendar-events": {
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "List integration_calendar_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "title": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "description": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "startTime": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "endTime": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "startDate": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 10
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "endDate": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 10
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isAllDay": {
                        "type": "boolean"
                      },
                      "location": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "source": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "externalId": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "connectionId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "calendarName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "calendarColor": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 20
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "organizer": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "attendees": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "reminders": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "url": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "aiExtraction": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "title",
                      "description",
                      "startTime",
                      "endTime",
                      "startDate",
                      "endDate",
                      "isAllDay",
                      "location",
                      "source",
                      "externalId",
                      "connectionId",
                      "calendarName",
                      "calendarColor",
                      "status",
                      "organizer",
                      "attendees",
                      "reminders",
                      "url",
                      "aiExtraction",
                      "createdAt",
                      "updatedAt",
                      "isDeleted",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "integration"
        ],
        "summary": "Create integration_calendar_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "startTime": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "endTime": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "startDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "endDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isAllDay": {
                    "type": "boolean"
                  },
                  "location": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "connectionId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "calendarName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "calendarColor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 20
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "organizer": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "attendees": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reminders": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "aiExtraction": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "title",
                  "source",
                  "externalId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "integration_calendar_events",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "startTime": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "endTime": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "startDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isAllDay": {
                      "type": "boolean"
                    },
                    "location": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "connectionId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "calendarName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "calendarColor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 20
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "organizer": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "attendees": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reminders": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "aiExtraction": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "description",
                    "startTime",
                    "endTime",
                    "startDate",
                    "endDate",
                    "isAllDay",
                    "location",
                    "source",
                    "externalId",
                    "connectionId",
                    "calendarName",
                    "calendarColor",
                    "status",
                    "organizer",
                    "attendees",
                    "reminders",
                    "url",
                    "aiExtraction",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-calendar-events/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "Get integration_calendar_events by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "integration_calendar_events",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "startTime": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "endTime": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "startDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isAllDay": {
                      "type": "boolean"
                    },
                    "location": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "connectionId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "calendarName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "calendarColor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 20
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "organizer": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "attendees": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reminders": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "aiExtraction": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "description",
                    "startTime",
                    "endTime",
                    "startDate",
                    "endDate",
                    "isAllDay",
                    "location",
                    "source",
                    "externalId",
                    "connectionId",
                    "calendarName",
                    "calendarColor",
                    "status",
                    "organizer",
                    "attendees",
                    "reminders",
                    "url",
                    "aiExtraction",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "integration"
        ],
        "summary": "Update integration_calendar_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "startTime": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "endTime": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "startDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "endDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isAllDay": {
                    "type": "boolean"
                  },
                  "location": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "connectionId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "calendarName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "calendarColor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 20
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "organizer": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "attendees": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reminders": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "aiExtraction": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "integration_calendar_events",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "startTime": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "endTime": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "startDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isAllDay": {
                      "type": "boolean"
                    },
                    "location": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "connectionId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "calendarName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "calendarColor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 20
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "organizer": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "attendees": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reminders": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "aiExtraction": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "description",
                    "startTime",
                    "endTime",
                    "startDate",
                    "endDate",
                    "isAllDay",
                    "location",
                    "source",
                    "externalId",
                    "connectionId",
                    "calendarName",
                    "calendarColor",
                    "status",
                    "organizer",
                    "attendees",
                    "reminders",
                    "url",
                    "aiExtraction",
                    "createdAt",
                    "updatedAt",
                    "isDeleted",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "integration"
        ],
        "summary": "Delete integration_calendar_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-financial-transactions": {
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "List integration_financial_transactions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "connectionId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "externalId": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "accountId": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "accountName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "institutionName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "amount": {
                        "type": "string"
                      },
                      "currency": {
                        "type": "string",
                        "maxLength": 10
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "merchantName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "category": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "categoryDetailed": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "transactionDate": {
                        "type": "string",
                        "maxLength": 10
                      },
                      "authorizedDate": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 10
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "pending": {
                        "type": "boolean"
                      },
                      "logoUrl": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "connectionId",
                      "externalId",
                      "accountId",
                      "accountName",
                      "institutionName",
                      "amount",
                      "currency",
                      "name",
                      "merchantName",
                      "category",
                      "categoryDetailed",
                      "transactionDate",
                      "authorizedDate",
                      "pending",
                      "logoUrl",
                      "isDeleted",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "integration"
        ],
        "summary": "Create integration_financial_transactions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "accountId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "accountName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "institutionName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string",
                    "maxLength": 10
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "merchantName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "category": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "categoryDetailed": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "transactionDate": {
                    "type": "string",
                    "maxLength": 10
                  },
                  "authorizedDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pending": {
                    "type": "boolean"
                  },
                  "logoUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "connectionId",
                  "externalId",
                  "accountId",
                  "amount",
                  "name",
                  "transactionDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "integration_financial_transactions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "accountId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "accountName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "institutionName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string",
                      "maxLength": 10
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "merchantName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "category": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "categoryDetailed": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "transactionDate": {
                      "type": "string",
                      "maxLength": 10
                    },
                    "authorizedDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "pending": {
                      "type": "boolean"
                    },
                    "logoUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "accountId",
                    "accountName",
                    "institutionName",
                    "amount",
                    "currency",
                    "name",
                    "merchantName",
                    "category",
                    "categoryDetailed",
                    "transactionDate",
                    "authorizedDate",
                    "pending",
                    "logoUrl",
                    "isDeleted",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-financial-transactions/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "Get integration_financial_transactions by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "integration_financial_transactions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "accountId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "accountName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "institutionName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string",
                      "maxLength": 10
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "merchantName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "category": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "categoryDetailed": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "transactionDate": {
                      "type": "string",
                      "maxLength": 10
                    },
                    "authorizedDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "pending": {
                      "type": "boolean"
                    },
                    "logoUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "accountId",
                    "accountName",
                    "institutionName",
                    "amount",
                    "currency",
                    "name",
                    "merchantName",
                    "category",
                    "categoryDetailed",
                    "transactionDate",
                    "authorizedDate",
                    "pending",
                    "logoUrl",
                    "isDeleted",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "integration"
        ],
        "summary": "Update integration_financial_transactions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "accountId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "accountName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "institutionName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "amount": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string",
                    "maxLength": 10
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "merchantName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "category": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "categoryDetailed": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "transactionDate": {
                    "type": "string",
                    "maxLength": 10
                  },
                  "authorizedDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pending": {
                    "type": "boolean"
                  },
                  "logoUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "integration_financial_transactions",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "accountId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "accountName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "institutionName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "amount": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string",
                      "maxLength": 10
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "merchantName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "category": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "categoryDetailed": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "transactionDate": {
                      "type": "string",
                      "maxLength": 10
                    },
                    "authorizedDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "pending": {
                      "type": "boolean"
                    },
                    "logoUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "accountId",
                    "accountName",
                    "institutionName",
                    "amount",
                    "currency",
                    "name",
                    "merchantName",
                    "category",
                    "categoryDetailed",
                    "transactionDate",
                    "authorizedDate",
                    "pending",
                    "logoUrl",
                    "isDeleted",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "integration"
        ],
        "summary": "Delete integration_financial_transactions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-items": {
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "List integration_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "connectionId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "externalId": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "itemType": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "title": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "body": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "state": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "repoFullName": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "repoUrl": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "itemUrl": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "number": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "labels": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "assignees": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isRead": {
                        "type": "boolean"
                      },
                      "notificationReason": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 50
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "externalCreatedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "connectionId",
                      "externalId",
                      "itemType",
                      "title",
                      "body",
                      "state",
                      "repoFullName",
                      "repoUrl",
                      "itemUrl",
                      "number",
                      "labels",
                      "assignees",
                      "isRead",
                      "notificationReason",
                      "isDeleted",
                      "externalCreatedAt",
                      "externalUpdatedAt",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "integration"
        ],
        "summary": "Create integration_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "itemType": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "body": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "repoFullName": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "repoUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "itemUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "number": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "labels": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "assignees": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isRead": {
                    "type": "boolean"
                  },
                  "notificationReason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "externalCreatedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "connectionId",
                  "externalId",
                  "itemType",
                  "title",
                  "state",
                  "repoFullName"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "integration_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "itemType": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "body": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "repoFullName": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "repoUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "itemUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "number": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "labels": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "assignees": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isRead": {
                      "type": "boolean"
                    },
                    "notificationReason": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 50
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "externalCreatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalUpdatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "itemType",
                    "title",
                    "body",
                    "state",
                    "repoFullName",
                    "repoUrl",
                    "itemUrl",
                    "number",
                    "labels",
                    "assignees",
                    "isRead",
                    "notificationReason",
                    "isDeleted",
                    "externalCreatedAt",
                    "externalUpdatedAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-items/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "Get integration_items by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "integration_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "itemType": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "body": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "repoFullName": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "repoUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "itemUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "number": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "labels": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "assignees": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isRead": {
                      "type": "boolean"
                    },
                    "notificationReason": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 50
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "externalCreatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalUpdatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "itemType",
                    "title",
                    "body",
                    "state",
                    "repoFullName",
                    "repoUrl",
                    "itemUrl",
                    "number",
                    "labels",
                    "assignees",
                    "isRead",
                    "notificationReason",
                    "isDeleted",
                    "externalCreatedAt",
                    "externalUpdatedAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "integration"
        ],
        "summary": "Update integration_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "itemType": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "body": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "repoFullName": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "repoUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "itemUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "number": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "labels": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "assignees": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isRead": {
                    "type": "boolean"
                  },
                  "notificationReason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "externalCreatedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "integration_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "itemType": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "body": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "repoFullName": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "repoUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "itemUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "number": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "labels": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "assignees": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isRead": {
                      "type": "boolean"
                    },
                    "notificationReason": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 50
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "externalCreatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalUpdatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "itemType",
                    "title",
                    "body",
                    "state",
                    "repoFullName",
                    "repoUrl",
                    "itemUrl",
                    "number",
                    "labels",
                    "assignees",
                    "isRead",
                    "notificationReason",
                    "isDeleted",
                    "externalCreatedAt",
                    "externalUpdatedAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "integration"
        ],
        "summary": "Delete integration_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-media-items": {
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "List integration_media_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "connectionId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "externalId": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "sourceProvider": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "mediaType": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "title": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "artist": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "album": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "imageUrl": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalUrl": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "durationMs": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "popularity": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isSaved": {
                        "type": "boolean"
                      },
                      "lastPlayedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "connectionId",
                      "externalId",
                      "sourceProvider",
                      "mediaType",
                      "title",
                      "artist",
                      "album",
                      "imageUrl",
                      "externalUrl",
                      "durationMs",
                      "popularity",
                      "isSaved",
                      "lastPlayedAt",
                      "isDeleted",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "integration"
        ],
        "summary": "Create integration_media_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "sourceProvider": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "mediaType": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "artist": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "album": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "imageUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "durationMs": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "popularity": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isSaved": {
                    "type": "boolean"
                  },
                  "lastPlayedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "connectionId",
                  "externalId",
                  "sourceProvider",
                  "mediaType",
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "integration_media_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceProvider": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "mediaType": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "artist": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "album": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "imageUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "durationMs": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "popularity": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isSaved": {
                      "type": "boolean"
                    },
                    "lastPlayedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "sourceProvider",
                    "mediaType",
                    "title",
                    "artist",
                    "album",
                    "imageUrl",
                    "externalUrl",
                    "durationMs",
                    "popularity",
                    "isSaved",
                    "lastPlayedAt",
                    "isDeleted",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-media-items/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "Get integration_media_items by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "integration_media_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceProvider": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "mediaType": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "artist": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "album": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "imageUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "durationMs": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "popularity": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isSaved": {
                      "type": "boolean"
                    },
                    "lastPlayedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "sourceProvider",
                    "mediaType",
                    "title",
                    "artist",
                    "album",
                    "imageUrl",
                    "externalUrl",
                    "durationMs",
                    "popularity",
                    "isSaved",
                    "lastPlayedAt",
                    "isDeleted",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "integration"
        ],
        "summary": "Update integration_media_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "sourceProvider": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "mediaType": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "artist": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "album": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "imageUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "durationMs": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "popularity": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isSaved": {
                    "type": "boolean"
                  },
                  "lastPlayedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "integration_media_items",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceProvider": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "mediaType": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "artist": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "album": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "imageUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "durationMs": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "popularity": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isSaved": {
                      "type": "boolean"
                    },
                    "lastPlayedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "sourceProvider",
                    "mediaType",
                    "title",
                    "artist",
                    "album",
                    "imageUrl",
                    "externalUrl",
                    "durationMs",
                    "popularity",
                    "isSaved",
                    "lastPlayedAt",
                    "isDeleted",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "integration"
        ],
        "summary": "Delete integration_media_items",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-pages": {
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "List integration_pages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "connectionId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "externalId": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "title": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "objectType": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "url": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "icon": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 10
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "parentType": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 20
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "parentId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isArchived": {
                        "type": "boolean"
                      },
                      "lastEditedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "connectionId",
                      "externalId",
                      "title",
                      "objectType",
                      "url",
                      "icon",
                      "parentType",
                      "parentId",
                      "isArchived",
                      "lastEditedAt",
                      "isDeleted",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "integration"
        ],
        "summary": "Create integration_pages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "objectType": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "icon": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "parentType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 20
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isArchived": {
                    "type": "boolean"
                  },
                  "lastEditedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "connectionId",
                  "externalId",
                  "objectType"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "integration_pages",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "objectType": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "icon": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "parentType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 20
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "parentId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isArchived": {
                      "type": "boolean"
                    },
                    "lastEditedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "title",
                    "objectType",
                    "url",
                    "icon",
                    "parentType",
                    "parentId",
                    "isArchived",
                    "lastEditedAt",
                    "isDeleted",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-pages/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "Get integration_pages by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "integration_pages",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "objectType": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "icon": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "parentType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 20
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "parentId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isArchived": {
                      "type": "boolean"
                    },
                    "lastEditedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "title",
                    "objectType",
                    "url",
                    "icon",
                    "parentType",
                    "parentId",
                    "isArchived",
                    "lastEditedAt",
                    "isDeleted",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "integration"
        ],
        "summary": "Update integration_pages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "objectType": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "icon": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "parentType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 20
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isArchived": {
                    "type": "boolean"
                  },
                  "lastEditedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "integration_pages",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "objectType": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "icon": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "parentType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 20
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "parentId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isArchived": {
                      "type": "boolean"
                    },
                    "lastEditedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "title",
                    "objectType",
                    "url",
                    "icon",
                    "parentType",
                    "parentId",
                    "isArchived",
                    "lastEditedAt",
                    "isDeleted",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "integration"
        ],
        "summary": "Delete integration_pages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-social-notifications": {
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "List integration_social_notifications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "connectionId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "externalId": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "sourceProvider": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "notificationType": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "title": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "body": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "authorHandle": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "authorDisplayName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "itemUrl": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isRead": {
                        "type": "boolean"
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "externalCreatedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "connectionId",
                      "externalId",
                      "sourceProvider",
                      "notificationType",
                      "title",
                      "body",
                      "authorHandle",
                      "authorDisplayName",
                      "itemUrl",
                      "isRead",
                      "isDeleted",
                      "externalCreatedAt",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "integration"
        ],
        "summary": "Create integration_social_notifications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "sourceProvider": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "notificationType": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "title": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "body": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "authorHandle": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "authorDisplayName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "itemUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isRead": {
                    "type": "boolean"
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "externalCreatedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "connectionId",
                  "externalId",
                  "sourceProvider",
                  "notificationType"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "integration_social_notifications",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceProvider": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "notificationType": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "body": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "authorHandle": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "authorDisplayName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "itemUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isRead": {
                      "type": "boolean"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "externalCreatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "sourceProvider",
                    "notificationType",
                    "title",
                    "body",
                    "authorHandle",
                    "authorDisplayName",
                    "itemUrl",
                    "isRead",
                    "isDeleted",
                    "externalCreatedAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integration/integration-social-notifications/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "integration"
        ],
        "summary": "Get integration_social_notifications by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "integration_social_notifications",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceProvider": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "notificationType": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "body": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "authorHandle": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "authorDisplayName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "itemUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isRead": {
                      "type": "boolean"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "externalCreatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "sourceProvider",
                    "notificationType",
                    "title",
                    "body",
                    "authorHandle",
                    "authorDisplayName",
                    "itemUrl",
                    "isRead",
                    "isDeleted",
                    "externalCreatedAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "integration"
        ],
        "summary": "Update integration_social_notifications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "sourceProvider": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "notificationType": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "title": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "body": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "authorHandle": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "authorDisplayName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "itemUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isRead": {
                    "type": "boolean"
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "externalCreatedAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "integration_social_notifications",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceProvider": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "notificationType": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "body": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "authorHandle": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "authorDisplayName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "itemUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isRead": {
                      "type": "boolean"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "externalCreatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "sourceProvider",
                    "notificationType",
                    "title",
                    "body",
                    "authorHandle",
                    "authorDisplayName",
                    "itemUrl",
                    "isRead",
                    "isDeleted",
                    "externalCreatedAt",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "integration"
        ],
        "summary": "Delete integration_social_notifications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/endpoints": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "List endpoints",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "siteId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "userId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "kind": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "url": {
                        "type": "string",
                        "maxLength": 2048
                      },
                      "expectedStatus": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "expectedBodyContains": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "timeoutMs": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "degradedThresholdMs": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "checkIntervalSeconds": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "isActive": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "siteId",
                      "userId",
                      "ownerKind",
                      "ownerId",
                      "kind",
                      "url",
                      "expectedStatus",
                      "expectedBodyContains",
                      "timeoutMs",
                      "degradedThresholdMs",
                      "checkIntervalSeconds",
                      "isActive",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Create endpoints",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "siteId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "kind": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "expectedStatus": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "expectedBodyContains": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "degradedThresholdMs": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "checkIntervalSeconds": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "siteId",
                  "url"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "siteId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "expectedStatus": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "expectedBodyContains": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "timeoutMs": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "degradedThresholdMs": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "checkIntervalSeconds": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "isActive": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "siteId",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "kind",
                    "url",
                    "expectedStatus",
                    "expectedBodyContains",
                    "timeoutMs",
                    "degradedThresholdMs",
                    "checkIntervalSeconds",
                    "isActive",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/endpoints/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get endpoints by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "siteId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "expectedStatus": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "expectedBodyContains": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "timeoutMs": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "degradedThresholdMs": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "checkIntervalSeconds": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "isActive": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "siteId",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "kind",
                    "url",
                    "expectedStatus",
                    "expectedBodyContains",
                    "timeoutMs",
                    "degradedThresholdMs",
                    "checkIntervalSeconds",
                    "isActive",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "monitoring"
        ],
        "summary": "Update endpoints",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "siteId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "kind": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "expectedStatus": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "expectedBodyContains": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "degradedThresholdMs": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "checkIntervalSeconds": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "siteId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "kind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "expectedStatus": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "expectedBodyContains": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "timeoutMs": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "degradedThresholdMs": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "checkIntervalSeconds": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "isActive": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "siteId",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "kind",
                    "url",
                    "expectedStatus",
                    "expectedBodyContains",
                    "timeoutMs",
                    "degradedThresholdMs",
                    "checkIntervalSeconds",
                    "isActive",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "monitoring"
        ],
        "summary": "Delete endpoints",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/health-checks": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "List health_checks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "endpointId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "userId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "status": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "responseTimeMs": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "statusCode": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "errorMessage": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "checkedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "endpointId",
                      "userId",
                      "ownerKind",
                      "ownerId",
                      "status",
                      "responseTimeMs",
                      "statusCode",
                      "errorMessage",
                      "checkedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Create health_checks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "endpointId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "responseTimeMs": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "statusCode": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "errorMessage": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "checkedAt": {
                    "type": "string"
                  }
                },
                "required": [
                  "endpointId",
                  "status",
                  "checkedAt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "health_checks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "endpointId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "responseTimeMs": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "statusCode": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "errorMessage": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "checkedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "endpointId",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "status",
                    "responseTimeMs",
                    "statusCode",
                    "errorMessage",
                    "checkedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/health-checks/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get health_checks by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "health_checks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "endpointId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "responseTimeMs": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "statusCode": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "errorMessage": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "checkedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "endpointId",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "status",
                    "responseTimeMs",
                    "statusCode",
                    "errorMessage",
                    "checkedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "monitoring"
        ],
        "summary": "Update health_checks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "endpointId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "responseTimeMs": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "statusCode": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "errorMessage": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "checkedAt": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "health_checks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "endpointId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "responseTimeMs": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "statusCode": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "errorMessage": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "checkedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "endpointId",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "status",
                    "responseTimeMs",
                    "statusCode",
                    "errorMessage",
                    "checkedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "monitoring"
        ],
        "summary": "Delete health_checks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/site-groups": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "List site_groups",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "userId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 80
                      },
                      "description": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "retentionDays": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "displayOrder": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "userId",
                      "ownerKind",
                      "ownerId",
                      "name",
                      "slug",
                      "description",
                      "retentionDays",
                      "displayOrder",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Create site_groups",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retentionDays": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "displayOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "name",
                  "slug"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "site_groups",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "retentionDays": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "displayOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "name",
                    "slug",
                    "description",
                    "retentionDays",
                    "displayOrder",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/site-groups/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get site_groups by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "site_groups",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "retentionDays": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "displayOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "name",
                    "slug",
                    "description",
                    "retentionDays",
                    "displayOrder",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "monitoring"
        ],
        "summary": "Update site_groups",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retentionDays": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "displayOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "site_groups",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "retentionDays": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "displayOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "name",
                    "slug",
                    "description",
                    "retentionDays",
                    "displayOrder",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "monitoring"
        ],
        "summary": "Delete site_groups",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/sites": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "List sites",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "siteGroupId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "userId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 80
                      },
                      "description": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "displayOrder": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "siteGroupId",
                      "userId",
                      "ownerKind",
                      "ownerId",
                      "name",
                      "slug",
                      "description",
                      "displayOrder",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "monitoring"
        ],
        "summary": "Create sites",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "siteGroupId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "displayOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "siteGroupId",
                  "name",
                  "slug"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "sites",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "siteGroupId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "displayOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "siteGroupId",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "name",
                    "slug",
                    "description",
                    "displayOrder",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/sites/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "monitoring"
        ],
        "summary": "Get sites by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "sites",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "siteGroupId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "displayOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "siteGroupId",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "name",
                    "slug",
                    "description",
                    "displayOrder",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "monitoring"
        ],
        "summary": "Update sites",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "siteGroupId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "displayOrder": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "sites",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "siteGroupId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "userId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "displayOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "siteGroupId",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "name",
                    "slug",
                    "description",
                    "displayOrder",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "monitoring"
        ],
        "summary": "Delete sites",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/models": {
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "List models",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "templateId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 120
                      },
                      "createdAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "templateId",
                      "name",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "persona"
        ],
        "summary": "Create models",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "templateId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  }
                },
                "required": [
                  "templateId",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "models",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "templateId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "templateId",
                    "name",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/models/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "Get models by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "models",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "templateId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "templateId",
                    "name",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "persona"
        ],
        "summary": "Update models",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "templateId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "models",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "templateId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "templateId",
                    "name",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "persona"
        ],
        "summary": "Delete models",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/personas": {
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "List personas",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "userId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 120
                      },
                      "description": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "visibility": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "model": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "serviceId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "appId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "avatarAttachmentId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "modelPrompt": {
                        "type": "string"
                      },
                      "voice": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "character": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "examples": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "ownedEcosystemId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "userId",
                      "ownerKind",
                      "ownerId",
                      "slug",
                      "name",
                      "description",
                      "visibility",
                      "model",
                      "serviceId",
                      "appId",
                      "avatarAttachmentId",
                      "modelPrompt",
                      "voice",
                      "character",
                      "examples",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "persona"
        ],
        "summary": "Create personas",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "visibility": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "model": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "serviceId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "appId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avatarAttachmentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "modelPrompt": {
                    "type": "string"
                  },
                  "voice": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "character": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "examples": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "slug",
                  "name",
                  "model",
                  "modelPrompt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "personas",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "userId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "visibility": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "model": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "serviceId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "appId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avatarAttachmentId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "modelPrompt": {
                      "type": "string"
                    },
                    "voice": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "character": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "examples": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "ownedEcosystemId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "slug",
                    "name",
                    "description",
                    "visibility",
                    "model",
                    "serviceId",
                    "appId",
                    "avatarAttachmentId",
                    "modelPrompt",
                    "voice",
                    "character",
                    "examples",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/personas/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "Get personas by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "personas",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "userId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "visibility": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "model": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "serviceId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "appId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avatarAttachmentId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "modelPrompt": {
                      "type": "string"
                    },
                    "voice": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "character": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "examples": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "ownedEcosystemId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "slug",
                    "name",
                    "description",
                    "visibility",
                    "model",
                    "serviceId",
                    "appId",
                    "avatarAttachmentId",
                    "modelPrompt",
                    "voice",
                    "character",
                    "examples",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "persona"
        ],
        "summary": "Update personas",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "visibility": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "model": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "serviceId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "appId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avatarAttachmentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "modelPrompt": {
                    "type": "string"
                  },
                  "voice": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "character": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "examples": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "personas",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "userId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "visibility": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "model": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "serviceId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "appId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avatarAttachmentId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "modelPrompt": {
                      "type": "string"
                    },
                    "voice": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "character": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "examples": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "ownedEcosystemId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "ownerKind",
                    "ownerId",
                    "slug",
                    "name",
                    "description",
                    "visibility",
                    "model",
                    "serviceId",
                    "appId",
                    "avatarAttachmentId",
                    "modelPrompt",
                    "voice",
                    "character",
                    "examples",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "persona"
        ],
        "summary": "Delete personas",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/service-templates": {
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "List service_templates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "providerKind": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 120
                      },
                      "baseUrl": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "documentationUrl": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "statusUrl": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "connectionSpec": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "providerKind",
                      "name",
                      "baseUrl",
                      "documentationUrl",
                      "statusUrl",
                      "connectionSpec",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "persona"
        ],
        "summary": "Create service_templates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "providerKind": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "baseUrl": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "documentationUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "statusUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "connectionSpec": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "providerKind",
                  "name",
                  "baseUrl"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "service_templates",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "providerKind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "baseUrl": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "documentationUrl": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "statusUrl": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "connectionSpec": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "providerKind",
                    "name",
                    "baseUrl",
                    "documentationUrl",
                    "statusUrl",
                    "connectionSpec",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/service-templates/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "Get service_templates by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "service_templates",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "providerKind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "baseUrl": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "documentationUrl": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "statusUrl": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "connectionSpec": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "providerKind",
                    "name",
                    "baseUrl",
                    "documentationUrl",
                    "statusUrl",
                    "connectionSpec",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "persona"
        ],
        "summary": "Update service_templates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "providerKind": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "baseUrl": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "documentationUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "statusUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "connectionSpec": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "service_templates",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "providerKind": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "baseUrl": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "documentationUrl": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "statusUrl": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "connectionSpec": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "providerKind",
                    "name",
                    "baseUrl",
                    "documentationUrl",
                    "statusUrl",
                    "connectionSpec",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "persona"
        ],
        "summary": "Delete service_templates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/tool-templates": {
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "List tool_templates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "toolKey": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "sourceKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "displayName": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 1024
                      },
                      "readOnly": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "toolKey",
                      "sourceKind",
                      "displayName",
                      "description",
                      "readOnly",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "persona"
        ],
        "summary": "Create tool_templates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "toolKey": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "sourceKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "displayName": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1024
                  },
                  "readOnly": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "toolKey",
                  "sourceKind",
                  "displayName"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "tool_templates",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "toolKey": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "displayName": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 1024
                    },
                    "readOnly": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "toolKey",
                    "sourceKind",
                    "displayName",
                    "description",
                    "readOnly",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona/tool-templates/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "persona"
        ],
        "summary": "Get tool_templates by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "tool_templates",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "toolKey": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "displayName": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 1024
                    },
                    "readOnly": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "toolKey",
                    "sourceKind",
                    "displayName",
                    "description",
                    "readOnly",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "persona"
        ],
        "summary": "Update tool_templates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "toolKey": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "sourceKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "displayName": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1024
                  },
                  "readOnly": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "tool_templates",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "toolKey": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "displayName": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 1024
                    },
                    "readOnly": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "toolKey",
                    "sourceKind",
                    "displayName",
                    "description",
                    "readOnly",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "persona"
        ],
        "summary": "Delete tool_templates",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona-memory/blocks": {
      "get": {
        "tags": [
          "persona_memory"
        ],
        "summary": "List blocks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "content": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "sizeLimit": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "name",
                      "content",
                      "sizeLimit",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Create blocks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "content": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "sizeLimit": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "name",
                  "content"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "blocks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "content": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "sizeLimit": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "name",
                    "content",
                    "sizeLimit",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona-memory/blocks/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Get blocks by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "blocks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "content": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "sizeLimit": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "name",
                    "content",
                    "sizeLimit",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Update blocks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "content": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "array",
                        "items": {}
                      }
                    ]
                  },
                  "sizeLimit": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "blocks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "content": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "sizeLimit": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "name",
                    "content",
                    "sizeLimit",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Delete blocks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona-memory/facts": {
      "get": {
        "tags": [
          "persona_memory"
        ],
        "summary": "List facts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "personaId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "scope": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "memoryId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "subjectTable": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "subjectId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "predicate": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "objectTable": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "objectId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "objectValue": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "source": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "confidence": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "validFrom": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "validTo": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "supersedesId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "personaId",
                      "scope",
                      "memoryId",
                      "subjectTable",
                      "subjectId",
                      "predicate",
                      "objectTable",
                      "objectId",
                      "objectValue",
                      "source",
                      "confidence",
                      "validFrom",
                      "validTo",
                      "status",
                      "supersedesId",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Create facts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "personaId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "scope": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "memoryId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subjectTable": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subjectId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "predicate": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "objectTable": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "objectId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "objectValue": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "confidence": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "validFrom": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "validTo": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "supersedesId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "personaId",
                  "predicate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "facts",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "personaId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "memoryId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subjectTable": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subjectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "predicate": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "objectTable": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "objectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "objectValue": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "confidence": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "validFrom": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "validTo": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "supersedesId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "personaId",
                    "scope",
                    "memoryId",
                    "subjectTable",
                    "subjectId",
                    "predicate",
                    "objectTable",
                    "objectId",
                    "objectValue",
                    "source",
                    "confidence",
                    "validFrom",
                    "validTo",
                    "status",
                    "supersedesId",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona-memory/facts/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Get facts by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "facts",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "personaId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "memoryId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subjectTable": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subjectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "predicate": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "objectTable": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "objectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "objectValue": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "confidence": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "validFrom": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "validTo": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "supersedesId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "personaId",
                    "scope",
                    "memoryId",
                    "subjectTable",
                    "subjectId",
                    "predicate",
                    "objectTable",
                    "objectId",
                    "objectValue",
                    "source",
                    "confidence",
                    "validFrom",
                    "validTo",
                    "status",
                    "supersedesId",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Update facts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "personaId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "scope": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "memoryId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subjectTable": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subjectId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "predicate": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "objectTable": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "objectId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "objectValue": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "confidence": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "validFrom": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "validTo": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "supersedesId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "facts",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "personaId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "memoryId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subjectTable": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subjectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "predicate": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "objectTable": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "objectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "objectValue": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "confidence": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "validFrom": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "validTo": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "supersedesId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "personaId",
                    "scope",
                    "memoryId",
                    "subjectTable",
                    "subjectId",
                    "predicate",
                    "objectTable",
                    "objectId",
                    "objectValue",
                    "source",
                    "confidence",
                    "validFrom",
                    "validTo",
                    "status",
                    "supersedesId",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Delete facts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona-memory/links": {
      "get": {
        "tags": [
          "persona_memory"
        ],
        "summary": "List links",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "srcId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "dstId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "relation": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "srcId",
                      "dstId",
                      "relation",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Create links",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "srcId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "dstId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "relation": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "srcId",
                  "dstId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "links",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "srcId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "dstId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "relation": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "srcId",
                    "dstId",
                    "relation",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona-memory/links/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Get links by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "links",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "srcId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "dstId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "relation": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "srcId",
                    "dstId",
                    "relation",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Update links",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "srcId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "dstId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "relation": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "links",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "srcId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "dstId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "relation": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "srcId",
                    "dstId",
                    "relation",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Delete links",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona-memory/memories": {
      "get": {
        "tags": [
          "persona_memory"
        ],
        "summary": "List memories",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "personaId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "scope": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 120
                      },
                      "memoryType": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "body": {
                        "type": "string"
                      },
                      "subjectTable": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "subjectId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "supersedesId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "source": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "confidence": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "validFrom": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "validTo": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "recallCount": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "lastRecalledAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "embedding": {
                        "anyOf": [
                          {
                            "minItems": 1536,
                            "maxItems": 1536,
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "embeddingModel": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "customerId",
                      "deletedAt",
                      "personaId",
                      "scope",
                      "slug",
                      "memoryType",
                      "description",
                      "body",
                      "subjectTable",
                      "subjectId",
                      "status",
                      "supersedesId",
                      "source",
                      "confidence",
                      "tags",
                      "validFrom",
                      "validTo",
                      "recallCount",
                      "lastRecalledAt",
                      "embedding",
                      "embeddingModel",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Create memories",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "personaId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "scope": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "memoryType": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "body": {
                    "type": "string"
                  },
                  "subjectTable": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subjectId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "supersedesId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "confidence": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "validFrom": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "validTo": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "personaId",
                  "slug",
                  "memoryType",
                  "description",
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "memories",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "personaId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "memoryType": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "body": {
                      "type": "string"
                    },
                    "subjectTable": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subjectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "supersedesId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "confidence": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "validFrom": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "validTo": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "recallCount": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "lastRecalledAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "embedding": {
                      "anyOf": [
                        {
                          "minItems": 1536,
                          "maxItems": 1536,
                          "type": "array",
                          "items": {
                            "type": "number"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "embeddingModel": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 64
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "personaId",
                    "scope",
                    "slug",
                    "memoryType",
                    "description",
                    "body",
                    "subjectTable",
                    "subjectId",
                    "status",
                    "supersedesId",
                    "source",
                    "confidence",
                    "tags",
                    "validFrom",
                    "validTo",
                    "recallCount",
                    "lastRecalledAt",
                    "embedding",
                    "embeddingModel",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/persona-memory/memories/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Get memories by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "memories",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "personaId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "memoryType": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "body": {
                      "type": "string"
                    },
                    "subjectTable": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subjectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "supersedesId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "confidence": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "validFrom": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "validTo": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "recallCount": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "lastRecalledAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "embedding": {
                      "anyOf": [
                        {
                          "minItems": 1536,
                          "maxItems": 1536,
                          "type": "array",
                          "items": {
                            "type": "number"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "embeddingModel": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 64
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "personaId",
                    "scope",
                    "slug",
                    "memoryType",
                    "description",
                    "body",
                    "subjectTable",
                    "subjectId",
                    "status",
                    "supersedesId",
                    "source",
                    "confidence",
                    "tags",
                    "validFrom",
                    "validTo",
                    "recallCount",
                    "lastRecalledAt",
                    "embedding",
                    "embeddingModel",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Update memories",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "personaId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "scope": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "memoryType": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "body": {
                    "type": "string"
                  },
                  "subjectTable": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subjectId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "supersedesId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "confidence": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "validFrom": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "validTo": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "memories",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "personaId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "memoryType": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "body": {
                      "type": "string"
                    },
                    "subjectTable": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subjectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "supersedesId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "confidence": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "validFrom": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "validTo": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "recallCount": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "lastRecalledAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "embedding": {
                      "anyOf": [
                        {
                          "minItems": 1536,
                          "maxItems": 1536,
                          "type": "array",
                          "items": {
                            "type": "number"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "embeddingModel": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 64
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "customerId",
                    "deletedAt",
                    "personaId",
                    "scope",
                    "slug",
                    "memoryType",
                    "description",
                    "body",
                    "subjectTable",
                    "subjectId",
                    "status",
                    "supersedesId",
                    "source",
                    "confidence",
                    "tags",
                    "validFrom",
                    "validTo",
                    "recallCount",
                    "lastRecalledAt",
                    "embedding",
                    "embeddingModel",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "persona_memory"
        ],
        "summary": "Delete memories",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/personal/education": {
      "get": {
        "tags": [
          "personal"
        ],
        "summary": "List education",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "institution": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "degree": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "fieldOfStudy": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "startDate": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "endDate": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 32
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "location": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "description": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "institution",
                      "degree",
                      "fieldOfStudy",
                      "startDate",
                      "endDate",
                      "location",
                      "description",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "personal"
        ],
        "summary": "Create education",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "institution": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "degree": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "fieldOfStudy": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "startDate": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "endDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 32
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "location": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "education",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "institution": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "degree": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "fieldOfStudy": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "startDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 32
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "location": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "institution",
                    "degree",
                    "fieldOfStudy",
                    "startDate",
                    "endDate",
                    "location",
                    "description",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/personal/education/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "personal"
        ],
        "summary": "Get education by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "education",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "institution": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "degree": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "fieldOfStudy": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "startDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 32
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "location": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "institution",
                    "degree",
                    "fieldOfStudy",
                    "startDate",
                    "endDate",
                    "location",
                    "description",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "personal"
        ],
        "summary": "Update education",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "institution": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "degree": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "fieldOfStudy": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "startDate": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "endDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 32
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "location": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "education",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "institution": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "degree": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "fieldOfStudy": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "startDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 32
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "location": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "institution",
                    "degree",
                    "fieldOfStudy",
                    "startDate",
                    "endDate",
                    "location",
                    "description",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "personal"
        ],
        "summary": "Delete education",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/personal/jobs": {
      "get": {
        "tags": [
          "personal"
        ],
        "summary": "List jobs",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "company": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "role": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "startDate": {
                        "type": "string",
                        "maxLength": 32
                      },
                      "endDate": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 32
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "location": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "description": {
                        "type": "string"
                      },
                      "isCurrent": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "company",
                      "role",
                      "startDate",
                      "endDate",
                      "location",
                      "description",
                      "isCurrent",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "personal"
        ],
        "summary": "Create jobs",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "company": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "role": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "startDate": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "endDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 32
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "location": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string"
                  },
                  "isCurrent": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "jobs",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "company": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "role": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "startDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 32
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "location": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "isCurrent": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "company",
                    "role",
                    "startDate",
                    "endDate",
                    "location",
                    "description",
                    "isCurrent",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/personal/jobs/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "personal"
        ],
        "summary": "Get jobs by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "jobs",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "company": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "role": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "startDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 32
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "location": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "isCurrent": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "company",
                    "role",
                    "startDate",
                    "endDate",
                    "location",
                    "description",
                    "isCurrent",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "personal"
        ],
        "summary": "Update jobs",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "company": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "role": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "startDate": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "endDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 32
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "location": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string"
                  },
                  "isCurrent": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "jobs",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "company": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "role": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "startDate": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 32
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "location": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string"
                    },
                    "isCurrent": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "company",
                    "role",
                    "startDate",
                    "endDate",
                    "location",
                    "description",
                    "isCurrent",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "personal"
        ],
        "summary": "Delete jobs",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/tasks": {
      "get": {
        "tags": [
          "project"
        ],
        "summary": "List tasks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "connectionId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "externalId": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "sourceProvider": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "title": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "description": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isCompleted": {
                        "type": "boolean"
                      },
                      "priority": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "dueDate": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 10
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dueDatetime": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalProjectId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalProjectName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "labels": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "url": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isDeleted": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "connectionId",
                      "externalId",
                      "sourceProvider",
                      "title",
                      "description",
                      "isCompleted",
                      "priority",
                      "dueDate",
                      "dueDatetime",
                      "externalProjectId",
                      "externalProjectName",
                      "labels",
                      "url",
                      "isDeleted",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "project"
        ],
        "summary": "Create tasks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "sourceProvider": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isCompleted": {
                    "type": "boolean"
                  },
                  "priority": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "dueDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dueDatetime": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalProjectId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalProjectName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "labels": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "connectionId",
                  "externalId",
                  "sourceProvider",
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceProvider": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isCompleted": {
                      "type": "boolean"
                    },
                    "priority": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "dueDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dueDatetime": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalProjectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalProjectName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "labels": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "sourceProvider",
                    "title",
                    "description",
                    "isCompleted",
                    "priority",
                    "dueDate",
                    "dueDatetime",
                    "externalProjectId",
                    "externalProjectName",
                    "labels",
                    "url",
                    "isDeleted",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project/tasks/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "project"
        ],
        "summary": "Get tasks by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceProvider": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isCompleted": {
                      "type": "boolean"
                    },
                    "priority": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "dueDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dueDatetime": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalProjectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalProjectName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "labels": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "sourceProvider",
                    "title",
                    "description",
                    "isCompleted",
                    "priority",
                    "dueDate",
                    "dueDatetime",
                    "externalProjectId",
                    "externalProjectName",
                    "labels",
                    "url",
                    "isDeleted",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "project"
        ],
        "summary": "Update tasks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "connectionId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "externalId": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "sourceProvider": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isCompleted": {
                    "type": "boolean"
                  },
                  "priority": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "dueDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dueDatetime": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalProjectId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalProjectName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "labels": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDeleted": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "connectionId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "externalId": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "sourceProvider": {
                      "type": "string",
                      "maxLength": 20
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isCompleted": {
                      "type": "boolean"
                    },
                    "priority": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "dueDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 10
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dueDatetime": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalProjectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalProjectName": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 255
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "labels": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isDeleted": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "connectionId",
                    "externalId",
                    "sourceProvider",
                    "title",
                    "description",
                    "isCompleted",
                    "priority",
                    "dueDate",
                    "dueDatetime",
                    "externalProjectId",
                    "externalProjectName",
                    "labels",
                    "url",
                    "isDeleted",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "project"
        ],
        "summary": "Delete tasks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/notifications": {
      "get": {
        "tags": [
          "settings"
        ],
        "summary": "List notifications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "customerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "deletedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ecosystemId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "category": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "email": {
                        "type": "boolean"
                      },
                      "sms": {
                        "type": "boolean"
                      },
                      "inApp": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "syncVersion": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "syncStampedAt": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "syncTxid": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "customerId",
                      "deletedAt",
                      "ecosystemId",
                      "category",
                      "email",
                      "sms",
                      "inApp",
                      "createdAt",
                      "updatedAt",
                      "syncVersion",
                      "syncStampedAt",
                      "syncTxid"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "settings"
        ],
        "summary": "Create notifications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "email": {
                    "type": "boolean"
                  },
                  "sms": {
                    "type": "boolean"
                  },
                  "inApp": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "category"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "notifications",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "category": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "email": {
                      "type": "boolean"
                    },
                    "sms": {
                      "type": "boolean"
                    },
                    "inApp": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "category",
                    "email",
                    "sms",
                    "inApp",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/notifications/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "settings"
        ],
        "summary": "Get notifications by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "notifications",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "category": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "email": {
                      "type": "boolean"
                    },
                    "sms": {
                      "type": "boolean"
                    },
                    "inApp": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "category",
                    "email",
                    "sms",
                    "inApp",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "settings"
        ],
        "summary": "Update notifications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "email": {
                    "type": "boolean"
                  },
                  "sms": {
                    "type": "boolean"
                  },
                  "inApp": {
                    "type": "boolean"
                  },
                  "syncTxid": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "notifications",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "customerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "deletedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ecosystemId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "category": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "email": {
                      "type": "boolean"
                    },
                    "sms": {
                      "type": "boolean"
                    },
                    "inApp": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "syncVersion": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "syncStampedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "syncTxid": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "customerId",
                    "deletedAt",
                    "ecosystemId",
                    "category",
                    "email",
                    "sms",
                    "inApp",
                    "createdAt",
                    "updatedAt",
                    "syncVersion",
                    "syncStampedAt",
                    "syncTxid"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "settings"
        ],
        "summary": "Delete notifications",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/system/audit-events": {
      "get": {
        "tags": [
          "system"
        ],
        "summary": "List audit_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ecosystemId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "developerId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "actorUserId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "eventType": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "payload": {
                        "type": "string"
                      },
                      "ipAddress": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "userAgent": {
                        "type": "string",
                        "maxLength": 512
                      },
                      "createdAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "ecosystemId",
                      "developerId",
                      "actorUserId",
                      "eventType",
                      "payload",
                      "ipAddress",
                      "userAgent",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "system"
        ],
        "summary": "Create audit_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "developerId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actorUserId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "eventType": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "payload": {
                    "type": "string"
                  },
                  "ipAddress": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "userAgent": {
                    "type": "string",
                    "maxLength": 512
                  }
                },
                "required": [
                  "eventType"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "audit_events",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "developerId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "actorUserId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "eventType": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "payload": {
                      "type": "string"
                    },
                    "ipAddress": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "userAgent": {
                      "type": "string",
                      "maxLength": 512
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "developerId",
                    "actorUserId",
                    "eventType",
                    "payload",
                    "ipAddress",
                    "userAgent",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/system/audit-events/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "system"
        ],
        "summary": "Get audit_events by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "audit_events",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "developerId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "actorUserId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "eventType": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "payload": {
                      "type": "string"
                    },
                    "ipAddress": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "userAgent": {
                      "type": "string",
                      "maxLength": 512
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "developerId",
                    "actorUserId",
                    "eventType",
                    "payload",
                    "ipAddress",
                    "userAgent",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "system"
        ],
        "summary": "Update audit_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ecosystemId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "developerId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actorUserId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "eventType": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "payload": {
                    "type": "string"
                  },
                  "ipAddress": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "userAgent": {
                    "type": "string",
                    "maxLength": 512
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "audit_events",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ecosystemId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "developerId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "actorUserId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "eventType": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "payload": {
                      "type": "string"
                    },
                    "ipAddress": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "userAgent": {
                      "type": "string",
                      "maxLength": 512
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "ecosystemId",
                    "developerId",
                    "actorUserId",
                    "eventType",
                    "payload",
                    "ipAddress",
                    "userAgent",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "system"
        ],
        "summary": "Delete audit_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/team/teams": {
      "get": {
        "tags": [
          "team"
        ],
        "summary": "List teams",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "ownerKind": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "ownerId": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "description": {
                        "type": "string"
                      },
                      "createdBy": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "isDeleted": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "ownerKind",
                      "ownerId",
                      "slug",
                      "name",
                      "description",
                      "createdBy",
                      "createdAt",
                      "updatedAt",
                      "isDeleted"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "team"
        ],
        "summary": "Create teams",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string"
                  },
                  "isDeleted": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "slug",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "teams",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": {
                      "type": "string"
                    },
                    "createdBy": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "ownerKind",
                    "ownerId",
                    "slug",
                    "name",
                    "description",
                    "createdBy",
                    "createdAt",
                    "updatedAt",
                    "isDeleted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/team/teams/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "team"
        ],
        "summary": "Get teams by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "teams",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": {
                      "type": "string"
                    },
                    "createdBy": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "ownerKind",
                    "ownerId",
                    "slug",
                    "name",
                    "description",
                    "createdBy",
                    "createdAt",
                    "updatedAt",
                    "isDeleted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "team"
        ],
        "summary": "Update teams",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "ownerKind": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "ownerId": {
                    "type": "string",
                    "maxLength": 36
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string"
                  },
                  "isDeleted": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "teams",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "ownerKind": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "ownerId": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": {
                      "type": "string"
                    },
                    "createdBy": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "isDeleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "ownerKind",
                    "ownerId",
                    "slug",
                    "name",
                    "description",
                    "createdBy",
                    "createdAt",
                    "updatedAt",
                    "isDeleted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "team"
        ],
        "summary": "Delete teams",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/usage/principal-tiers": {
      "get": {
        "tags": [
          "usage"
        ],
        "summary": "List principal_tiers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "scope": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "principalId": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "tierId": {
                        "type": "string",
                        "maxLength": 36
                      }
                    },
                    "required": [
                      "scope",
                      "principalId",
                      "tierId"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "usage"
        ],
        "summary": "Create principal_tiers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "principalId": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "tierId": {
                    "type": "string",
                    "maxLength": 36
                  }
                },
                "required": [
                  "scope",
                  "principalId",
                  "tierId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "principal_tiers",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "principalId": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "tierId": {
                      "type": "string",
                      "maxLength": 36
                    }
                  },
                  "required": [
                    "scope",
                    "principalId",
                    "tierId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/usage/principal-tiers/{scope}/{principalId}": {
      "parameters": [
        {
          "name": "scope",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "principalId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "usage"
        ],
        "summary": "Get principal_tiers by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "principal_tiers",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "principalId": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "tierId": {
                      "type": "string",
                      "maxLength": 36
                    }
                  },
                  "required": [
                    "scope",
                    "principalId",
                    "tierId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "usage"
        ],
        "summary": "Update principal_tiers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "principalId": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "tierId": {
                    "type": "string",
                    "maxLength": 36
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "principal_tiers",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "principalId": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "tierId": {
                      "type": "string",
                      "maxLength": 36
                    }
                  },
                  "required": [
                    "scope",
                    "principalId",
                    "tierId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "usage"
        ],
        "summary": "Delete principal_tiers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/usage/rate-limit-tiers": {
      "get": {
        "tags": [
          "usage"
        ],
        "summary": "List rate_limit_tiers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 36
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "rateCapacity": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "rateRefillTokens": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "rateRefillSeconds": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "quotaRequests": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "quotaBytes": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "quotaPeriodDays": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "quotaEnforced": {
                        "type": "boolean"
                      },
                      "isDefault": {
                        "type": "boolean"
                      },
                      "isActive": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "slug",
                      "name",
                      "rateCapacity",
                      "rateRefillTokens",
                      "rateRefillSeconds",
                      "quotaRequests",
                      "quotaBytes",
                      "quotaPeriodDays",
                      "quotaEnforced",
                      "isDefault",
                      "isActive",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "usage"
        ],
        "summary": "Create rate_limit_tiers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "rateCapacity": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "rateRefillTokens": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "rateRefillSeconds": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "quotaRequests": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "quotaBytes": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "quotaPeriodDays": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "quotaEnforced": {
                    "type": "boolean"
                  },
                  "isDefault": {
                    "type": "boolean"
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "slug",
                  "name",
                  "rateCapacity",
                  "rateRefillTokens",
                  "rateRefillSeconds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "rate_limit_tiers",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "rateCapacity": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "rateRefillTokens": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "rateRefillSeconds": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "quotaRequests": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "quotaBytes": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "quotaPeriodDays": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "quotaEnforced": {
                      "type": "boolean"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isActive": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "rateCapacity",
                    "rateRefillTokens",
                    "rateRefillSeconds",
                    "quotaRequests",
                    "quotaBytes",
                    "quotaPeriodDays",
                    "quotaEnforced",
                    "isDefault",
                    "isActive",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/usage/rate-limit-tiers/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "usage"
        ],
        "summary": "Get rate_limit_tiers by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "rate_limit_tiers",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "rateCapacity": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "rateRefillTokens": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "rateRefillSeconds": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "quotaRequests": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "quotaBytes": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "quotaPeriodDays": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "quotaEnforced": {
                      "type": "boolean"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isActive": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "rateCapacity",
                    "rateRefillTokens",
                    "rateRefillSeconds",
                    "quotaRequests",
                    "quotaBytes",
                    "quotaPeriodDays",
                    "quotaEnforced",
                    "isDefault",
                    "isActive",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "usage"
        ],
        "summary": "Update rate_limit_tiers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "rateCapacity": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "rateRefillTokens": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "rateRefillSeconds": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "quotaRequests": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "quotaBytes": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "quotaPeriodDays": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "quotaEnforced": {
                    "type": "boolean"
                  },
                  "isDefault": {
                    "type": "boolean"
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "rate_limit_tiers",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "slug": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "rateCapacity": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "rateRefillTokens": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "rateRefillSeconds": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "quotaRequests": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "quotaBytes": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "quotaPeriodDays": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "quotaEnforced": {
                      "type": "boolean"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isActive": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "rateCapacity",
                    "rateRefillTokens",
                    "rateRefillSeconds",
                    "quotaRequests",
                    "quotaBytes",
                    "quotaPeriodDays",
                    "quotaEnforced",
                    "isDefault",
                    "isActive",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "usage"
        ],
        "summary": "Delete rate_limit_tiers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/usage/usage-counters": {
      "get": {
        "tags": [
          "usage"
        ],
        "summary": "List usage_counters",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "scope": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "principalId": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "periodStart": {
                        "type": "string"
                      },
                      "requests": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "bytes": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "scope",
                      "principalId",
                      "periodStart",
                      "requests",
                      "bytes",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "usage"
        ],
        "summary": "Create usage_counters",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "principalId": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "periodStart": {
                    "type": "string"
                  },
                  "requests": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "bytes": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "scope",
                  "principalId",
                  "periodStart",
                  "requests",
                  "bytes"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "usage_counters",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "principalId": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "periodStart": {
                      "type": "string"
                    },
                    "requests": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "bytes": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "scope",
                    "principalId",
                    "periodStart",
                    "requests",
                    "bytes",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/usage/usage-counters/{scope}/{principalId}/{periodStart}": {
      "parameters": [
        {
          "name": "scope",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "principalId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "periodStart",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "usage"
        ],
        "summary": "Get usage_counters by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "usage_counters",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "principalId": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "periodStart": {
                      "type": "string"
                    },
                    "requests": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "bytes": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "scope",
                    "principalId",
                    "periodStart",
                    "requests",
                    "bytes",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "usage"
        ],
        "summary": "Update usage_counters",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "principalId": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "periodStart": {
                    "type": "string"
                  },
                  "requests": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "bytes": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "usage_counters",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "principalId": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "periodStart": {
                      "type": "string"
                    },
                    "requests": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "bytes": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "scope",
                    "principalId",
                    "periodStart",
                    "requests",
                    "bytes",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "usage"
        ],
        "summary": "Delete usage_counters",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/usage/usage-events": {
      "get": {
        "tags": [
          "usage"
        ],
        "summary": "List usage_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "scope": {
                        "type": "string",
                        "maxLength": 16
                      },
                      "principalId": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "ecosystemId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 36
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "route": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "method": {
                        "type": "string",
                        "maxLength": 8
                      },
                      "status": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "requestBytes": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "responseBytes": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "occurredAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "scope",
                      "principalId",
                      "ecosystemId",
                      "route",
                      "method",
                      "status",
                      "requestBytes",
                      "responseBytes",
                      "occurredAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "usage"
        ],
        "summary": "Create usage_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "principalId": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "ecosystemId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "route": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "method": {
                    "type": "string",
                    "maxLength": 8
                  },
                  "status": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "requestBytes": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "responseBytes": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "occurredAt": {
                    "type": "string"
                  }
                },
                "required": [
                  "scope",
                  "principalId",
                  "route",
                  "method",
                  "status",
                  "requestBytes",
                  "responseBytes",
                  "occurredAt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "usage_events",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "principalId": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "ecosystemId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "route": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "method": {
                      "type": "string",
                      "maxLength": 8
                    },
                    "status": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "requestBytes": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "responseBytes": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "occurredAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "scope",
                    "principalId",
                    "ecosystemId",
                    "route",
                    "method",
                    "status",
                    "requestBytes",
                    "responseBytes",
                    "occurredAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/usage/usage-events/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "tags": [
          "usage"
        ],
        "summary": "Get usage_events by id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "usage_events",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "principalId": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "ecosystemId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "route": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "method": {
                      "type": "string",
                      "maxLength": 8
                    },
                    "status": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "requestBytes": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "responseBytes": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "occurredAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "scope",
                    "principalId",
                    "ecosystemId",
                    "route",
                    "method",
                    "status",
                    "requestBytes",
                    "responseBytes",
                    "occurredAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "usage"
        ],
        "summary": "Update usage_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "principalId": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "ecosystemId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 36
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "route": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "method": {
                    "type": "string",
                    "maxLength": 8
                  },
                  "status": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "requestBytes": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "responseBytes": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "occurredAt": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "usage_events",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "scope": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "principalId": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "ecosystemId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 36
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "route": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "method": {
                      "type": "string",
                      "maxLength": 8
                    },
                    "status": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "requestBytes": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "responseBytes": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "occurredAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "scope",
                    "principalId",
                    "ecosystemId",
                    "route",
                    "method",
                    "status",
                    "requestBytes",
                    "responseBytes",
                    "occurredAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "usage"
        ],
        "summary": "Delete usage_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  }
}
