-
Notifications
You must be signed in to change notification settings - Fork 0
/
events.py
84 lines (59 loc) · 1.53 KB
/
events.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import uuid
import inspect
import os
import time
from pathlib import Path
from inspect import signature
import pydantic as p
from typing import Optional, Any, Union, List, Literal, Callable, Dict
class BindingEvent(p.BaseModel):
event_type: str = 'BindingEvent'
property: str
targest_id:str
class PageNavigationEvent(p.BaseModel):
event_type: str = 'PageNavigationEvent'
path: str
class CloseModalEvent(p.BaseModel):
event_type: str = 'CloseModalEvent'
close:bool
class OpenModalEvent(p.BaseModel):
event_type: str = 'OpenModalEvent'
close:bool
class CloseDrawerEvent(p.BaseModel):
event_type: str = 'CloseDrawerEvent'
close:bool
class OpenDrawerEvent(p.BaseModel):
event_type: str = 'OpenDrawerEvent'
open:bool
class APIRequestEvent(p.BaseModel):
event_type: str = 'APIRequestEvent'
method: str
url: str
params: Optional[Dict[str, Any]] = None
data: Optional[Any] = None
headers: Optional[Dict[str, str]] = None
auth: Optional[Dict[str, str]] = None
timeout: Optional[float] = None
allow_redirects: Optional[bool] = None
proxies: Optional[Dict[str, str]] = None
verify: Optional[bool] = None
cookies: Optional[Dict[str, str]] = None
hooks: Optional[Dict[str, Any]] = None
stream: Optional[bool] = None
class APIUploadEvent(p.BaseModel):
event_type: str = 'APIUploadEvent'
multiple: bool = False
url: str
""" method,
url,
params,
data,
headers,
auth,
timeout,
allow_redirects,
proxies,
verify,
cookies,
hooks,
stream, """