{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/notepad-page/json-schema/notepad-page-share-response-schema.json",
  "title": "ShareResponse",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/notepad-page-openapi.json#/components/schemas/ShareResponse",
  "anyOf": [
    {
      "type": "object",
      "required": [
        "shareId",
        "mode",
        "token",
        "tokenShownOnce",
        "url",
        "expiresAt",
        "allowedIps"
      ],
      "properties": {
        "shareId": {
          "type": "string"
        },
        "mode": {
          "type": "string",
          "enum": [
            "link",
            "public"
          ]
        },
        "access": {
          "type": "string",
          "enum": [
            "invite",
            "anyone"
          ]
        },
        "token": {
          "type": "string",
          "description": "The share token; its SHA-256 hash remains the lookup key."
        },
        "tokenShownOnce": {
          "type": "boolean"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "expiresAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "allowedIps": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "format": "email"
        },
        "label": {
          "type": [
            "string",
            "null"
          ]
        },
        "prebound": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "mode",
        "access",
        "expiresAt",
        "allowedIps",
        "shares"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "link"
          ]
        },
        "access": {
          "type": "string",
          "enum": [
            "invite"
          ]
        },
        "expiresAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "allowedIps": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "shares": {
          "type": "array",
          "maxItems": 10,
          "items": {
            "type": "object",
            "required": [
              "shareId",
              "mode",
              "token",
              "tokenShownOnce",
              "url",
              "expiresAt",
              "allowedIps",
              "email",
              "label",
              "prebound"
            ],
            "properties": {
              "shareId": {
                "type": "string"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "link",
                  "public"
                ]
              },
              "access": {
                "type": "string",
                "enum": [
                  "invite",
                  "anyone"
                ]
              },
              "token": {
                "type": "string",
                "description": "The share token; its SHA-256 hash remains the lookup key."
              },
              "tokenShownOnce": {
                "type": "boolean"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "expiresAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "allowedIps": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "email"
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prebound": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    }
  ]
}