This repository was archived by the owner on Aug 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ namespace polyproto.core;
27
27
enum Version {
28
28
`v1.0-beta.3` ,
29
29
`v1.0-beta.4` ,
30
+ `v1.0-beta.5` ,
30
31
}
31
32
32
33
/**
@@ -40,3 +41,57 @@ op gatewayUrl(): {
40
41
@ body _ : url ;
41
42
@ statusCode statusCode : 200 ;
42
43
};
44
+
45
+ @ doc ("""
46
+ This actor either does not exist on this home server (anymore), or the actor is not from this home server.
47
+ """ )
48
+ model BadReport {
49
+ ... BadRequestResponse ;
50
+ }
51
+
52
+ /**
53
+ * File an abuse report for an actor that is misbehaving either on this home server or on other
54
+ * home servers/service servers.
55
+ */
56
+ @ route ("/abuse" )
57
+ @ added (Version .`v1.0-beta.5` )
58
+ @ summary ("File an abuse report - Report an Actor" )
59
+ @ post
60
+ op reportAbuseFid (
61
+ @ body _b : {
62
+ @ doc ("Federation ID of the reported actor" )
63
+ fid : string ;
64
+
65
+ @ doc ("Information about why this actor was reported." )
66
+ reportText : string ;
67
+
68
+ @ doc ("This endpoint requires you to identify by completing a key trial." )
69
+ keyTrial : polyproto .core .models .KeyTrialCompleted ;
70
+ },
71
+ ): {
72
+ @ statusCode _ : 200 ;
73
+
74
+ @ example (#{
75
+ message : "Thank you for filing a report. Instance moderators will be in touch shortly." ,
76
+ })
77
+ @ body
78
+ _b : {
79
+ @ doc ("An optional message from the home server" )
80
+ message ? : string ;
81
+ };
82
+ } | BadReport ;
83
+
84
+ /**
85
+ * Retrieve contact information for this home server. May include an `adminAccount` federation ID,
86
+ * if this instance supports some form of text message exchange and such an account exists.
87
+ */
88
+ @ get
89
+ @ summary ("Retrieve contact information" )
90
+ @ route ("/contact" )
91
+ op getContactInfo (): {
92
+ @ statusCode _s : 200 ;
93
+ @ body _b : {
94
+ adminAccount ? : string ;
95
+ mail : string ;
96
+ };
97
+ };
You can’t perform that action at this time.
0 commit comments