|
1 | 1 | // Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. |
2 | 2 |
|
3 | 3 | // coverage:ignore-file |
4 | | - |
5 | | -// ignore_for_file: prefer_single_quotes |
6 | | -// ignore_for_file: unnecessary_raw_strings |
7 | | -// ignore_for_file: public_member_api_docs |
| 4 | +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs |
8 | 5 |
|
9 | 6 | import 'package:stream_core/stream_core.dart'; |
10 | 7 |
|
@@ -168,6 +165,24 @@ class DefaultApi { |
168 | 165 | return data == null ? null : AddReactionResponse.fromJson(data); |
169 | 166 | } |
170 | 167 |
|
| 168 | + Future<BanResponse?> ban({ |
| 169 | + required BanRequest banRequest, |
| 170 | + }) async { |
| 171 | + const path = r"/api/v2/moderation/ban"; |
| 172 | + |
| 173 | + final queryParams = <String, Object?>{}; |
| 174 | + |
| 175 | + final response = await apiClient.post<Map<String, dynamic>>( |
| 176 | + path, |
| 177 | + data: banRequest, |
| 178 | + queryParameters: queryParams, |
| 179 | + ); |
| 180 | + |
| 181 | + final data = response.data; |
| 182 | + |
| 183 | + return data == null ? null : BanResponse.fromJson(data); |
| 184 | + } |
| 185 | + |
171 | 186 | Future<BlockUsersResponse?> blockUsers({ |
172 | 187 | required BlockUsersRequest blockUsersRequest, |
173 | 188 | }) async { |
@@ -480,6 +495,28 @@ class DefaultApi { |
480 | 495 | return data == null ? null : DeleteCommentReactionResponse.fromJson(data); |
481 | 496 | } |
482 | 497 |
|
| 498 | + Future<DeleteModerationConfigResponse?> deleteConfig({ |
| 499 | + required String key, |
| 500 | + String? team, |
| 501 | + }) async { |
| 502 | + final path = r"/api/v2/moderation/config/{key}".replaceAll('{key}', key); |
| 503 | + |
| 504 | + final queryParams = <String, Object?>{}; |
| 505 | + |
| 506 | + if (team != null) { |
| 507 | + queryParams.addAll({'team': team}); |
| 508 | + } |
| 509 | + |
| 510 | + final response = await apiClient.delete<Map<String, dynamic>>( |
| 511 | + path, |
| 512 | + queryParameters: queryParams, |
| 513 | + ); |
| 514 | + |
| 515 | + final data = response.data; |
| 516 | + |
| 517 | + return data == null ? null : DeleteModerationConfigResponse.fromJson(data); |
| 518 | + } |
| 519 | + |
483 | 520 | Future<DurationResponse?> deleteDevice({ |
484 | 521 | required String id, |
485 | 522 | }) async { |
@@ -658,6 +695,24 @@ class DefaultApi { |
658 | 695 | return data == null ? null : QueryFeedsResponse.fromJson(data); |
659 | 696 | } |
660 | 697 |
|
| 698 | + Future<FlagResponse?> flag({ |
| 699 | + required FlagRequest flagRequest, |
| 700 | + }) async { |
| 701 | + const path = r"/api/v2/moderation/flag"; |
| 702 | + |
| 703 | + final queryParams = <String, Object?>{}; |
| 704 | + |
| 705 | + final response = await apiClient.post<Map<String, dynamic>>( |
| 706 | + path, |
| 707 | + data: flagRequest, |
| 708 | + queryParameters: queryParams, |
| 709 | + ); |
| 710 | + |
| 711 | + final data = response.data; |
| 712 | + |
| 713 | + return data == null ? null : FlagResponse.fromJson(data); |
| 714 | + } |
| 715 | + |
661 | 716 | Future<SingleFollowResponse?> follow({ |
662 | 717 | required SingleFollowRequest singleFollowRequest, |
663 | 718 | }) async { |
@@ -847,6 +902,28 @@ class DefaultApi { |
847 | 902 | return data == null ? null : GetCommentsResponse.fromJson(data); |
848 | 903 | } |
849 | 904 |
|
| 905 | + Future<GetConfigResponse?> getConfig({ |
| 906 | + required String key, |
| 907 | + String? team, |
| 908 | + }) async { |
| 909 | + final path = r"/api/v2/moderation/config/{key}".replaceAll('{key}', key); |
| 910 | + |
| 911 | + final queryParams = <String, Object?>{}; |
| 912 | + |
| 913 | + if (team != null) { |
| 914 | + queryParams.addAll({'team': team}); |
| 915 | + } |
| 916 | + |
| 917 | + final response = await apiClient.get<Map<String, dynamic>>( |
| 918 | + path, |
| 919 | + queryParameters: queryParams, |
| 920 | + ); |
| 921 | + |
| 922 | + final data = response.data; |
| 923 | + |
| 924 | + return data == null ? null : GetConfigResponse.fromJson(data); |
| 925 | + } |
| 926 | + |
850 | 927 | Future<GetFollowSuggestionsResponse?> getFollowSuggestions({ |
851 | 928 | required String feedGroupId, |
852 | 929 | int? limit, |
@@ -1048,6 +1125,24 @@ class DefaultApi { |
1048 | 1125 | return data == null ? null : DurationResponse.fromJson(data); |
1049 | 1126 | } |
1050 | 1127 |
|
| 1128 | + Future<MuteResponse?> mute({ |
| 1129 | + required MuteRequest muteRequest, |
| 1130 | + }) async { |
| 1131 | + const path = r"/api/v2/moderation/mute"; |
| 1132 | + |
| 1133 | + final queryParams = <String, Object?>{}; |
| 1134 | + |
| 1135 | + final response = await apiClient.post<Map<String, dynamic>>( |
| 1136 | + path, |
| 1137 | + data: muteRequest, |
| 1138 | + queryParameters: queryParams, |
| 1139 | + ); |
| 1140 | + |
| 1141 | + final data = response.data; |
| 1142 | + |
| 1143 | + return data == null ? null : MuteResponse.fromJson(data); |
| 1144 | + } |
| 1145 | + |
1051 | 1146 | Future<PinActivityResponse?> pinActivity({ |
1052 | 1147 | required String feedGroupId, |
1053 | 1148 | required String feedId, |
@@ -1224,6 +1319,24 @@ class DefaultApi { |
1224 | 1319 | return data == null ? null : QueryFollowsResponse.fromJson(data); |
1225 | 1320 | } |
1226 | 1321 |
|
| 1322 | + Future<QueryModerationConfigsResponse?> queryModerationConfigs({ |
| 1323 | + QueryModerationConfigsRequest? queryModerationConfigsRequest, |
| 1324 | + }) async { |
| 1325 | + const path = r"/api/v2/moderation/configs"; |
| 1326 | + |
| 1327 | + final queryParams = <String, Object?>{}; |
| 1328 | + |
| 1329 | + final response = await apiClient.post<Map<String, dynamic>>( |
| 1330 | + path, |
| 1331 | + data: queryModerationConfigsRequest, |
| 1332 | + queryParameters: queryParams, |
| 1333 | + ); |
| 1334 | + |
| 1335 | + final data = response.data; |
| 1336 | + |
| 1337 | + return data == null ? null : QueryModerationConfigsResponse.fromJson(data); |
| 1338 | + } |
| 1339 | + |
1227 | 1340 | Future<PollVotesResponse?> queryPollVotes({ |
1228 | 1341 | required String pollId, |
1229 | 1342 | String? userId, |
@@ -1272,6 +1385,24 @@ class DefaultApi { |
1272 | 1385 | return data == null ? null : QueryPollsResponse.fromJson(data); |
1273 | 1386 | } |
1274 | 1387 |
|
| 1388 | + Future<QueryReviewQueueResponse?> queryReviewQueue({ |
| 1389 | + QueryReviewQueueRequest? queryReviewQueueRequest, |
| 1390 | + }) async { |
| 1391 | + const path = r"/api/v2/moderation/review_queue"; |
| 1392 | + |
| 1393 | + final queryParams = <String, Object?>{}; |
| 1394 | + |
| 1395 | + final response = await apiClient.post<Map<String, dynamic>>( |
| 1396 | + path, |
| 1397 | + data: queryReviewQueueRequest, |
| 1398 | + queryParameters: queryParams, |
| 1399 | + ); |
| 1400 | + |
| 1401 | + final data = response.data; |
| 1402 | + |
| 1403 | + return data == null ? null : QueryReviewQueueResponse.fromJson(data); |
| 1404 | + } |
| 1405 | + |
1275 | 1406 | Future<QueryUsersResponse?> queryUsers({ |
1276 | 1407 | QueryUsersPayload? payload, |
1277 | 1408 | }) async { |
@@ -1353,6 +1484,24 @@ class DefaultApi { |
1353 | 1484 | return data == null ? null : DurationResponse.fromJson(data); |
1354 | 1485 | } |
1355 | 1486 |
|
| 1487 | + Future<SubmitActionResponse?> submitAction({ |
| 1488 | + required SubmitActionRequest submitActionRequest, |
| 1489 | + }) async { |
| 1490 | + const path = r"/api/v2/moderation/submit_action"; |
| 1491 | + |
| 1492 | + final queryParams = <String, Object?>{}; |
| 1493 | + |
| 1494 | + final response = await apiClient.post<Map<String, dynamic>>( |
| 1495 | + path, |
| 1496 | + data: submitActionRequest, |
| 1497 | + queryParameters: queryParams, |
| 1498 | + ); |
| 1499 | + |
| 1500 | + final data = response.data; |
| 1501 | + |
| 1502 | + return data == null ? null : SubmitActionResponse.fromJson(data); |
| 1503 | + } |
| 1504 | + |
1356 | 1505 | Future<UnblockUsersResponse?> unblockUsers({ |
1357 | 1506 | required UnblockUsersRequest unblockUsersRequest, |
1358 | 1507 | }) async { |
@@ -1760,4 +1909,22 @@ class DefaultApi { |
1760 | 1909 |
|
1761 | 1910 | return data == null ? null : UpsertActivitiesResponse.fromJson(data); |
1762 | 1911 | } |
| 1912 | + |
| 1913 | + Future<UpsertConfigResponse?> upsertConfig({ |
| 1914 | + required UpsertConfigRequest upsertConfigRequest, |
| 1915 | + }) async { |
| 1916 | + const path = r"/api/v2/moderation/config"; |
| 1917 | + |
| 1918 | + final queryParams = <String, Object?>{}; |
| 1919 | + |
| 1920 | + final response = await apiClient.post<Map<String, dynamic>>( |
| 1921 | + path, |
| 1922 | + data: upsertConfigRequest, |
| 1923 | + queryParameters: queryParams, |
| 1924 | + ); |
| 1925 | + |
| 1926 | + final data = response.data; |
| 1927 | + |
| 1928 | + return data == null ? null : UpsertConfigResponse.fromJson(data); |
| 1929 | + } |
1763 | 1930 | } |
0 commit comments