{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pipeshub/json-schema/pipeshub-oauth-app-response-schema.json",
  "title": "OAuthAppResponse",
  "description": "OAuth app details (without secret). Fields under `required:` always appear\nin `toAppResponse` (`oauth.app.service.ts`); optional URL/description fields\nare only present when set by the caller.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pipeshub-oauth-apps-api-openapi.yml#/components/schemas/OAuthAppResponse",
  "type": "object",
  "required": [
    "id",
    "slug",
    "clientId",
    "name",
    "redirectUris",
    "allowedGrantTypes",
    "allowedScopes",
    "status",
    "isConfidential",
    "accessTokenLifetime",
    "refreshTokenLifetime",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "App ID"
    },
    "slug": {
      "type": "string",
      "description": "URL-friendly app slug"
    },
    "clientId": {
      "type": "string",
      "description": "OAuth client ID"
    },
    "name": {
      "type": "string",
      "description": "App name"
    },
    "description": {
      "type": "string",
      "description": "App description"
    },
    "redirectUris": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      },
      "description": "Allowed redirect URIs (always returned; may be empty)"
    },
    "allowedGrantTypes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Allowed grant types"
    },
    "allowedScopes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Allowed scopes"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "suspended",
        "revoked"
      ],
      "description": "App status"
    },
    "homepageUrl": {
      "type": "string",
      "format": "uri",
      "description": "App homepage"
    },
    "privacyPolicyUrl": {
      "type": "string",
      "format": "uri",
      "description": "Privacy policy URL"
    },
    "termsOfServiceUrl": {
      "type": "string",
      "format": "uri",
      "description": "Terms of service URL"
    },
    "isConfidential": {
      "type": "boolean",
      "description": "Whether app is a confidential client"
    },
    "accessTokenLifetime": {
      "type": "integer",
      "description": "Access token lifetime in seconds"
    },
    "refreshTokenLifetime": {
      "type": "integer",
      "description": "Refresh token lifetime in seconds"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Creation timestamp"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Last update timestamp"
    }
  }
}