{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dropto-run/json-schema/dropto-run-offered-promotions-response-schema.json",
  "title": "OfferedPromotionsResponse",
  "description": "Response of `GET /promotions`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dropto-run-promotions-api-openapi.yml#/components/schemas/OfferedPromotionsResponse",
  "properties": {
    "promotions": {
      "description": "What this account can claim, the ones closing soonest first and the open-ended ones last.",
      "items": {
        "$ref": "#/$defs/OfferedPromotion"
      },
      "type": "array"
    }
  },
  "required": [
    "promotions"
  ],
  "type": "object",
  "$defs": {
    "OfferedPromotion": {
      "description": "One campaign this account may claim.",
      "properties": {
        "allowsFeedback": {
          "description": "Whether claiming it switches on comments.",
          "type": "boolean"
        },
        "allowsInvitedViewers": {
          "description": "Whether claiming it switches on private sharing by email.",
          "type": "boolean"
        },
        "allowsPasswordProtection": {
          "description": "Whether claiming it switches on password protection.",
          "type": "boolean"
        },
        "code": {
          "description": "Its code, or null when there is none to type.",
          "type": [
            "null",
            "string"
          ]
        },
        "deltaAccountBytes": {
          "description": "Extra storage it gives, or null when it gives none.",
          "format": "int64",
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "null",
            "integer",
            "string"
          ]
        },
        "deltaMaxCustomDomains": {
          "description": "Extra custom domains it gives.",
          "format": "int32",
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "integer",
            "string"
          ]
        },
        "deltaMaxSites": {
          "description": "Extra sites it gives, or null when it gives none.",
          "format": "int32",
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "null",
            "integer",
            "string"
          ]
        },
        "deltaSitesPerDay": {
          "description": "Extra sites a day the account may create, or null. Only ever set on a campaign aimed at named\naccounts, so only an account the operator chose ever reads a figure here.",
          "format": "int32",
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "null",
            "integer",
            "string"
          ]
        },
        "deltaWriteOpsPerDay": {
          "description": "Extra publishing operations a day, or null.",
          "format": "int64",
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "null",
            "integer",
            "string"
          ]
        },
        "deltaWriteOpsPerMonth": {
          "description": "Extra publishing operations a month, or null.",
          "format": "int64",
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "null",
            "integer",
            "string"
          ]
        },
        "endsAt": {
          "description": "When claiming closes, or null when it does not.",
          "format": "date-time",
          "type": [
            "null",
            "string"
          ]
        },
        "grantExpiresAfterDays": {
          "description": "How long what it gives lasts, or null for good.",
          "format": "int32",
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "null",
            "integer",
            "string"
          ]
        },
        "id": {
          "description": "The campaign, which is what a button with no code to type sends back.",
          "type": "string"
        },
        "name": {
          "description": "What to call it on the banner.",
          "type": "string"
        },
        "placesLeft": {
          "description": "How many accounts may still claim it, or null when any number may. Read a moment ago and acted on a\nmoment later, so it is a number to show rather than a number to trust — the redeem endpoint is what\ndecides, and it decides in one statement.",
          "format": "int32",
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "null",
            "integer",
            "string"
          ]
        },
        "suppressesBadge": {
          "description": "Whether claiming it takes the Drop2Run badge off.",
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "code",
        "name",
        "deltaAccountBytes",
        "deltaMaxSites",
        "deltaWriteOpsPerMonth",
        "deltaWriteOpsPerDay",
        "deltaSitesPerDay",
        "deltaMaxCustomDomains",
        "suppressesBadge",
        "allowsInvitedViewers",
        "allowsFeedback",
        "allowsPasswordProtection",
        "grantExpiresAfterDays",
        "placesLeft",
        "endsAt"
      ],
      "type": "object"
    }
  }
}