{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flowra-dev/json-schema/flowra-dev-toolkit-success-response-schema.json",
  "title": "ToolkitSuccessResponse",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flowra-dev-openapi.json#/components/schemas/ToolkitSuccessResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "description": "Success status"
    },
    "message": {
      "type": "string",
      "description": "Success message"
    },
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "deletedAt": {
          "format": "date-time",
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "logo": {
          "type": "string"
        },
        "appUrl": {
          "type": "string"
        },
        "authSchemes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "providerManagedAuthSchemes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "noAuth": {
          "type": "boolean"
        },
        "isDisabled": {
          "type": "boolean"
        },
        "version": {
          "type": "string"
        },
        "authConfigDetails": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Auth provider name"
              },
              "mode": {
                "enum": [
                  "OAUTH1",
                  "OAUTH2",
                  "S2S_OAUTH2",
                  "API_KEY",
                  "BASIC",
                  "BEARER_TOKEN",
                  "BILLCOM_AUTH",
                  "GOOGLE_SERVICE_ACCOUNT",
                  "NO_AUTH",
                  "BASIC_WITH_JWT",
                  "CALCOM_AUTH",
                  "SERVICE_ACCOUNT",
                  "SAML",
                  "DCR_OAUTH",
                  "COOKIE",
                  "WHATSAPP_QR"
                ],
                "type": "string",
                "description": "Authentication mode"
              },
              "fields": {
                "type": "object",
                "properties": {
                  "authConfigCreation": {
                    "$ref": "#/$defs/AuthConfigCreationFieldsDto"
                  },
                  "connectedAccountInitiation": {
                    "$ref": "#/$defs/AuthConfigCreationFieldsDto"
                  }
                },
                "required": [
                  "authConfigCreation",
                  "connectedAccountInitiation"
                ]
              },
              "proxy": {
                "type": "object",
                "properties": {
                  "baseUrl": {
                    "type": "string"
                  }
                },
                "description": "Proxy configuration"
              },
              "deprecatedAuthProviderDetails": {
                "type": "object",
                "properties": {
                  "authorization_url": {
                    "type": "string"
                  },
                  "token_url": {
                    "type": "string"
                  }
                },
                "description": "Deprecated auth provider details"
              }
            },
            "required": [
              "name",
              "mode",
              "fields"
            ]
          }
        },
        "authFlow": {
          "type": [
            "string",
            "null"
          ],
          "description": "How end users authenticate for this toolkit (password, otp, cookie paste, oauth, …).\nWhen null, inferred from authSchemes / authRecipe.",
          "enum": [
            "static_secret",
            "cookie_paste",
            "password",
            "password_otp",
            "oauth",
            "whatsapp_qr",
            "zernio_connect"
          ]
        },
        "authRecipe": {
          "type": [
            "object",
            "null"
          ],
          "description": "Declarative HTTP login/OTP steps — executed by AuthChallengeService, never as tools."
        },
        "popularityScore": {
          "type": "number"
        },
        "baseUrl": {
          "type": "string"
        },
        "getCurrentUserEndpoint": {
          "type": "string"
        },
        "provider": {
          "type": "string",
          "enum": [
            "COMPOSIO",
            "LOCAL"
          ]
        },
        "project": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "publicId": {
              "type": "string",
              "description": "Public short id for URLs (stable, unique)."
            },
            "apiKeys": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "project": {
                    "$ref": "#/$defs/Project"
                  },
                  "projectId": {
                    "type": "string"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "expiresAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "lastUsedAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "createdAt": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "updatedAt": {
                    "format": "date-time",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "key",
                  "name",
                  "description",
                  "project",
                  "projectId",
                  "isActive",
                  "expiresAt",
                  "lastUsedAt",
                  "permissions",
                  "createdAt",
                  "updatedAt"
                ]
              }
            },
            "name": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "userId": {
              "type": "string"
            },
            "user": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string",
                  "description": "Never loaded unless a query asks for it explicitly (`addSelect('user.password')`).\n\n`LoadUserInterceptor` puts the full entity on `request.user`, and several endpoints\nreturn payloads built from user rows, so a selectable hash is one careless\n`relations: ['user']` away from being served to a client.\n\nWrites are unaffected: assigning a value and saving still persists it."
                },
                "socialAccounts": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/UserSocialAccount"
                  }
                },
                "firstName": {
                  "type": "string"
                },
                "lastName": {
                  "type": "string"
                },
                "roles": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Role"
                  }
                },
                "sessions": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/UserSession"
                  }
                },
                "projects": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Project"
                  }
                },
                "isActive": {
                  "type": "boolean"
                },
                "tokenVersion": {
                  "type": "number",
                  "description": "Stamped into every access token and compared on each request, so a token\ncan be revoked without a denylist. Logout and password reset bump it,\nwhich invalidates every token issued before that moment."
                },
                "createdAt": {
                  "format": "date-time",
                  "type": "string"
                },
                "updatedAt": {
                  "format": "date-time",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "email",
                "password",
                "socialAccounts",
                "firstName",
                "lastName",
                "roles",
                "sessions",
                "projects",
                "isActive",
                "tokenVersion",
                "createdAt",
                "updatedAt"
              ]
            },
            "isActive": {
              "type": "boolean"
            },
            "triggerWebhookUrl": {
              "type": "string"
            },
            "webhookSecret": {
              "type": "string"
            },
            "identityHmacSecret": {
              "type": [
                "string",
                "null"
              ],
              "description": "HMAC secret for Intercom-style widget identity (`data-user-id` + `data-user-hash`).\nNever send to the browser; dashboard shows it once on rotate."
            },
            "identityJwt": {
              "type": "object",
              "properties": {
                "alg": {
                  "type": "object"
                },
                "secret": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "jwksUrl": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "issuer": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "audience": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            },
            "application": {
              "type": "object",
              "properties": {
                "logo": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                }
              }
            },
            "apiKeysOverride": {
              "type": "object",
              "properties": {
                "OPENROUTER_API_KEY": {
                  "type": "string"
                }
              }
            },
            "allowEndUserWorkflows": {
              "type": "boolean",
              "description": "When true, secondary external users (eUID !== projectId) may create/update agents and workflows.\nProject default eUID is always allowed. Default false."
            },
            "allowEndUserDatabaseCollections": {
              "type": "boolean",
              "description": "When true, secondary external users may create/delete/rename database collections (meta).\nRow ops on delegated collections are unaffected. Default false."
            },
            "allowEndUserKnowledgeCollections": {
              "type": "boolean",
              "description": "When true, secondary external users may create/delete/rename knowledge collections.\nSearch on allowlisted collections is unaffected. Default false."
            },
            "region": {
              "type": [
                "string",
                "null"
              ],
              "description": "ISO 3166-1 alpha-2 project region for catalog filtering.\nnull = global (only see toolkits/templates with empty regions)."
            },
            "createdAt": {
              "format": "date-time",
              "type": "string"
            },
            "updatedAt": {
              "format": "date-time",
              "type": "string"
            }
          },
          "required": [
            "id",
            "publicId",
            "apiKeys",
            "name",
            "description",
            "userId",
            "user",
            "isActive",
            "triggerWebhookUrl",
            "webhookSecret",
            "identityHmacSecret",
            "identityJwt",
            "application",
            "apiKeysOverride",
            "allowEndUserWorkflows",
            "allowEndUserDatabaseCollections",
            "allowEndUserKnowledgeCollections",
            "region",
            "createdAt",
            "updatedAt"
          ]
        },
        "projectId": {
          "type": "string"
        },
        "seatBilled": {
          "type": "boolean",
          "description": "Live connected accounts for this toolkit are billed per day (not per tool call).\nRates stay in the pricing seat catalog; this flag is for API/UI and seed sync."
        },
        "regions": {
          "description": "ISO 3166-1 alpha-2 country codes this toolkit is available in.\nnull/empty = global (visible for every project region).",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "categories": {
          "description": "Curated toolkit category ids (Composio allowlist).\nnull/empty = uncategorized (still visible under \"All\").",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "seo": {
          "type": [
            "object",
            "null"
          ],
          "description": "Public catalog SEO copy (LLM or manual). Null until filled once.\nExposed only on GET /toolkits/bySlug/:slug — not list or byId."
        },
        "activeStatus": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "slug",
        "name",
        "description",
        "logo",
        "appUrl",
        "authSchemes",
        "providerManagedAuthSchemes",
        "noAuth",
        "isDisabled",
        "version",
        "authConfigDetails",
        "authFlow",
        "authRecipe",
        "popularityScore",
        "baseUrl",
        "getCurrentUserEndpoint",
        "provider",
        "project",
        "projectId",
        "seatBilled",
        "regions",
        "categories"
      ]
    }
  },
  "required": [
    "success",
    "message",
    "data"
  ],
  "$defs": {
    "ApiKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "project": {
          "$ref": "#/$defs/Project"
        },
        "projectId": {
          "type": "string"
        },
        "isActive": {
          "type": "boolean"
        },
        "expiresAt": {
          "format": "date-time",
          "type": "string"
        },
        "lastUsedAt": {
          "format": "date-time",
          "type": "string"
        },
        "permissions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "updatedAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id",
        "key",
        "name",
        "description",
        "project",
        "projectId",
        "isActive",
        "expiresAt",
        "lastUsedAt",
        "permissions",
        "createdAt",
        "updatedAt"
      ]
    },
    "AuthConfigCreationFieldsDto": {
      "type": "object",
      "properties": {
        "required": {
          "description": "Required fields for auth config creation",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AuthConfigFieldDto"
          }
        },
        "optional": {
          "description": "Optional fields for auth config creation",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AuthConfigFieldDto"
          }
        }
      },
      "required": [
        "required",
        "optional"
      ]
    },
    "AuthConfigFieldDto": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "pattern": "^[A-Za-z][A-Za-z0-9_.-]{0,63}$",
          "description": "Field name: starts with a letter, then letters, digits, underscore, dot or hyphen (max 64)"
        },
        "displayName": {
          "type": "string",
          "description": "Field display name"
        },
        "default": {
          "type": [
            "string",
            "null"
          ],
          "description": "Default value"
        },
        "type": {
          "type": "string",
          "description": "Field type"
        },
        "description": {
          "type": "string",
          "description": "Field description"
        },
        "required": {
          "type": "boolean",
          "description": "Whether field is required"
        },
        "legacyTemplateName": {
          "type": "string",
          "description": "Legacy template name"
        }
      },
      "required": [
        "name",
        "displayName",
        "default",
        "type",
        "description",
        "required",
        "legacyTemplateName"
      ]
    },
    "Project": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "publicId": {
          "type": "string",
          "description": "Public short id for URLs (stable, unique)."
        },
        "apiKeys": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ApiKey"
          }
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "user": {
          "$ref": "#/$defs/User"
        },
        "isActive": {
          "type": "boolean"
        },
        "triggerWebhookUrl": {
          "type": "string"
        },
        "webhookSecret": {
          "type": "string"
        },
        "identityHmacSecret": {
          "type": [
            "string",
            "null"
          ],
          "description": "HMAC secret for Intercom-style widget identity (`data-user-id` + `data-user-hash`).\nNever send to the browser; dashboard shows it once on rotate."
        },
        "identityJwt": {
          "type": "object",
          "properties": {
            "alg": {
              "type": "object"
            },
            "secret": {
              "type": [
                "string",
                "null"
              ]
            },
            "jwksUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "issuer": {
              "type": [
                "string",
                "null"
              ]
            },
            "audience": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "application": {
          "type": "object",
          "properties": {
            "logo": {
              "type": "string"
            },
            "title": {
              "type": "string"
            }
          }
        },
        "apiKeysOverride": {
          "type": "object",
          "properties": {
            "OPENROUTER_API_KEY": {
              "type": "string"
            }
          }
        },
        "allowEndUserWorkflows": {
          "type": "boolean",
          "description": "When true, secondary external users (eUID !== projectId) may create/update agents and workflows.\nProject default eUID is always allowed. Default false."
        },
        "allowEndUserDatabaseCollections": {
          "type": "boolean",
          "description": "When true, secondary external users may create/delete/rename database collections (meta).\nRow ops on delegated collections are unaffected. Default false."
        },
        "allowEndUserKnowledgeCollections": {
          "type": "boolean",
          "description": "When true, secondary external users may create/delete/rename knowledge collections.\nSearch on allowlisted collections is unaffected. Default false."
        },
        "region": {
          "type": [
            "string",
            "null"
          ],
          "description": "ISO 3166-1 alpha-2 project region for catalog filtering.\nnull = global (only see toolkits/templates with empty regions)."
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "updatedAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id",
        "publicId",
        "apiKeys",
        "name",
        "description",
        "userId",
        "user",
        "isActive",
        "triggerWebhookUrl",
        "webhookSecret",
        "identityHmacSecret",
        "identityJwt",
        "application",
        "apiKeysOverride",
        "allowEndUserWorkflows",
        "allowEndUserDatabaseCollections",
        "allowEndUserKnowledgeCollections",
        "region",
        "createdAt",
        "updatedAt"
      ]
    },
    "Role": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string",
          "enum": [
            "admin",
            "user"
          ]
        },
        "description": {
          "type": "string"
        },
        "users": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/User"
          }
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "updatedAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "description",
        "users",
        "createdAt",
        "updatedAt"
      ]
    },
    "User": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "password": {
          "type": "string",
          "description": "Never loaded unless a query asks for it explicitly (`addSelect('user.password')`).\n\n`LoadUserInterceptor` puts the full entity on `request.user`, and several endpoints\nreturn payloads built from user rows, so a selectable hash is one careless\n`relations: ['user']` away from being served to a client.\n\nWrites are unaffected: assigning a value and saving still persists it."
        },
        "socialAccounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserSocialAccount"
          }
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "roles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Role"
          }
        },
        "sessions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserSession"
          }
        },
        "projects": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Project"
          }
        },
        "isActive": {
          "type": "boolean"
        },
        "tokenVersion": {
          "type": "number",
          "description": "Stamped into every access token and compared on each request, so a token\ncan be revoked without a denylist. Logout and password reset bump it,\nwhich invalidates every token issued before that moment."
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "updatedAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id",
        "email",
        "password",
        "socialAccounts",
        "firstName",
        "lastName",
        "roles",
        "sessions",
        "projects",
        "isActive",
        "tokenVersion",
        "createdAt",
        "updatedAt"
      ]
    },
    "UserSession": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "user": {
          "$ref": "#/$defs/User"
        },
        "userId": {
          "type": "string"
        },
        "ipAddress": {
          "type": "string"
        },
        "userAgent": {
          "type": "string"
        },
        "deviceType": {
          "type": "string"
        },
        "deviceName": {
          "type": "string"
        },
        "browser": {
          "type": "string"
        },
        "os": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "isActive": {
          "type": "boolean"
        },
        "lastActivityAt": {
          "format": "date-time",
          "type": "string"
        },
        "expiresAt": {
          "format": "date-time",
          "type": "string"
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "updatedAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id",
        "user",
        "userId",
        "ipAddress",
        "userAgent",
        "deviceType",
        "deviceName",
        "browser",
        "os",
        "location",
        "isActive",
        "lastActivityAt",
        "expiresAt",
        "createdAt",
        "updatedAt"
      ]
    },
    "UserSocialAccount": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "providerId": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "user": {
          "$ref": "#/$defs/User"
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "updatedAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id",
        "provider",
        "providerId",
        "userId",
        "user",
        "createdAt",
        "updatedAt"
      ]
    }
  }
}