{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/animgen-com/json-schema/animgen-com-admin-subscription-grant-list-out-schema.json",
  "title": "AdminSubscriptionGrantListOut",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/animgen-com-admin-api-openapi.yml#/components/schemas/AdminSubscriptionGrantListOut",
  "properties": {
    "user": {
      "$ref": "#/$defs/AdminUserOut"
    },
    "effectivePlanCode": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "basic",
            "expert",
            "ultra"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Effectiveplancode"
    },
    "effectiveSource": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "billing",
            "admin"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Effectivesource"
    },
    "billingPlanCode": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "basic",
            "expert",
            "ultra"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Billingplancode"
    },
    "billingStatus": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Billingstatus"
    },
    "billingPeriodEnd": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Billingperiodend"
    },
    "billingCancelAtPeriodEnd": {
      "type": "boolean",
      "title": "Billingcancelatperiodend",
      "default": false
    },
    "billingProvider": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Billingprovider"
    },
    "planCredits": {
      "additionalProperties": {
        "type": "integer"
      },
      "type": "object",
      "title": "Plancredits"
    },
    "items": {
      "items": {
        "$ref": "#/$defs/AdminSubscriptionGrantOut"
      },
      "type": "array",
      "title": "Items"
    }
  },
  "type": "object",
  "required": [
    "user"
  ],
  "$defs": {
    "AdminSubscriptionGrantOut": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "userId": {
          "type": "string",
          "format": "uuid",
          "title": "Userid"
        },
        "planCode": {
          "type": "string",
          "enum": [
            "basic",
            "expert",
            "ultra"
          ],
          "title": "Plancode"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "expired",
            "revoked"
          ],
          "title": "Status"
        },
        "startsAt": {
          "type": "string",
          "title": "Startsat"
        },
        "expiresAt": {
          "type": "string",
          "title": "Expiresat"
        },
        "durationDays": {
          "type": "integer",
          "title": "Durationdays"
        },
        "grantCredits": {
          "type": "boolean",
          "title": "Grantcredits"
        },
        "creditsGranted": {
          "type": "integer",
          "title": "Creditsgranted"
        },
        "creditLotId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Creditlotid"
        },
        "grantedByEmail": {
          "type": "string",
          "title": "Grantedbyemail"
        },
        "reason": {
          "type": "string",
          "title": "Reason"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Note"
        },
        "revokedAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Revokedat"
        },
        "revokedByEmail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Revokedbyemail"
        },
        "revokeReason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Revokereason"
        },
        "createdAt": {
          "type": "string",
          "title": "Createdat"
        }
      },
      "type": "object",
      "required": [
        "id",
        "userId",
        "planCode",
        "status",
        "startsAt",
        "expiresAt",
        "durationDays",
        "grantCredits",
        "creditsGranted",
        "grantedByEmail",
        "reason",
        "createdAt"
      ],
      "title": "AdminSubscriptionGrantOut"
    },
    "AdminUserOut": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "email": {
          "type": "string",
          "title": "Email"
        },
        "emailVerified": {
          "type": "boolean",
          "title": "Emailverified",
          "default": false
        },
        "lifecycleStatus": {
          "type": "string",
          "title": "Lifecyclestatus",
          "default": "active"
        },
        "createdAt": {
          "type": "string",
          "title": "Createdat"
        },
        "updatedAt": {
          "type": "string",
          "title": "Updatedat"
        },
        "balance": {
          "type": "integer",
          "title": "Balance"
        }
      },
      "type": "object",
      "required": [
        "id",
        "email",
        "createdAt",
        "updatedAt",
        "balance"
      ],
      "title": "AdminUserOut"
    }
  }
}