File size: 382 Bytes
f47c911 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from pydantic import BaseModel
from typing import Literal
class WebhookPayloadEvent(BaseModel):
action: Literal["create", "update", "delete"]
scope: str
class WebhookPayloadRepo(BaseModel):
type: Literal["dataset", "model", "space"]
name: str
id: str
private: bool
headSha: str
class WebhookPayload(BaseModel):
event: WebhookPayloadEvent
repo: WebhookPayloadRepo |