{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DayTidy Agent Access a2a-command",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "operation": {
          "type": "string",
          "const": "offerings.list"
        },
        "input": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "maxLength": 200
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "cursor": {
              "type": "string",
              "maxLength": 512
            },
            "locale": {
              "type": "string",
              "maxLength": 30
            }
          },
          "required": [],
          "additionalProperties": false
        }
      },
      "required": [
        "operation",
        "input"
      ],
      "additionalProperties": false,
      "x-operation-id": "listOfferings",
      "x-result-schema": {
        "$ref": "catalog.json#/$defs/OfferingPage"
      }
    },
    {
      "type": "object",
      "properties": {
        "operation": {
          "type": "string",
          "const": "offerings.get"
        },
        "input": {
          "type": "object",
          "properties": {
            "offering_id": {
              "$ref": "common.json#/$defs/PositiveId"
            },
            "locale": {
              "type": "string",
              "maxLength": 30
            }
          },
          "required": [
            "offering_id"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "operation",
        "input"
      ],
      "additionalProperties": false,
      "x-operation-id": "getOffering",
      "x-result-schema": {
        "$ref": "catalog.json#/$defs/Offering"
      }
    },
    {
      "type": "object",
      "properties": {
        "operation": {
          "type": "string",
          "const": "availability.get"
        },
        "input": {
          "type": "object",
          "properties": {
            "offering_id": {
              "$ref": "common.json#/$defs/PositiveId"
            },
            "option_id": {
              "$ref": "common.json#/$defs/PositiveId"
            },
            "quantity": {
              "$ref": "common.json#/$defs/BookingQuantity",
              "default": 1
            },
            "resource_id": {
              "$ref": "common.json#/$defs/PositiveId"
            },
            "from": {
              "$ref": "common.json#/$defs/Timestamp"
            },
            "until": {
              "$ref": "common.json#/$defs/Timestamp"
            },
            "timezone": {
              "$ref": "common.json#/$defs/Timezone"
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "cursor": {
              "type": "string",
              "maxLength": 512
            },
            "locale": {
              "type": "string",
              "maxLength": 30
            }
          },
          "required": [
            "offering_id",
            "option_id",
            "from",
            "until",
            "timezone"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "operation",
        "input"
      ],
      "additionalProperties": false,
      "x-operation-id": "getAvailability",
      "x-result-schema": {
        "$ref": "availability.json"
      }
    },
    {
      "type": "object",
      "properties": {
        "operation": {
          "type": "string",
          "const": "quote.create"
        },
        "input": {
          "$ref": "quote.json#/$defs/Selection"
        }
      },
      "required": [
        "operation",
        "input"
      ],
      "additionalProperties": false,
      "x-operation-id": "createQuote",
      "x-result-schema": {
        "$ref": "quote.json#/$defs/Quote"
      }
    },
    {
      "type": "object",
      "properties": {
        "operation": {
          "type": "string",
          "const": "booking.create"
        },
        "input": {
          "oneOf": [
            {
              "$ref": "booking.json#/$defs/BookingCommand"
            },
            {
              "$ref": "booking.json#/$defs/CreateRequest"
            }
          ],
          "description": "The initial authenticated command omits approval_id and pauses for first-party approval. Continuation of the same A2A task supplies the exact approved command, including approval_id."
        },
        "idempotency_key": {
          "type": "string",
          "minLength": 16,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_-]+$"
        }
      },
      "required": [
        "operation",
        "input",
        "idempotency_key"
      ],
      "additionalProperties": false,
      "x-operation-id": "createBooking",
      "x-result-schema": {
        "$ref": "booking.json#/$defs/BookingResult"
      },
      "x-pending-schema": {
        "$ref": "operation.json#/$defs/Pending"
      }
    }
  ],
  "description": "DayTidy structured data part within the pinned A2A 1.0.0 envelope, not a replacement for its protocol schema. booking.create requires customer OAuth, approval and the shared operation ledger."
}
