woocommerce/packages/php/remote-specs-validation/schemas/remote-inbox-notification.json

102 lines
1.9 KiB
JSON

{
"title": "Remote Inbox Notification Schema",
"type": "array",
"additionalItems": false,
"items": {
"type": "object",
"required": ["slug", "status", "locales", "type", "rules"],
"properties": {
"slug": {
"type": "string"
},
"type": {
"type": "string"
},
"status": {
"type": "string",
"enum": ["actioned", "unactioned", "pending"],
"default": "pending"
},
"is_snoozable": {
"anyOf": [
{ "type": "boolean" },
{ "type": "integer", "enum": [0, 1] }
],
"default": 0
},
"locales": {
"type": "array",
"required": ["locale", "title", "content"],
"items": {
"type": "object",
"properties": {
"locale": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
}
}
}
},
"actions": {
"type": "array",
"required": ["name", "locales", "status", "url"],
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"locales": {
"type": "array",
"required": ["locale", "label"],
"items": {
"type": "object",
"properties": {
"locale": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
},
"url": {
"type": ["string", "boolean"]
},
"url_is_admin_query": {
"type": "boolean",
"default": false
},
"is_primary": {
"type": "boolean",
"default": false
},
"status": {
"type": "string",
"enum": ["actioned", "unactioned", "pending"],
"default": "pending"
}
}
}
},
"rules": {
"type": "array",
"items": {
"anyOf": [
{"$ref": "#/definitions/rules"}
]
}
}
}
},
"definitions": {
"operations": {"$ref": "./shared/operations.json"},
"rules": {"$ref": "./shared/rules.json"}
}
}