{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/listings-api/json-schema/listings-api-create-social-post-mutation-input-schema.json",
  "title": "CreateSocialPostMutationInput",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/listings-api-posts-api-openapi.yml#/components/schemas/CreateSocialPostMutationInput",
  "type": "object",
  "properties": {
    "postName": {
      "type": "string"
    },
    "locationIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "postType": {
      "$ref": "#/$defs/SocialPostTypeEnum"
    },
    "postSites": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SitesType"
      }
    },
    "postMessage": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PostMessageInput"
      }
    },
    "postCta": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PostCtaInput"
      }
    },
    "postMediaUrl": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SocialPostMediaInput"
      }
    },
    "postScheduledDates": {
      "$ref": "#/$defs/PostScheduledDatesInput"
    },
    "postContextInfo": {
      "$ref": "#/$defs/PostContextInfoInput"
    },
    "componentIdentifier": {
      "type": "string"
    },
    "componentType": {
      "type": "string"
    },
    "products": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProductInfoInput"
      }
    },
    "clientMutationId": {
      "type": "string"
    }
  },
  "required": [
    "postName",
    "locationIds",
    "postType",
    "postSites"
  ],
  "$defs": {
    "MediaTypeEnum": {
      "type": "string",
      "enum": [
        "IMAGE",
        "VIDEO"
      ],
      "description": "Media type for social posts."
    },
    "PostContextInfoInput": {
      "type": "object",
      "description": "Additional details for post based on post_type.",
      "properties": {
        "couponCode": {
          "type": "string"
        },
        "redeemUrl": {
          "type": "string"
        },
        "termsConditions": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "locationType": {
          "type": "string"
        },
        "startDay": {
          "type": "string",
          "format": "date"
        },
        "startTime": {
          "type": "string"
        },
        "endDay": {
          "type": "string",
          "format": "date"
        },
        "endTime": {
          "type": "string"
        }
      }
    },
    "PostCtaInput": {
      "type": "object",
      "properties": {
        "site": {
          "$ref": "#/$defs/SitesType"
        },
        "type": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "site",
        "type",
        "url"
      ]
    },
    "PostMessageInput": {
      "type": "object",
      "properties": {
        "site": {
          "$ref": "#/$defs/SitesType"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "site",
        "message"
      ]
    },
    "PostScheduledDatesInput": {
      "type": "object",
      "properties": {
        "startDatetime": {
          "type": "string",
          "description": "Custom scalar Datetime"
        },
        "endDatetime": {
          "type": "string",
          "description": "Custom scalar Datetime"
        },
        "removalSites": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SitesType"
          }
        }
      },
      "required": [
        "startDatetime",
        "endDatetime"
      ]
    },
    "ProductInfoInput": {
      "type": "object",
      "properties": {
        "productId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "price": {
          "type": "string"
        },
        "minPrice": {
          "type": "string"
        },
        "maxPrice": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "photo": {
          "type": "string"
        },
        "cta": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PostCtaInput"
          }
        },
        "sites": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SitesType"
          }
        }
      }
    },
    "SitesType": {
      "type": "string",
      "enum": [
        "GOOGLE",
        "FACEBOOK"
      ],
      "description": "Sites a post can be published to."
    },
    "SocialPostMediaInput": {
      "type": "object",
      "properties": {
        "site": {
          "$ref": "#/$defs/SitesType"
        },
        "url": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/MediaTypeEnum"
        }
      },
      "required": [
        "site",
        "url"
      ]
    },
    "SocialPostTypeEnum": {
      "type": "string",
      "enum": [
        "EVENT",
        "OFFER",
        "ANNOUNCEMENT",
        "COVID19",
        "PRODUCT"
      ],
      "description": "Social Post types."
    }
  }
}