{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codeqr-io/json-schema/codeqr-io-project-schema-schema.json",
  "title": "Project",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codeqr-io-openapi.yml#/components/schemas/ProjectSchema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the project."
    },
    "name": {
      "type": "string",
      "description": "The name of the project."
    },
    "slug": {
      "type": "string",
      "description": "The slug of the project."
    },
    "logo": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "The logo of the project."
    },
    "usage": {
      "type": "number",
      "description": "The usage of the project."
    },
    "usageLimit": {
      "type": "number",
      "description": "The usage limit of the project."
    },
    "linksUsage": {
      "type": "number",
      "description": "The links usage of the project."
    },
    "linksLimit": {
      "type": "number",
      "description": "The links limit of the project."
    },
    "domainsLimit": {
      "type": "number",
      "description": "The domains limit of the project."
    },
    "tagsLimit": {
      "type": "number",
      "description": "The tags limit of the project."
    },
    "usersLimit": {
      "type": "number",
      "description": "The users limit of the project."
    },
    "plan": {
      "type": "string",
      "enum": [
        "free",
        "starter",
        "pro",
        "business",
        "scale",
        "enterprise"
      ],
      "description": "The plan of the project."
    },
    "stripeId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The Stripe ID of the project."
    },
    "billingCycleStart": {
      "type": "number",
      "description": "The date and time when the billing cycle starts for the project."
    },
    "stripeConnectId": {
      "type": [
        "string",
        "null"
      ],
      "description": "[BETA]: The Stripe Connect ID of the project."
    },
    "createdAt": {
      "type": "string",
      "description": "The date and time when the project was created."
    },
    "users": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "member"
            ],
            "description": "The role of the authenticated user in the project."
          }
        },
        "required": [
          "role"
        ]
      },
      "description": "The role of the authenticated user in the project."
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The domain of the project."
          }
        },
        "required": [
          "slug"
        ]
      },
      "description": "The domains of the project."
    },
    "metadata": {
      "type": "object",
      "properties": {
        "defaultDomains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "defaultDomains"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "slug",
    "logo",
    "usage",
    "usageLimit",
    "linksUsage",
    "linksLimit",
    "domainsLimit",
    "tagsLimit",
    "usersLimit",
    "plan",
    "stripeId",
    "billingCycleStart",
    "stripeConnectId",
    "createdAt",
    "users",
    "domains",
    "metadata"
  ]
}