abusezero 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
abusezero/client.py ADDED
@@ -0,0 +1,1469 @@
1
+ from __future__ import annotations
2
+ from typing import Any
3
+ from .models import *
4
+ from .core import Core, AsyncCore
5
+
6
+ class AbuseZero(Core):
7
+ _public = False
8
+
9
+ def workspaces(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspacesListResponse:
10
+ "List workspaces available to this identity."
11
+ return self._call("workspaces.list", input, path, idempotency_key)
12
+
13
+ def me(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MeGetResponse:
14
+ "Read who this connection acts for: the person, their role and permissions, the workspace and the granted scopes."
15
+ return self._call("me.get", input, path, idempotency_key)
16
+
17
+ def api_keys(self, input: ApiKeysListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ApiKeysListResponse:
18
+ "List API keys with their type, scopes, last use and expiry. Secrets are never returned."
19
+ return self._call("api-keys.list", input, path, idempotency_key)
20
+
21
+ def create_api_key(self, input: ApiKeysCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ApiKeysCreateResponse:
22
+ "Create a secret or restricted key. Its secret is shown once, in the response."
23
+ return self._call("api-keys.create", input, path, idempotency_key)
24
+
25
+ def update_api_key(self, input: ApiKeysUpdateInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ApiKeysUpdateResponse:
26
+ "Change an API key's name, scopes or expiry."
27
+ return self._call("api-keys.update", input, path, idempotency_key)
28
+
29
+ def roll_api_key(self, input: ApiKeysRollInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ApiKeysRollResponse:
30
+ "Roll an API key. The old key keeps working for 1 hour, 24 hours or 7 days, and the new secret is shown once."
31
+ return self._call("api-keys.roll", input, path, idempotency_key)
32
+
33
+ def show_api_key_replacement(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ApiKeysReplacementResponse:
34
+ "Show a key's replacement once, when AbuseZero replaced the key for you."
35
+ return self._call("api-keys.replacement", input, path, idempotency_key)
36
+
37
+ def revoke_api_key(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ApiKeysRevokeResponse:
38
+ "Revoke an API key. It stops working at once."
39
+ return self._call("api-keys.revoke", input, path, idempotency_key)
40
+
41
+ def machine_clients(self, input: MachineClientsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MachineClientsListResponse:
42
+ "List machine clients."
43
+ return self._call("machine-clients.list", input, path, idempotency_key)
44
+
45
+ def create_machine_client(self, input: MachineClientsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MachineClientsCreateResponse:
46
+ "Create a machine client. Its secret is shown once, in the response."
47
+ return self._call("machine-clients.create", input, path, idempotency_key)
48
+
49
+ def rotate_machine_client_secret(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MachineClientsRotateSecretResponse:
50
+ "Rotate a machine client's secret. The old secret stops working at once, and the new one is shown once."
51
+ return self._call("machine-clients.rotate_secret", input, path, idempotency_key)
52
+
53
+ def revoke_machine_client(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MachineClientsRevokeResponse:
54
+ "Revoke a machine client. Its secret and access tokens stop working at once."
55
+ return self._call("machine-clients.revoke", input, path, idempotency_key)
56
+
57
+ def authorized_apps(self, input: AuthorizedAppsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AuthorizedAppsListResponse:
58
+ "List the apps and agents members authorized with OAuth."
59
+ return self._call("authorized-apps.list", input, path, idempotency_key)
60
+
61
+ def disconnect_authorized_app(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AuthorizedAppsDisconnectResponse:
62
+ "Disconnect one of your authorized apps. It loses access at once."
63
+ return self._call("authorized-apps.disconnect", input, path, idempotency_key)
64
+
65
+ def members(self, input: MembersListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MembersListResponse:
66
+ "List the workspace's members with their roles and permissions."
67
+ return self._call("members.list", input, path, idempotency_key)
68
+
69
+ def update_member(self, input: MembersUpdateInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MembersUpdateResponse:
70
+ "Change a member's role or permissions."
71
+ return self._call("members.update", input, path, idempotency_key)
72
+
73
+ def remove_member(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MembersRemoveResponse:
74
+ "Remove a member from the workspace. They lose access at once."
75
+ return self._call("members.remove", input, path, idempotency_key)
76
+
77
+ def invitations(self, input: InvitationsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> InvitationsListResponse:
78
+ "List pending invitations."
79
+ return self._call("invitations.list", input, path, idempotency_key)
80
+
81
+ def invite_member(self, input: InvitationsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> InvitationsCreateResponse:
82
+ "Invite someone to the workspace by email, up to the plan's team seats."
83
+ return self._call("invitations.create", input, path, idempotency_key)
84
+
85
+ def resend_invitation(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> InvitationsResendResponse:
86
+ "Send a pending invitation again, as a new invitation that replaces it."
87
+ return self._call("invitations.resend", input, path, idempotency_key)
88
+
89
+ def cancel_invitation(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> InvitationsCancelResponse:
90
+ "Cancel a pending invitation."
91
+ return self._call("invitations.cancel", input, path, idempotency_key)
92
+
93
+ def workspace_settings(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceGetResponse:
94
+ "Read the workspace's settings: name, icon, time zone, website, product type and data retention."
95
+ return self._call("workspace.get", input, path, idempotency_key)
96
+
97
+ def update_workspace_settings(self, input: WorkspaceUpdateInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceUpdateResponse:
98
+ "Rename the workspace, or change its website, product type or time zone."
99
+ return self._call("workspace.update", input, path, idempotency_key)
100
+
101
+ def upload_workspace_icon(self, input: WorkspaceIconUploadInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceIconUploadResponse:
102
+ "Upload a new workspace icon. It's checked before it's used."
103
+ return self._call("workspace.icon_upload", input, path, idempotency_key)
104
+
105
+ def remove_workspace_icon(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceIconRemoveResponse:
106
+ "Remove the workspace icon."
107
+ return self._call("workspace.icon_remove", input, path, idempotency_key)
108
+
109
+ def workspace_icon_upload(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceIconUploadGetResponse:
110
+ "Read whether an uploaded workspace icon is ready."
111
+ return self._call("workspace.icon_upload_get", input, path, idempotency_key)
112
+
113
+ def set_data_retention(self, input: WorkspaceRetentionInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceRetentionResponse:
114
+ "Change how long evaluation evidence is kept. Shortening it deletes older evidence for good."
115
+ return self._call("workspace.retention", input, path, idempotency_key)
116
+
117
+ def setup_progress(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceSetupResponse:
118
+ "Read setup progress: which Get started steps are done."
119
+ return self._call("workspace.setup", input, path, idempotency_key)
120
+
121
+ def finish_setup(self, input: WorkspaceSetupFinishInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceSetupFinishResponse:
122
+ "Finish setting up the workspace, with its website, product type and time zone. Workspace owner only."
123
+ return self._call("workspace.setup_finish", input, path, idempotency_key)
124
+
125
+ def dismiss_setup_guide(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceSetupDismissResponse:
126
+ "Stop Get started opening by itself for you."
127
+ return self._call("workspace.setup_dismiss", input, path, idempotency_key)
128
+
129
+ def leave_workspace(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceLeaveResponse:
130
+ "Leave the workspace. Your access ends, and so does this sign-in's."
131
+ return self._call("workspace.leave", input, path, idempotency_key)
132
+
133
+ def evaluations(self, input: EvaluationsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EvaluationsListResponse:
134
+ "List evaluations."
135
+ return self._call("evaluations.list", input, path, idempotency_key)
136
+
137
+ def evaluate(self, input: EvaluationsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> Evaluation:
138
+ "Evaluate a benefit claim."
139
+ return self._call("evaluations.create", input, path, idempotency_key)
140
+
141
+ def evaluation_filters(self, input: EvaluationsFiltersInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EvaluationsFiltersResponse:
142
+ "Read the benefits, results and reasons found in recent evaluations."
143
+ return self._call("evaluations.filters", input, path, idempotency_key)
144
+
145
+ def get_evaluation(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EvaluationsGetResponse:
146
+ "Read an evaluation."
147
+ return self._call("evaluations.get", input, path, idempotency_key)
148
+
149
+ def evaluation_graph(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EvaluationsGraphResponse:
150
+ "Read an evaluation association graph."
151
+ return self._call("evaluations.graph", input, path, idempotency_key)
152
+
153
+ def evaluation_evidence(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EvaluationsEvidenceResponse:
154
+ "Read retained evaluation evidence."
155
+ return self._call("evaluations.evidence", input, path, idempotency_key)
156
+
157
+ def outcomes(self, input: OutcomesListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> OutcomesListResponse:
158
+ "List outcomes."
159
+ return self._call("outcomes.list", input, path, idempotency_key)
160
+
161
+ def get_outcome(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> OutcomesGetResponse:
162
+ "Read an outcome."
163
+ return self._call("outcomes.get", input, path, idempotency_key)
164
+
165
+ def outcome(self, input: OutcomesReportInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> OutcomesReportResponse:
166
+ "Record a known outcome, including a benefit delivered after a deny."
167
+ return self._call("outcomes.report", input, path, idempotency_key)
168
+
169
+ def dry_run_evaluation(self, input: EvaluationsDryRunInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EvaluationsDryRunResponseVariant0 | EvaluationsDryRunResponseVariant1:
170
+ "Run a dry-run evaluation without writing claim history. Completed dry-run evaluations consume usage."
171
+ return self._call("evaluations.dry_run", input, path, idempotency_key)
172
+
173
+ def simulate(self, input: SimulationsSequenceInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> SimulationsSequenceResponse:
174
+ "Simulate a retained sequence."
175
+ return self._call("simulations.sequence", input, path, idempotency_key)
176
+
177
+ def replay(self, input: SimulationsReplayInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> SimulationsReplayResponse:
178
+ "Replay retained evaluations against a saved policy."
179
+ return self._call("simulations.replay", input, path, idempotency_key)
180
+
181
+ def benefits(self, input: BenefitsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BenefitsListResponse:
182
+ "List benefits."
183
+ return self._call("benefits.list", input, path, idempotency_key)
184
+
185
+ def create_benefit(self, input: BenefitsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BenefitsCreateResponse:
186
+ "Create a benefit."
187
+ return self._call("benefits.create", input, path, idempotency_key)
188
+
189
+ def get_benefit(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BenefitsGetResponse:
190
+ "Read a benefit."
191
+ return self._call("benefits.get", input, path, idempotency_key)
192
+
193
+ def update_benefit(self, input: BenefitsUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BenefitsUpdateResponse:
194
+ "Update a benefit."
195
+ return self._call("benefits.update", input, path, idempotency_key)
196
+
197
+ def delete_benefit(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BenefitsDeleteResponse:
198
+ "Permanently delete a benefit. This cannot be reversed."
199
+ return self._call("benefits.delete", input, path, idempotency_key)
200
+
201
+ def policies(self, input: PoliciesListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesListResponse:
202
+ "List policies."
203
+ return self._call("policies.list", input, path, idempotency_key)
204
+
205
+ def create_policy(self, input: PoliciesCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesCreateResponse:
206
+ "Create a policy."
207
+ return self._call("policies.create", input, path, idempotency_key)
208
+
209
+ def get_policy(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesGetResponse:
210
+ "Read a policy."
211
+ return self._call("policies.get", input, path, idempotency_key)
212
+
213
+ def update_policy(self, input: PoliciesUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesUpdateResponse:
214
+ "Update a policy."
215
+ return self._call("policies.update", input, path, idempotency_key)
216
+
217
+ def delete_policy(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesDeleteResponse:
218
+ "Permanently delete an unused custom policy. This cannot be reversed."
219
+ return self._call("policies.delete", input, path, idempotency_key)
220
+
221
+ def duplicate_policy(self, input: PoliciesDuplicateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesDuplicateResponse:
222
+ "Duplicate a policy."
223
+ return self._call("policies.duplicate", input, path, idempotency_key)
224
+
225
+ def policy_versions(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesVersionsResponse:
226
+ "List saved policy versions."
227
+ return self._call("policies.versions", input, path, idempotency_key)
228
+
229
+ def get_policy_version(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesVersionResponse:
230
+ "Read a saved policy version."
231
+ return self._call("policies.version", input, path, idempotency_key)
232
+
233
+ def policy_signals(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesSignalsResponse:
234
+ "List signals available to policy rules."
235
+ return self._call("policies.signals", input, path, idempotency_key)
236
+
237
+ def access_lists(self, input: AccessListsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccessListsListResponse:
238
+ "List access lists."
239
+ return self._call("access-lists.list", input, path, idempotency_key)
240
+
241
+ def add_access_list_entries(self, input: AccessListsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccessListsCreateResponse:
242
+ "Create an access list entry."
243
+ return self._call("access-lists.create", input, path, idempotency_key)
244
+
245
+ def get_access_list_entry(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccessListsGetResponse:
246
+ "Read an access list entry."
247
+ return self._call("access-lists.get", input, path, idempotency_key)
248
+
249
+ def delete_access_list_entry(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccessListsDeleteResponse:
250
+ "Permanently delete an access list entry. This cannot be reversed."
251
+ return self._call("access-lists.delete", input, path, idempotency_key)
252
+
253
+ def update_access_list_entry(self, input: AccessListsUpdateInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccessListsUpdateResponse:
254
+ "Update an access list entry's list, benefits, reason or expiry."
255
+ return self._call("access-lists.update", input, path, idempotency_key)
256
+
257
+ def look_up_identifier(self, input: IdentifiersLookupInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> IdentifiersLookupResponse:
258
+ "Look up an ID, email address or IP address."
259
+ return self._call("identifiers.lookup", input, path, idempotency_key)
260
+
261
+ def custom_identifiers(self, input: CustomIdentifiersListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> CustomIdentifiersListResponse:
262
+ "List custom identifiers."
263
+ return self._call("custom-identifiers.list", input, path, idempotency_key)
264
+
265
+ def register_custom_identifier(self, input: CustomIdentifiersCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> CustomIdentifiersCreateResponse:
266
+ "Create a custom identifier."
267
+ return self._call("custom-identifiers.create", input, path, idempotency_key)
268
+
269
+ def get_custom_identifier(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> CustomIdentifiersGetResponse:
270
+ "Read a custom identifier."
271
+ return self._call("custom-identifiers.get", input, path, idempotency_key)
272
+
273
+ def delete_custom_identifier(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> CustomIdentifiersDeleteResponse:
274
+ "Permanently delete a custom identifier. This cannot be reversed."
275
+ return self._call("custom-identifiers.delete", input, path, idempotency_key)
276
+
277
+ def imports(self, input: ImportsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsListResponse:
278
+ "List imports."
279
+ return self._call("imports.list", input, path, idempotency_key)
280
+
281
+ def import_claim_history(self, input: ImportsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsCreateResponse:
282
+ "Import claim history: benefits you granted before AbuseZero. The rows wait for review unless the request sends confirm."
283
+ return self._call("imports.create", input, path, idempotency_key)
284
+
285
+ def create_csv_import(self, input: ImportsCsvInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsCsvResponse:
286
+ "Start a claim history import from a CSV file, and get its upload link."
287
+ return self._call("imports.csv", input, path, idempotency_key)
288
+
289
+ def get_import(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsGetResponse:
290
+ "Read an import: its state, its rows' counts and its progress."
291
+ return self._call("imports.get", input, path, idempotency_key)
292
+
293
+ def list_import_problems(self, input: ImportsProblemsInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsProblemsResponse:
294
+ "List an import's rows that can't be added, with each row's problem and field."
295
+ return self._call("imports.problems", input, path, idempotency_key)
296
+
297
+ def import_problems_download(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsProblemsDownloadResponse:
298
+ "Create a short-lived download link for an import's rows with problems."
299
+ return self._call("imports.problems_download", input, path, idempotency_key)
300
+
301
+ def confirm_import(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsConfirmResponse:
302
+ "Add an import that's ready to review. Rows that need attention are skipped."
303
+ return self._call("imports.confirm", input, path, idempotency_key)
304
+
305
+ def discard_import(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsDiscardResponse:
306
+ "Discard an import before it's confirmed. Nothing from it is added, and its rows are deleted."
307
+ return self._call("imports.discard", input, path, idempotency_key)
308
+
309
+ def fix_import_row(self, input: ImportsFixRowInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsFixRowResponse:
310
+ "Fix one row that needs attention in an import that's ready to review."
311
+ return self._call("imports.fix_row", input, path, idempotency_key)
312
+
313
+ def skip_import_row(self, input: ImportsSkipRowInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsSkipRowResponse:
314
+ "Skip one row that needs attention in an import that's ready to review."
315
+ return self._call("imports.skip_row", input, path, idempotency_key)
316
+
317
+ def exports(self, input: ExportsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ExportsListResponse:
318
+ "List exports."
319
+ return self._call("exports.list", input, path, idempotency_key)
320
+
321
+ def request_export(self, input: ExportsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ExportsCreateResponse:
322
+ "Create an evaluation export."
323
+ return self._call("exports.create", input, path, idempotency_key)
324
+
325
+ def get_export(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ExportsGetResponse:
326
+ "Read export status."
327
+ return self._call("exports.get", input, path, idempotency_key)
328
+
329
+ def export_download(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ExportsDownloadResponse:
330
+ "Create a short-lived export download URL."
331
+ return self._call("exports.download", input, path, idempotency_key)
332
+
333
+ def request_workspace_export(self, input: WorkspaceExportsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceExportsCreateResponse:
334
+ "Request a workspace data export, with the password for its ZIP files."
335
+ return self._call("workspace-exports.create", input, path, idempotency_key)
336
+
337
+ def workspace_export(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceExportsStatusResponse:
338
+ "Read the workspace's latest data export, and when the next one can be requested."
339
+ return self._call("workspace-exports.status", input, path, idempotency_key)
340
+
341
+ def workspace_export_download(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceExportsDownloadResponse:
342
+ "Get short-lived links to the files of a workspace data export you requested."
343
+ return self._call("workspace-exports.download", input, path, idempotency_key)
344
+
345
+ def delete_workspace_export(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceExportsDeleteResponse:
346
+ "Delete a workspace data export. Its files are removed for good."
347
+ return self._call("workspace-exports.delete", input, path, idempotency_key)
348
+
349
+ def dry_run_data_deletion(self, input: DeletionsDryRunInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> DeletionsDryRunResponse:
350
+ "Run a dry run of user-history deletion."
351
+ return self._call("deletions.dry_run", input, path, idempotency_key)
352
+
353
+ def data_deletions(self, input: DeletionsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> DeletionsListResponse:
354
+ "List data deletions."
355
+ return self._call("deletions.list", input, path, idempotency_key)
356
+
357
+ def request_data_deletion(self, input: DeletionsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> DeletionsCreateResponse:
358
+ "Permanently delete user history. This cannot be reversed."
359
+ return self._call("deletions.create", input, path, idempotency_key)
360
+
361
+ def get_data_deletion(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> DeletionsGetResponse:
362
+ "Read data-deletion status."
363
+ return self._call("deletions.get", input, path, idempotency_key)
364
+
365
+ def analytics(self, input: AnalyticsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AnalyticsListResponse:
366
+ "Read analytics."
367
+ return self._call("analytics.list", input, path, idempotency_key)
368
+
369
+ def overview(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> OverviewGetResponse:
370
+ "Read the overview of the last 24 hours."
371
+ return self._call("overview.get", input, path, idempotency_key)
372
+
373
+ def benefit_value(self, input: AnalyticsValueInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AnalyticsValueResponse:
374
+ "Read benefit value: what delivered claims were worth and what AbuseZero saved, in any supported currency."
375
+ return self._call("analytics.value", input, path, idempotency_key)
376
+
377
+ def denial_reasons(self, input: AnalyticsDenialReasonsInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AnalyticsDenialReasonsResponse:
378
+ "Read why claims were denied: denied claims by reason, largest first."
379
+ return self._call("analytics.denial_reasons", input, path, idempotency_key)
380
+
381
+ def request_logs(self, input: RequestLogsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> RequestLogsListResponse:
382
+ "Read request logs."
383
+ return self._call("request-logs.list", input, path, idempotency_key)
384
+
385
+ def get_request_log(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> RequestLogsGetResponse:
386
+ "Read a request log."
387
+ return self._call("request-logs.get", input, path, idempotency_key)
388
+
389
+ def audit_logs(self, input: AuditLogsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AuditLogsListResponse:
390
+ "Read audit logs."
391
+ return self._call("audit-logs.list", input, path, idempotency_key)
392
+
393
+ def get_audit_log(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AuditLogsGetResponse:
394
+ "Read an audit log."
395
+ return self._call("audit-logs.get", input, path, idempotency_key)
396
+
397
+ def account_status(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccountStatusGetResponse:
398
+ "Read account status: credits, plan, limits and auto-reload."
399
+ return self._call("account_status.get", input, path, idempotency_key)
400
+
401
+ def integration_status(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> IntegrationStatusGetResponse:
402
+ "Read integration status: whether keys, the browser script, evaluations, outcomes, webhooks and credits are working, and what to do next."
403
+ return self._call("integration_status.get", input, path, idempotency_key)
404
+
405
+ def events(self, input: EventsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EventsListResponse:
406
+ "Read account events after a cursor, oldest first, waiting for the next one if you ask."
407
+ return self._call("events.list", input, path, idempotency_key)
408
+
409
+ def browser_collection(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BrowserCollectionGetResponse:
410
+ "Read browser protection: your sites, where the script was seen, and what recent checks received."
411
+ return self._call("browser_collection.get", input, path, idempotency_key)
412
+
413
+ def update_browser_collection(self, input: BrowserCollectionUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BrowserCollectionUpdateResponse:
414
+ "Update the sites listed for browser protection."
415
+ return self._call("browser_collection.update", input, path, idempotency_key)
416
+
417
+ def browser_script(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BrowserCollectionScriptResponse:
418
+ "Get the browser script tag, with your publishable key filled in."
419
+ return self._call("browser_collection.script", input, path, idempotency_key)
420
+
421
+ def webhook_endpoints(self, input: WebhookEndpointsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsListResponse:
422
+ "List webhook endpoints."
423
+ return self._call("webhook-endpoints.list", input, path, idempotency_key)
424
+
425
+ def create_webhook_endpoint(self, input: WebhookEndpointsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsCreateResponse:
426
+ "Add a webhook endpoint. Its signing secret isn't in the response."
427
+ return self._call("webhook-endpoints.create", input, path, idempotency_key)
428
+
429
+ def get_webhook_endpoint(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsGetResponse:
430
+ "Read a webhook endpoint."
431
+ return self._call("webhook-endpoints.get", input, path, idempotency_key)
432
+
433
+ def update_webhook_endpoint(self, input: WebhookEndpointsUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsUpdateResponse:
434
+ "Change a webhook endpoint's URL, events or benefits."
435
+ return self._call("webhook-endpoints.update", input, path, idempotency_key)
436
+
437
+ def delete_webhook_endpoint(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsDeleteResponse:
438
+ "Permanently delete a webhook endpoint and its delivery log. This cannot be reversed."
439
+ return self._call("webhook-endpoints.delete", input, path, idempotency_key)
440
+
441
+ def send_webhook_test(self, input: WebhookEndpointsTestInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsTestResponse:
442
+ "Send a test event to a webhook endpoint."
443
+ return self._call("webhook-endpoints.test", input, path, idempotency_key)
444
+
445
+ def enable_webhook_endpoint(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsEnableResponse:
446
+ "Enable a webhook endpoint."
447
+ return self._call("webhook-endpoints.enable", input, path, idempotency_key)
448
+
449
+ def disable_webhook_endpoint(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsDisableResponse:
450
+ "Disable a webhook endpoint. It gets only test events until it's enabled again."
451
+ return self._call("webhook-endpoints.disable", input, path, idempotency_key)
452
+
453
+ def webhook_signing_secret(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsSecretResponse:
454
+ "Show a webhook endpoint's signing secret. Every read is recorded in the audit trail."
455
+ return self._call("webhook-endpoints.secret", input, path, idempotency_key)
456
+
457
+ def rotate_webhook_signing_secret(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsRotateSecretResponse:
458
+ "Rotate a webhook endpoint's signing secret. The previous secret keeps signing for 24 hours."
459
+ return self._call("webhook-endpoints.rotate_secret", input, path, idempotency_key)
460
+
461
+ def webhook_usage(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookDeliveriesUsageResponse:
462
+ "Read today's webhook deliveries against the daily limit."
463
+ return self._call("webhook-deliveries.usage", input, path, idempotency_key)
464
+
465
+ def webhook_deliveries(self, input: WebhookDeliveriesListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookDeliveriesListResponse:
466
+ "List webhook deliveries."
467
+ return self._call("webhook-deliveries.list", input, path, idempotency_key)
468
+
469
+ def get_webhook_delivery(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookDeliveriesGetResponse:
470
+ "Read a webhook delivery with its request body and attempts."
471
+ return self._call("webhook-deliveries.get", input, path, idempotency_key)
472
+
473
+ def resend_webhook_delivery(self, input: WebhookDeliveriesResendInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookDeliveriesResendResponse:
474
+ "Send a webhook delivery's event again, to the endpoint's current URL or the URL it was first sent to."
475
+ return self._call("webhook-deliveries.resend", input, path, idempotency_key)
476
+
477
+ def plan(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPlanResponse:
478
+ "Read the plan, its billing period and renewal date, and the workspace's limits."
479
+ return self._call("billing.plan", input, path, idempotency_key)
480
+
481
+ def usage(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingUsageResponse:
482
+ "Read credits and usage: allowance credits, pay-as-you-go credits, protected benefits and team seats."
483
+ return self._call("billing.usage", input, path, idempotency_key)
484
+
485
+ def credit_history(self, input: BillingCreditHistoryInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingCreditHistoryResponse:
486
+ "List credit history: credits added, used and removed."
487
+ return self._call("billing.credit_history", input, path, idempotency_key)
488
+
489
+ def daily_usage(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingDailyUsageResponse:
490
+ "Read credits used each day of the last 30 days."
491
+ return self._call("billing.daily_usage", input, path, idempotency_key)
492
+
493
+ def enterprise_plans(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingEnterprisePlansResponse:
494
+ "List the workspace's Enterprise plans and what each one adds."
495
+ return self._call("billing.enterprise_plans", input, path, idempotency_key)
496
+
497
+ def preview_enterprise_plan_code(self, input: BillingCodesPreviewInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingCodesPreviewResponse:
498
+ "Preview what an Enterprise plan code adds, without redeeming it."
499
+ return self._call("billing.codes.preview", input, path, idempotency_key)
500
+
501
+ def upcoming_charge(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingUpcomingResponse:
502
+ "Read the next charge: its amount, date and payment method."
503
+ return self._call("billing.upcoming", input, path, idempotency_key)
504
+
505
+ def invoices(self, input: BillingInvoicesInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingInvoicesResponse:
506
+ "List invoices, newest first, each with its secure payment page link."
507
+ return self._call("billing.invoices", input, path, idempotency_key)
508
+
509
+ def payment_methods(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPaymentMethodsResponse:
510
+ "List saved payment methods: the default first, then the backup payment methods in order."
511
+ return self._call("billing.payment_methods", input, path, idempotency_key)
512
+
513
+ def billing_details(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingDetailsResponse:
514
+ "Read billing details: name, billing email, address and tax ID."
515
+ return self._call("billing.details", input, path, idempotency_key)
516
+
517
+ def update_billing_details(self, input: BillingDetailsUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingDetailsUpdateResponse:
518
+ "Save billing details: name, billing email, address and tax ID."
519
+ return self._call("billing.details.update", input, path, idempotency_key)
520
+
521
+ def get_payment(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPaymentsGetResponse:
522
+ "Read a payment's progress."
523
+ return self._call("billing.payments.get", input, path, idempotency_key)
524
+
525
+ def quote_plan_change(self, input: BillingQuotesCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingQuotesCreateResponse:
526
+ "Get a quote for a plan or billing period change: what it costs now and at renewal. Nothing changes."
527
+ return self._call("billing.quotes.create", input, path, idempotency_key)
528
+
529
+ def set_low_credit_alert(self, input: BillingLowCreditAlertUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingLowCreditAlertUpdateResponse:
530
+ "Set the low-credit alert level, or clear it to be alerted by your usage pace."
531
+ return self._call("billing.low_credit_alert.update", input, path, idempotency_key)
532
+
533
+ def choose_what_stays_active(self, input: BillingOverLimitChooseInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingOverLimitChooseResponse:
534
+ "Choose what stays active over your plan limits: keep one benefit or member active and pause another."
535
+ return self._call("billing.over_limit.choose", input, path, idempotency_key)
536
+
537
+ def set_auto_reload(self, input: BillingAutoReloadUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingAutoReloadUpdateResponse:
538
+ "Set up, change or turn off auto-reload. When it's on, it charges the default payment method on its own."
539
+ return self._call("billing.auto_reload.update", input, path, idempotency_key)
540
+
541
+ def buy_credits(self, input: BillingCreditsBuyInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingCreditsBuyResponse:
542
+ "Buy credits with a saved payment method."
543
+ return self._call("billing.credits.buy", input, path, idempotency_key)
544
+
545
+ def retry_credit_purchase(self, input: BillingCreditsRetryInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingCreditsRetryResponse:
546
+ "Try a declined credit purchase again, with the default or another saved payment method."
547
+ return self._call("billing.credits.retry", input, path, idempotency_key)
548
+
549
+ def confirm_plan_change(self, input: BillingPlanChangeInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPlanChangeResponse:
550
+ "Confirm a quote to move to a higher plan on the same or a longer billing period, Builder to Pro or Scale included, or yearly billing on the same plan, with a saved payment method."
551
+ return self._call("billing.plan.change", input, path, idempotency_key)
552
+
553
+ def undo_scheduled_downgrade(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingDowngradeUndoResponse:
554
+ "Undo a scheduled downgrade, so the subscription renews on the current plan."
555
+ return self._call("billing.downgrade.undo", input, path, idempotency_key)
556
+
557
+ def resume_subscription(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingSubscriptionResumeResponse:
558
+ "Resume a canceled subscription before it ends, so it renews again."
559
+ return self._call("billing.subscription.resume", input, path, idempotency_key)
560
+
561
+ def pay_overdue_invoice(self, input: BillingOverduePayInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingOverduePayResponse:
562
+ "Pay an overdue invoice with a saved payment method."
563
+ return self._call("billing.overdue.pay", input, path, idempotency_key)
564
+
565
+ def set_default_payment_method(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPaymentMethodsDefaultResponse:
566
+ "Make a saved payment method the default. It then pays anything overdue."
567
+ return self._call("billing.payment_methods.default", input, path, idempotency_key)
568
+
569
+ def move_backup_payment_method(self, input: BillingPaymentMethodsMoveInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPaymentMethodsMoveResponse:
570
+ "Move a backup payment method up or down one place in the order."
571
+ return self._call("billing.payment_methods.move", input, path, idempotency_key)
572
+
573
+ def remove_payment_method(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPaymentMethodsRemoveResponse:
574
+ "Remove a saved payment method. The default can't be removed."
575
+ return self._call("billing.payment_methods.remove", input, path, idempotency_key)
576
+
577
+ def redeem_enterprise_plan_code(self, input: BillingCodesRedeemInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingCodesRedeemResponse:
578
+ "Redeem an Enterprise plan code. It adds the plan to the workspace for good."
579
+ return self._call("billing.codes.redeem", input, path, idempotency_key)
580
+
581
+ def create_billing_approval_link(self, input: BillingApprovalLinksCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingApprovalLinksCreateResponse:
582
+ "Make a link for the owner to add a payment method, or to add one and pay for an upgrade, when the workspace has none saved."
583
+ return self._call("billing.approval_links.create", input, path, idempotency_key)
584
+
585
+ def billing_approval_link(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingApprovalLinksGetResponse:
586
+ "Read whether the owner finished a billing approval link, declined it or let it expire."
587
+ return self._call("billing.approval_links.get", input, path, idempotency_key)
588
+
589
+ def update_account_name(self, input: AccountUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccountUpdateResponse:
590
+ "Change your name."
591
+ return self._call("account.update", input, path, idempotency_key)
592
+
593
+ def email_preferences(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccountEmailPreferencesResponse:
594
+ "Read which optional emails you get."
595
+ return self._call("account.email_preferences", input, path, idempotency_key)
596
+
597
+ def update_email_preferences(self, input: AccountEmailPreferencesUpdateInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccountEmailPreferencesUpdateResponse:
598
+ "Choose which optional emails you get. Sign-in, security and billing emails always go."
599
+ return self._call("account.email_preferences_update", input, path, idempotency_key)
600
+
601
+ def notifications(self, input: NotificationsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> NotificationsListResponse:
602
+ "List your notifications, and how many are unread."
603
+ return self._call("notifications.list", input, path, idempotency_key)
604
+
605
+ def mark_notification(self, input: NotificationsUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> NotificationsUpdateResponse:
606
+ "Mark a notification as read or unread."
607
+ return self._call("notifications.update", input, path, idempotency_key)
608
+
609
+ def mark_all_notifications_read(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> NotificationsReadAllResponse:
610
+ "Mark all your notifications as read."
611
+ return self._call("notifications.read_all", input, path, idempotency_key)
612
+
613
+ def run_notification_action(self, input: NotificationsRunActionInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> NotificationsRunActionResponse:
614
+ "Run one of a notification's actions. It also needs the scope of the action it runs."
615
+ return self._call("notifications.run_action", input, path, idempotency_key)
616
+
617
+ def contact_support(self, input: SupportTicketsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> SupportTicketsCreateResponse:
618
+ "Contact AbuseZero support about this workspace. Support replies to your account email."
619
+ return self._call("support-tickets.create", input, path, idempotency_key)
620
+
621
+ def support_tickets(self, input: SupportTicketsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> SupportTicketsListResponse:
622
+ "List the support tickets you sent about this workspace."
623
+ return self._call("support-tickets.list", input, path, idempotency_key)
624
+
625
+ def send_feedback(self, input: FeedbackCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> FeedbackCreateResponse:
626
+ "Send product feedback to the AbuseZero team."
627
+ return self._call("feedback.create", input, path, idempotency_key)
628
+ class AbuseZeroPublic(Core):
629
+ _public = True
630
+
631
+ def pricing(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicPricingResponse:
632
+ "Read AbuseZero's plans and prices, what each plan includes and what every plan shares."
633
+ return self._call("public.pricing", input, path, idempotency_key)
634
+
635
+ def price_quote(self, input: PublicPricingQuoteInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicPricingQuoteResponse:
636
+ "Get the exact price of a plan for a month or a year, or of a credit pack."
637
+ return self._call("public.pricing_quote", input, path, idempotency_key)
638
+
639
+ def docs(self, input: PublicDocsInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicDocsResponse:
640
+ "List the developer docs pages, with each page's title, path and last update."
641
+ return self._call("public.docs", input, path, idempotency_key)
642
+
643
+ def search_docs(self, input: PublicDocsSearchInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicDocsSearchResponse:
644
+ "Search the developer docs."
645
+ return self._call("public.docs_search", input, path, idempotency_key)
646
+
647
+ def public_docs_page(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicDocsPageResponse:
648
+ "Read a developer docs page as Markdown."
649
+ return self._call("public.docs_page", input, path, idempotency_key)
650
+
651
+ def help_articles(self, input: PublicHelpInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicHelpResponse:
652
+ "List the help center's articles, with each article's title, path and last update."
653
+ return self._call("public.help", input, path, idempotency_key)
654
+
655
+ def search_help(self, input: PublicHelpSearchInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicHelpSearchResponse:
656
+ "Search the help center."
657
+ return self._call("public.help_search", input, path, idempotency_key)
658
+
659
+ def public_help_article(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicHelpArticleResponse:
660
+ "Read a help center article as Markdown."
661
+ return self._call("public.help_article", input, path, idempotency_key)
662
+
663
+ def openapi(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicOpenapiResponse:
664
+ "Read the OpenAPI document for the AbuseZero API."
665
+ return self._call("public.openapi", input, path, idempotency_key)
666
+
667
+ def actions(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicActionsResponse:
668
+ "List every API action with its MCP tool, CLI command and scope."
669
+ return self._call("public.actions", input, path, idempotency_key)
670
+
671
+ def error_codes(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicErrorsResponse:
672
+ "List the API's error codes: what each means, whether to retry and what to do next."
673
+ return self._call("public.errors", input, path, idempotency_key)
674
+
675
+ def reason_codes(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicReasonsResponse:
676
+ "List the reason codes evaluations return."
677
+ return self._call("public.reasons", input, path, idempotency_key)
678
+
679
+ def webhook_event_types(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicWebhookEventsResponse:
680
+ "List the webhook event types, each with an example payload."
681
+ return self._call("public.webhook_events", input, path, idempotency_key)
682
+
683
+ def conditions(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicConditionsResponse:
684
+ "List the conditions the rules in custom policies can use."
685
+ return self._call("public.conditions", input, path, idempotency_key)
686
+
687
+ def glossary(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicGlossaryResponse:
688
+ "Read the glossary and the developer FAQ."
689
+ return self._call("public.glossary", input, path, idempotency_key)
690
+
691
+ def legal_documents(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicLegalResponse:
692
+ "List AbuseZero's legal documents, with each one's version and effective date."
693
+ return self._call("public.legal", input, path, idempotency_key)
694
+
695
+ def legal_document(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicLegalDocumentResponse:
696
+ "Read a legal document as Markdown."
697
+ return self._call("public.legal_document", input, path, idempotency_key)
698
+
699
+ def changelog(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicChangelogResponse:
700
+ "Read the product changelog."
701
+ return self._call("public.changelog", input, path, idempotency_key)
702
+
703
+ def blog_posts(self, input: PublicBlogInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicBlogResponse:
704
+ "List blog posts."
705
+ return self._call("public.blog", input, path, idempotency_key)
706
+
707
+ def blog_post(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicBlogPostResponse:
708
+ "Read a blog post as Markdown."
709
+ return self._call("public.blog_post", input, path, idempotency_key)
710
+
711
+ def versions(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicVersionsResponse:
712
+ "Read the latest npm package version and the browser script address."
713
+ return self._call("public.versions", input, path, idempotency_key)
714
+
715
+ def service_status(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicStatusResponse:
716
+ "Read whether AbuseZero is operational or degraded."
717
+ return self._call("public.status", input, path, idempotency_key)
718
+
719
+ def contacts(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicContactsResponse:
720
+ "Read how to reach AbuseZero's support, sales and security."
721
+ return self._call("public.contacts", input, path, idempotency_key)
722
+
723
+ def contact_sales(self, input: PublicContactSalesInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicContactSalesResponse:
724
+ "Send a message to AbuseZero's sales team about an Enterprise plan."
725
+ return self._call("public.contact_sales", input, path, idempotency_key)
726
+
727
+ def contact_support(self, input: PublicContactSupportInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicContactSupportResponse:
728
+ "Send a request to AbuseZero support without an account."
729
+ return self._call("public.contact_support", input, path, idempotency_key)
730
+
731
+ def start_onboarding(self, input: PublicOnboardingStartInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicOnboardingStartResponse:
732
+ "Start agent onboarding for a new workspace: returns the approval link for the person, and a secret only this agent keeps."
733
+ return self._call("public.onboarding_start", input, path, idempotency_key)
734
+
735
+ def onboarding_status(self, input: PublicOnboardingStatusInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicOnboardingStatusResponse:
736
+ "Read whether the person finished onboarding, optionally waiting up to 25 seconds, and how to collect the sign-in."
737
+ return self._call("public.onboarding_status", input, path, idempotency_key)
738
+ class AsyncAbuseZero(AsyncCore):
739
+ _public = False
740
+
741
+ async def workspaces(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspacesListResponse:
742
+ "List workspaces available to this identity."
743
+ return await self._call("workspaces.list", input, path, idempotency_key)
744
+
745
+ async def me(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MeGetResponse:
746
+ "Read who this connection acts for: the person, their role and permissions, the workspace and the granted scopes."
747
+ return await self._call("me.get", input, path, idempotency_key)
748
+
749
+ async def api_keys(self, input: ApiKeysListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ApiKeysListResponse:
750
+ "List API keys with their type, scopes, last use and expiry. Secrets are never returned."
751
+ return await self._call("api-keys.list", input, path, idempotency_key)
752
+
753
+ async def create_api_key(self, input: ApiKeysCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ApiKeysCreateResponse:
754
+ "Create a secret or restricted key. Its secret is shown once, in the response."
755
+ return await self._call("api-keys.create", input, path, idempotency_key)
756
+
757
+ async def update_api_key(self, input: ApiKeysUpdateInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ApiKeysUpdateResponse:
758
+ "Change an API key's name, scopes or expiry."
759
+ return await self._call("api-keys.update", input, path, idempotency_key)
760
+
761
+ async def roll_api_key(self, input: ApiKeysRollInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ApiKeysRollResponse:
762
+ "Roll an API key. The old key keeps working for 1 hour, 24 hours or 7 days, and the new secret is shown once."
763
+ return await self._call("api-keys.roll", input, path, idempotency_key)
764
+
765
+ async def show_api_key_replacement(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ApiKeysReplacementResponse:
766
+ "Show a key's replacement once, when AbuseZero replaced the key for you."
767
+ return await self._call("api-keys.replacement", input, path, idempotency_key)
768
+
769
+ async def revoke_api_key(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ApiKeysRevokeResponse:
770
+ "Revoke an API key. It stops working at once."
771
+ return await self._call("api-keys.revoke", input, path, idempotency_key)
772
+
773
+ async def machine_clients(self, input: MachineClientsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MachineClientsListResponse:
774
+ "List machine clients."
775
+ return await self._call("machine-clients.list", input, path, idempotency_key)
776
+
777
+ async def create_machine_client(self, input: MachineClientsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MachineClientsCreateResponse:
778
+ "Create a machine client. Its secret is shown once, in the response."
779
+ return await self._call("machine-clients.create", input, path, idempotency_key)
780
+
781
+ async def rotate_machine_client_secret(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MachineClientsRotateSecretResponse:
782
+ "Rotate a machine client's secret. The old secret stops working at once, and the new one is shown once."
783
+ return await self._call("machine-clients.rotate_secret", input, path, idempotency_key)
784
+
785
+ async def revoke_machine_client(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MachineClientsRevokeResponse:
786
+ "Revoke a machine client. Its secret and access tokens stop working at once."
787
+ return await self._call("machine-clients.revoke", input, path, idempotency_key)
788
+
789
+ async def authorized_apps(self, input: AuthorizedAppsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AuthorizedAppsListResponse:
790
+ "List the apps and agents members authorized with OAuth."
791
+ return await self._call("authorized-apps.list", input, path, idempotency_key)
792
+
793
+ async def disconnect_authorized_app(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AuthorizedAppsDisconnectResponse:
794
+ "Disconnect one of your authorized apps. It loses access at once."
795
+ return await self._call("authorized-apps.disconnect", input, path, idempotency_key)
796
+
797
+ async def members(self, input: MembersListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MembersListResponse:
798
+ "List the workspace's members with their roles and permissions."
799
+ return await self._call("members.list", input, path, idempotency_key)
800
+
801
+ async def update_member(self, input: MembersUpdateInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MembersUpdateResponse:
802
+ "Change a member's role or permissions."
803
+ return await self._call("members.update", input, path, idempotency_key)
804
+
805
+ async def remove_member(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> MembersRemoveResponse:
806
+ "Remove a member from the workspace. They lose access at once."
807
+ return await self._call("members.remove", input, path, idempotency_key)
808
+
809
+ async def invitations(self, input: InvitationsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> InvitationsListResponse:
810
+ "List pending invitations."
811
+ return await self._call("invitations.list", input, path, idempotency_key)
812
+
813
+ async def invite_member(self, input: InvitationsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> InvitationsCreateResponse:
814
+ "Invite someone to the workspace by email, up to the plan's team seats."
815
+ return await self._call("invitations.create", input, path, idempotency_key)
816
+
817
+ async def resend_invitation(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> InvitationsResendResponse:
818
+ "Send a pending invitation again, as a new invitation that replaces it."
819
+ return await self._call("invitations.resend", input, path, idempotency_key)
820
+
821
+ async def cancel_invitation(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> InvitationsCancelResponse:
822
+ "Cancel a pending invitation."
823
+ return await self._call("invitations.cancel", input, path, idempotency_key)
824
+
825
+ async def workspace_settings(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceGetResponse:
826
+ "Read the workspace's settings: name, icon, time zone, website, product type and data retention."
827
+ return await self._call("workspace.get", input, path, idempotency_key)
828
+
829
+ async def update_workspace_settings(self, input: WorkspaceUpdateInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceUpdateResponse:
830
+ "Rename the workspace, or change its website, product type or time zone."
831
+ return await self._call("workspace.update", input, path, idempotency_key)
832
+
833
+ async def upload_workspace_icon(self, input: WorkspaceIconUploadInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceIconUploadResponse:
834
+ "Upload a new workspace icon. It's checked before it's used."
835
+ return await self._call("workspace.icon_upload", input, path, idempotency_key)
836
+
837
+ async def remove_workspace_icon(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceIconRemoveResponse:
838
+ "Remove the workspace icon."
839
+ return await self._call("workspace.icon_remove", input, path, idempotency_key)
840
+
841
+ async def workspace_icon_upload(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceIconUploadGetResponse:
842
+ "Read whether an uploaded workspace icon is ready."
843
+ return await self._call("workspace.icon_upload_get", input, path, idempotency_key)
844
+
845
+ async def set_data_retention(self, input: WorkspaceRetentionInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceRetentionResponse:
846
+ "Change how long evaluation evidence is kept. Shortening it deletes older evidence for good."
847
+ return await self._call("workspace.retention", input, path, idempotency_key)
848
+
849
+ async def setup_progress(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceSetupResponse:
850
+ "Read setup progress: which Get started steps are done."
851
+ return await self._call("workspace.setup", input, path, idempotency_key)
852
+
853
+ async def finish_setup(self, input: WorkspaceSetupFinishInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceSetupFinishResponse:
854
+ "Finish setting up the workspace, with its website, product type and time zone. Workspace owner only."
855
+ return await self._call("workspace.setup_finish", input, path, idempotency_key)
856
+
857
+ async def dismiss_setup_guide(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceSetupDismissResponse:
858
+ "Stop Get started opening by itself for you."
859
+ return await self._call("workspace.setup_dismiss", input, path, idempotency_key)
860
+
861
+ async def leave_workspace(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceLeaveResponse:
862
+ "Leave the workspace. Your access ends, and so does this sign-in's."
863
+ return await self._call("workspace.leave", input, path, idempotency_key)
864
+
865
+ async def evaluations(self, input: EvaluationsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EvaluationsListResponse:
866
+ "List evaluations."
867
+ return await self._call("evaluations.list", input, path, idempotency_key)
868
+
869
+ async def evaluate(self, input: EvaluationsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> Evaluation:
870
+ "Evaluate a benefit claim."
871
+ return await self._call("evaluations.create", input, path, idempotency_key)
872
+
873
+ async def evaluation_filters(self, input: EvaluationsFiltersInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EvaluationsFiltersResponse:
874
+ "Read the benefits, results and reasons found in recent evaluations."
875
+ return await self._call("evaluations.filters", input, path, idempotency_key)
876
+
877
+ async def get_evaluation(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EvaluationsGetResponse:
878
+ "Read an evaluation."
879
+ return await self._call("evaluations.get", input, path, idempotency_key)
880
+
881
+ async def evaluation_graph(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EvaluationsGraphResponse:
882
+ "Read an evaluation association graph."
883
+ return await self._call("evaluations.graph", input, path, idempotency_key)
884
+
885
+ async def evaluation_evidence(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EvaluationsEvidenceResponse:
886
+ "Read retained evaluation evidence."
887
+ return await self._call("evaluations.evidence", input, path, idempotency_key)
888
+
889
+ async def outcomes(self, input: OutcomesListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> OutcomesListResponse:
890
+ "List outcomes."
891
+ return await self._call("outcomes.list", input, path, idempotency_key)
892
+
893
+ async def get_outcome(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> OutcomesGetResponse:
894
+ "Read an outcome."
895
+ return await self._call("outcomes.get", input, path, idempotency_key)
896
+
897
+ async def outcome(self, input: OutcomesReportInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> OutcomesReportResponse:
898
+ "Record a known outcome, including a benefit delivered after a deny."
899
+ return await self._call("outcomes.report", input, path, idempotency_key)
900
+
901
+ async def dry_run_evaluation(self, input: EvaluationsDryRunInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EvaluationsDryRunResponseVariant0 | EvaluationsDryRunResponseVariant1:
902
+ "Run a dry-run evaluation without writing claim history. Completed dry-run evaluations consume usage."
903
+ return await self._call("evaluations.dry_run", input, path, idempotency_key)
904
+
905
+ async def simulate(self, input: SimulationsSequenceInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> SimulationsSequenceResponse:
906
+ "Simulate a retained sequence."
907
+ return await self._call("simulations.sequence", input, path, idempotency_key)
908
+
909
+ async def replay(self, input: SimulationsReplayInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> SimulationsReplayResponse:
910
+ "Replay retained evaluations against a saved policy."
911
+ return await self._call("simulations.replay", input, path, idempotency_key)
912
+
913
+ async def benefits(self, input: BenefitsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BenefitsListResponse:
914
+ "List benefits."
915
+ return await self._call("benefits.list", input, path, idempotency_key)
916
+
917
+ async def create_benefit(self, input: BenefitsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BenefitsCreateResponse:
918
+ "Create a benefit."
919
+ return await self._call("benefits.create", input, path, idempotency_key)
920
+
921
+ async def get_benefit(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BenefitsGetResponse:
922
+ "Read a benefit."
923
+ return await self._call("benefits.get", input, path, idempotency_key)
924
+
925
+ async def update_benefit(self, input: BenefitsUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BenefitsUpdateResponse:
926
+ "Update a benefit."
927
+ return await self._call("benefits.update", input, path, idempotency_key)
928
+
929
+ async def delete_benefit(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BenefitsDeleteResponse:
930
+ "Permanently delete a benefit. This cannot be reversed."
931
+ return await self._call("benefits.delete", input, path, idempotency_key)
932
+
933
+ async def policies(self, input: PoliciesListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesListResponse:
934
+ "List policies."
935
+ return await self._call("policies.list", input, path, idempotency_key)
936
+
937
+ async def create_policy(self, input: PoliciesCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesCreateResponse:
938
+ "Create a policy."
939
+ return await self._call("policies.create", input, path, idempotency_key)
940
+
941
+ async def get_policy(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesGetResponse:
942
+ "Read a policy."
943
+ return await self._call("policies.get", input, path, idempotency_key)
944
+
945
+ async def update_policy(self, input: PoliciesUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesUpdateResponse:
946
+ "Update a policy."
947
+ return await self._call("policies.update", input, path, idempotency_key)
948
+
949
+ async def delete_policy(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesDeleteResponse:
950
+ "Permanently delete an unused custom policy. This cannot be reversed."
951
+ return await self._call("policies.delete", input, path, idempotency_key)
952
+
953
+ async def duplicate_policy(self, input: PoliciesDuplicateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesDuplicateResponse:
954
+ "Duplicate a policy."
955
+ return await self._call("policies.duplicate", input, path, idempotency_key)
956
+
957
+ async def policy_versions(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesVersionsResponse:
958
+ "List saved policy versions."
959
+ return await self._call("policies.versions", input, path, idempotency_key)
960
+
961
+ async def get_policy_version(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesVersionResponse:
962
+ "Read a saved policy version."
963
+ return await self._call("policies.version", input, path, idempotency_key)
964
+
965
+ async def policy_signals(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PoliciesSignalsResponse:
966
+ "List signals available to policy rules."
967
+ return await self._call("policies.signals", input, path, idempotency_key)
968
+
969
+ async def access_lists(self, input: AccessListsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccessListsListResponse:
970
+ "List access lists."
971
+ return await self._call("access-lists.list", input, path, idempotency_key)
972
+
973
+ async def add_access_list_entries(self, input: AccessListsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccessListsCreateResponse:
974
+ "Create an access list entry."
975
+ return await self._call("access-lists.create", input, path, idempotency_key)
976
+
977
+ async def get_access_list_entry(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccessListsGetResponse:
978
+ "Read an access list entry."
979
+ return await self._call("access-lists.get", input, path, idempotency_key)
980
+
981
+ async def delete_access_list_entry(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccessListsDeleteResponse:
982
+ "Permanently delete an access list entry. This cannot be reversed."
983
+ return await self._call("access-lists.delete", input, path, idempotency_key)
984
+
985
+ async def update_access_list_entry(self, input: AccessListsUpdateInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccessListsUpdateResponse:
986
+ "Update an access list entry's list, benefits, reason or expiry."
987
+ return await self._call("access-lists.update", input, path, idempotency_key)
988
+
989
+ async def look_up_identifier(self, input: IdentifiersLookupInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> IdentifiersLookupResponse:
990
+ "Look up an ID, email address or IP address."
991
+ return await self._call("identifiers.lookup", input, path, idempotency_key)
992
+
993
+ async def custom_identifiers(self, input: CustomIdentifiersListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> CustomIdentifiersListResponse:
994
+ "List custom identifiers."
995
+ return await self._call("custom-identifiers.list", input, path, idempotency_key)
996
+
997
+ async def register_custom_identifier(self, input: CustomIdentifiersCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> CustomIdentifiersCreateResponse:
998
+ "Create a custom identifier."
999
+ return await self._call("custom-identifiers.create", input, path, idempotency_key)
1000
+
1001
+ async def get_custom_identifier(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> CustomIdentifiersGetResponse:
1002
+ "Read a custom identifier."
1003
+ return await self._call("custom-identifiers.get", input, path, idempotency_key)
1004
+
1005
+ async def delete_custom_identifier(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> CustomIdentifiersDeleteResponse:
1006
+ "Permanently delete a custom identifier. This cannot be reversed."
1007
+ return await self._call("custom-identifiers.delete", input, path, idempotency_key)
1008
+
1009
+ async def imports(self, input: ImportsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsListResponse:
1010
+ "List imports."
1011
+ return await self._call("imports.list", input, path, idempotency_key)
1012
+
1013
+ async def import_claim_history(self, input: ImportsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsCreateResponse:
1014
+ "Import claim history: benefits you granted before AbuseZero. The rows wait for review unless the request sends confirm."
1015
+ return await self._call("imports.create", input, path, idempotency_key)
1016
+
1017
+ async def create_csv_import(self, input: ImportsCsvInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsCsvResponse:
1018
+ "Start a claim history import from a CSV file, and get its upload link."
1019
+ return await self._call("imports.csv", input, path, idempotency_key)
1020
+
1021
+ async def get_import(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsGetResponse:
1022
+ "Read an import: its state, its rows' counts and its progress."
1023
+ return await self._call("imports.get", input, path, idempotency_key)
1024
+
1025
+ async def list_import_problems(self, input: ImportsProblemsInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsProblemsResponse:
1026
+ "List an import's rows that can't be added, with each row's problem and field."
1027
+ return await self._call("imports.problems", input, path, idempotency_key)
1028
+
1029
+ async def import_problems_download(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsProblemsDownloadResponse:
1030
+ "Create a short-lived download link for an import's rows with problems."
1031
+ return await self._call("imports.problems_download", input, path, idempotency_key)
1032
+
1033
+ async def confirm_import(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsConfirmResponse:
1034
+ "Add an import that's ready to review. Rows that need attention are skipped."
1035
+ return await self._call("imports.confirm", input, path, idempotency_key)
1036
+
1037
+ async def discard_import(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsDiscardResponse:
1038
+ "Discard an import before it's confirmed. Nothing from it is added, and its rows are deleted."
1039
+ return await self._call("imports.discard", input, path, idempotency_key)
1040
+
1041
+ async def fix_import_row(self, input: ImportsFixRowInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsFixRowResponse:
1042
+ "Fix one row that needs attention in an import that's ready to review."
1043
+ return await self._call("imports.fix_row", input, path, idempotency_key)
1044
+
1045
+ async def skip_import_row(self, input: ImportsSkipRowInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ImportsSkipRowResponse:
1046
+ "Skip one row that needs attention in an import that's ready to review."
1047
+ return await self._call("imports.skip_row", input, path, idempotency_key)
1048
+
1049
+ async def exports(self, input: ExportsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ExportsListResponse:
1050
+ "List exports."
1051
+ return await self._call("exports.list", input, path, idempotency_key)
1052
+
1053
+ async def request_export(self, input: ExportsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ExportsCreateResponse:
1054
+ "Create an evaluation export."
1055
+ return await self._call("exports.create", input, path, idempotency_key)
1056
+
1057
+ async def get_export(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ExportsGetResponse:
1058
+ "Read export status."
1059
+ return await self._call("exports.get", input, path, idempotency_key)
1060
+
1061
+ async def export_download(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> ExportsDownloadResponse:
1062
+ "Create a short-lived export download URL."
1063
+ return await self._call("exports.download", input, path, idempotency_key)
1064
+
1065
+ async def request_workspace_export(self, input: WorkspaceExportsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceExportsCreateResponse:
1066
+ "Request a workspace data export, with the password for its ZIP files."
1067
+ return await self._call("workspace-exports.create", input, path, idempotency_key)
1068
+
1069
+ async def workspace_export(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceExportsStatusResponse:
1070
+ "Read the workspace's latest data export, and when the next one can be requested."
1071
+ return await self._call("workspace-exports.status", input, path, idempotency_key)
1072
+
1073
+ async def workspace_export_download(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceExportsDownloadResponse:
1074
+ "Get short-lived links to the files of a workspace data export you requested."
1075
+ return await self._call("workspace-exports.download", input, path, idempotency_key)
1076
+
1077
+ async def delete_workspace_export(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WorkspaceExportsDeleteResponse:
1078
+ "Delete a workspace data export. Its files are removed for good."
1079
+ return await self._call("workspace-exports.delete", input, path, idempotency_key)
1080
+
1081
+ async def dry_run_data_deletion(self, input: DeletionsDryRunInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> DeletionsDryRunResponse:
1082
+ "Run a dry run of user-history deletion."
1083
+ return await self._call("deletions.dry_run", input, path, idempotency_key)
1084
+
1085
+ async def data_deletions(self, input: DeletionsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> DeletionsListResponse:
1086
+ "List data deletions."
1087
+ return await self._call("deletions.list", input, path, idempotency_key)
1088
+
1089
+ async def request_data_deletion(self, input: DeletionsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> DeletionsCreateResponse:
1090
+ "Permanently delete user history. This cannot be reversed."
1091
+ return await self._call("deletions.create", input, path, idempotency_key)
1092
+
1093
+ async def get_data_deletion(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> DeletionsGetResponse:
1094
+ "Read data-deletion status."
1095
+ return await self._call("deletions.get", input, path, idempotency_key)
1096
+
1097
+ async def analytics(self, input: AnalyticsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AnalyticsListResponse:
1098
+ "Read analytics."
1099
+ return await self._call("analytics.list", input, path, idempotency_key)
1100
+
1101
+ async def overview(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> OverviewGetResponse:
1102
+ "Read the overview of the last 24 hours."
1103
+ return await self._call("overview.get", input, path, idempotency_key)
1104
+
1105
+ async def benefit_value(self, input: AnalyticsValueInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AnalyticsValueResponse:
1106
+ "Read benefit value: what delivered claims were worth and what AbuseZero saved, in any supported currency."
1107
+ return await self._call("analytics.value", input, path, idempotency_key)
1108
+
1109
+ async def denial_reasons(self, input: AnalyticsDenialReasonsInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AnalyticsDenialReasonsResponse:
1110
+ "Read why claims were denied: denied claims by reason, largest first."
1111
+ return await self._call("analytics.denial_reasons", input, path, idempotency_key)
1112
+
1113
+ async def request_logs(self, input: RequestLogsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> RequestLogsListResponse:
1114
+ "Read request logs."
1115
+ return await self._call("request-logs.list", input, path, idempotency_key)
1116
+
1117
+ async def get_request_log(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> RequestLogsGetResponse:
1118
+ "Read a request log."
1119
+ return await self._call("request-logs.get", input, path, idempotency_key)
1120
+
1121
+ async def audit_logs(self, input: AuditLogsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AuditLogsListResponse:
1122
+ "Read audit logs."
1123
+ return await self._call("audit-logs.list", input, path, idempotency_key)
1124
+
1125
+ async def get_audit_log(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AuditLogsGetResponse:
1126
+ "Read an audit log."
1127
+ return await self._call("audit-logs.get", input, path, idempotency_key)
1128
+
1129
+ async def account_status(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccountStatusGetResponse:
1130
+ "Read account status: credits, plan, limits and auto-reload."
1131
+ return await self._call("account_status.get", input, path, idempotency_key)
1132
+
1133
+ async def integration_status(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> IntegrationStatusGetResponse:
1134
+ "Read integration status: whether keys, the browser script, evaluations, outcomes, webhooks and credits are working, and what to do next."
1135
+ return await self._call("integration_status.get", input, path, idempotency_key)
1136
+
1137
+ async def events(self, input: EventsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> EventsListResponse:
1138
+ "Read account events after a cursor, oldest first, waiting for the next one if you ask."
1139
+ return await self._call("events.list", input, path, idempotency_key)
1140
+
1141
+ async def browser_collection(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BrowserCollectionGetResponse:
1142
+ "Read browser protection: your sites, where the script was seen, and what recent checks received."
1143
+ return await self._call("browser_collection.get", input, path, idempotency_key)
1144
+
1145
+ async def update_browser_collection(self, input: BrowserCollectionUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BrowserCollectionUpdateResponse:
1146
+ "Update the sites listed for browser protection."
1147
+ return await self._call("browser_collection.update", input, path, idempotency_key)
1148
+
1149
+ async def browser_script(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BrowserCollectionScriptResponse:
1150
+ "Get the browser script tag, with your publishable key filled in."
1151
+ return await self._call("browser_collection.script", input, path, idempotency_key)
1152
+
1153
+ async def webhook_endpoints(self, input: WebhookEndpointsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsListResponse:
1154
+ "List webhook endpoints."
1155
+ return await self._call("webhook-endpoints.list", input, path, idempotency_key)
1156
+
1157
+ async def create_webhook_endpoint(self, input: WebhookEndpointsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsCreateResponse:
1158
+ "Add a webhook endpoint. Its signing secret isn't in the response."
1159
+ return await self._call("webhook-endpoints.create", input, path, idempotency_key)
1160
+
1161
+ async def get_webhook_endpoint(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsGetResponse:
1162
+ "Read a webhook endpoint."
1163
+ return await self._call("webhook-endpoints.get", input, path, idempotency_key)
1164
+
1165
+ async def update_webhook_endpoint(self, input: WebhookEndpointsUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsUpdateResponse:
1166
+ "Change a webhook endpoint's URL, events or benefits."
1167
+ return await self._call("webhook-endpoints.update", input, path, idempotency_key)
1168
+
1169
+ async def delete_webhook_endpoint(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsDeleteResponse:
1170
+ "Permanently delete a webhook endpoint and its delivery log. This cannot be reversed."
1171
+ return await self._call("webhook-endpoints.delete", input, path, idempotency_key)
1172
+
1173
+ async def send_webhook_test(self, input: WebhookEndpointsTestInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsTestResponse:
1174
+ "Send a test event to a webhook endpoint."
1175
+ return await self._call("webhook-endpoints.test", input, path, idempotency_key)
1176
+
1177
+ async def enable_webhook_endpoint(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsEnableResponse:
1178
+ "Enable a webhook endpoint."
1179
+ return await self._call("webhook-endpoints.enable", input, path, idempotency_key)
1180
+
1181
+ async def disable_webhook_endpoint(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsDisableResponse:
1182
+ "Disable a webhook endpoint. It gets only test events until it's enabled again."
1183
+ return await self._call("webhook-endpoints.disable", input, path, idempotency_key)
1184
+
1185
+ async def webhook_signing_secret(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsSecretResponse:
1186
+ "Show a webhook endpoint's signing secret. Every read is recorded in the audit trail."
1187
+ return await self._call("webhook-endpoints.secret", input, path, idempotency_key)
1188
+
1189
+ async def rotate_webhook_signing_secret(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookEndpointsRotateSecretResponse:
1190
+ "Rotate a webhook endpoint's signing secret. The previous secret keeps signing for 24 hours."
1191
+ return await self._call("webhook-endpoints.rotate_secret", input, path, idempotency_key)
1192
+
1193
+ async def webhook_usage(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookDeliveriesUsageResponse:
1194
+ "Read today's webhook deliveries against the daily limit."
1195
+ return await self._call("webhook-deliveries.usage", input, path, idempotency_key)
1196
+
1197
+ async def webhook_deliveries(self, input: WebhookDeliveriesListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookDeliveriesListResponse:
1198
+ "List webhook deliveries."
1199
+ return await self._call("webhook-deliveries.list", input, path, idempotency_key)
1200
+
1201
+ async def get_webhook_delivery(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookDeliveriesGetResponse:
1202
+ "Read a webhook delivery with its request body and attempts."
1203
+ return await self._call("webhook-deliveries.get", input, path, idempotency_key)
1204
+
1205
+ async def resend_webhook_delivery(self, input: WebhookDeliveriesResendInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> WebhookDeliveriesResendResponse:
1206
+ "Send a webhook delivery's event again, to the endpoint's current URL or the URL it was first sent to."
1207
+ return await self._call("webhook-deliveries.resend", input, path, idempotency_key)
1208
+
1209
+ async def plan(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPlanResponse:
1210
+ "Read the plan, its billing period and renewal date, and the workspace's limits."
1211
+ return await self._call("billing.plan", input, path, idempotency_key)
1212
+
1213
+ async def usage(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingUsageResponse:
1214
+ "Read credits and usage: allowance credits, pay-as-you-go credits, protected benefits and team seats."
1215
+ return await self._call("billing.usage", input, path, idempotency_key)
1216
+
1217
+ async def credit_history(self, input: BillingCreditHistoryInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingCreditHistoryResponse:
1218
+ "List credit history: credits added, used and removed."
1219
+ return await self._call("billing.credit_history", input, path, idempotency_key)
1220
+
1221
+ async def daily_usage(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingDailyUsageResponse:
1222
+ "Read credits used each day of the last 30 days."
1223
+ return await self._call("billing.daily_usage", input, path, idempotency_key)
1224
+
1225
+ async def enterprise_plans(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingEnterprisePlansResponse:
1226
+ "List the workspace's Enterprise plans and what each one adds."
1227
+ return await self._call("billing.enterprise_plans", input, path, idempotency_key)
1228
+
1229
+ async def preview_enterprise_plan_code(self, input: BillingCodesPreviewInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingCodesPreviewResponse:
1230
+ "Preview what an Enterprise plan code adds, without redeeming it."
1231
+ return await self._call("billing.codes.preview", input, path, idempotency_key)
1232
+
1233
+ async def upcoming_charge(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingUpcomingResponse:
1234
+ "Read the next charge: its amount, date and payment method."
1235
+ return await self._call("billing.upcoming", input, path, idempotency_key)
1236
+
1237
+ async def invoices(self, input: BillingInvoicesInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingInvoicesResponse:
1238
+ "List invoices, newest first, each with its secure payment page link."
1239
+ return await self._call("billing.invoices", input, path, idempotency_key)
1240
+
1241
+ async def payment_methods(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPaymentMethodsResponse:
1242
+ "List saved payment methods: the default first, then the backup payment methods in order."
1243
+ return await self._call("billing.payment_methods", input, path, idempotency_key)
1244
+
1245
+ async def billing_details(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingDetailsResponse:
1246
+ "Read billing details: name, billing email, address and tax ID."
1247
+ return await self._call("billing.details", input, path, idempotency_key)
1248
+
1249
+ async def update_billing_details(self, input: BillingDetailsUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingDetailsUpdateResponse:
1250
+ "Save billing details: name, billing email, address and tax ID."
1251
+ return await self._call("billing.details.update", input, path, idempotency_key)
1252
+
1253
+ async def get_payment(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPaymentsGetResponse:
1254
+ "Read a payment's progress."
1255
+ return await self._call("billing.payments.get", input, path, idempotency_key)
1256
+
1257
+ async def quote_plan_change(self, input: BillingQuotesCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingQuotesCreateResponse:
1258
+ "Get a quote for a plan or billing period change: what it costs now and at renewal. Nothing changes."
1259
+ return await self._call("billing.quotes.create", input, path, idempotency_key)
1260
+
1261
+ async def set_low_credit_alert(self, input: BillingLowCreditAlertUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingLowCreditAlertUpdateResponse:
1262
+ "Set the low-credit alert level, or clear it to be alerted by your usage pace."
1263
+ return await self._call("billing.low_credit_alert.update", input, path, idempotency_key)
1264
+
1265
+ async def choose_what_stays_active(self, input: BillingOverLimitChooseInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingOverLimitChooseResponse:
1266
+ "Choose what stays active over your plan limits: keep one benefit or member active and pause another."
1267
+ return await self._call("billing.over_limit.choose", input, path, idempotency_key)
1268
+
1269
+ async def set_auto_reload(self, input: BillingAutoReloadUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingAutoReloadUpdateResponse:
1270
+ "Set up, change or turn off auto-reload. When it's on, it charges the default payment method on its own."
1271
+ return await self._call("billing.auto_reload.update", input, path, idempotency_key)
1272
+
1273
+ async def buy_credits(self, input: BillingCreditsBuyInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingCreditsBuyResponse:
1274
+ "Buy credits with a saved payment method."
1275
+ return await self._call("billing.credits.buy", input, path, idempotency_key)
1276
+
1277
+ async def retry_credit_purchase(self, input: BillingCreditsRetryInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingCreditsRetryResponse:
1278
+ "Try a declined credit purchase again, with the default or another saved payment method."
1279
+ return await self._call("billing.credits.retry", input, path, idempotency_key)
1280
+
1281
+ async def confirm_plan_change(self, input: BillingPlanChangeInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPlanChangeResponse:
1282
+ "Confirm a quote to move to a higher plan on the same or a longer billing period, Builder to Pro or Scale included, or yearly billing on the same plan, with a saved payment method."
1283
+ return await self._call("billing.plan.change", input, path, idempotency_key)
1284
+
1285
+ async def undo_scheduled_downgrade(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingDowngradeUndoResponse:
1286
+ "Undo a scheduled downgrade, so the subscription renews on the current plan."
1287
+ return await self._call("billing.downgrade.undo", input, path, idempotency_key)
1288
+
1289
+ async def resume_subscription(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingSubscriptionResumeResponse:
1290
+ "Resume a canceled subscription before it ends, so it renews again."
1291
+ return await self._call("billing.subscription.resume", input, path, idempotency_key)
1292
+
1293
+ async def pay_overdue_invoice(self, input: BillingOverduePayInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingOverduePayResponse:
1294
+ "Pay an overdue invoice with a saved payment method."
1295
+ return await self._call("billing.overdue.pay", input, path, idempotency_key)
1296
+
1297
+ async def set_default_payment_method(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPaymentMethodsDefaultResponse:
1298
+ "Make a saved payment method the default. It then pays anything overdue."
1299
+ return await self._call("billing.payment_methods.default", input, path, idempotency_key)
1300
+
1301
+ async def move_backup_payment_method(self, input: BillingPaymentMethodsMoveInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPaymentMethodsMoveResponse:
1302
+ "Move a backup payment method up or down one place in the order."
1303
+ return await self._call("billing.payment_methods.move", input, path, idempotency_key)
1304
+
1305
+ async def remove_payment_method(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingPaymentMethodsRemoveResponse:
1306
+ "Remove a saved payment method. The default can't be removed."
1307
+ return await self._call("billing.payment_methods.remove", input, path, idempotency_key)
1308
+
1309
+ async def redeem_enterprise_plan_code(self, input: BillingCodesRedeemInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingCodesRedeemResponse:
1310
+ "Redeem an Enterprise plan code. It adds the plan to the workspace for good."
1311
+ return await self._call("billing.codes.redeem", input, path, idempotency_key)
1312
+
1313
+ async def create_billing_approval_link(self, input: BillingApprovalLinksCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingApprovalLinksCreateResponse:
1314
+ "Make a link for the owner to add a payment method, or to add one and pay for an upgrade, when the workspace has none saved."
1315
+ return await self._call("billing.approval_links.create", input, path, idempotency_key)
1316
+
1317
+ async def billing_approval_link(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> BillingApprovalLinksGetResponse:
1318
+ "Read whether the owner finished a billing approval link, declined it or let it expire."
1319
+ return await self._call("billing.approval_links.get", input, path, idempotency_key)
1320
+
1321
+ async def update_account_name(self, input: AccountUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccountUpdateResponse:
1322
+ "Change your name."
1323
+ return await self._call("account.update", input, path, idempotency_key)
1324
+
1325
+ async def email_preferences(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccountEmailPreferencesResponse:
1326
+ "Read which optional emails you get."
1327
+ return await self._call("account.email_preferences", input, path, idempotency_key)
1328
+
1329
+ async def update_email_preferences(self, input: AccountEmailPreferencesUpdateInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> AccountEmailPreferencesUpdateResponse:
1330
+ "Choose which optional emails you get. Sign-in, security and billing emails always go."
1331
+ return await self._call("account.email_preferences_update", input, path, idempotency_key)
1332
+
1333
+ async def notifications(self, input: NotificationsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> NotificationsListResponse:
1334
+ "List your notifications, and how many are unread."
1335
+ return await self._call("notifications.list", input, path, idempotency_key)
1336
+
1337
+ async def mark_notification(self, input: NotificationsUpdateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> NotificationsUpdateResponse:
1338
+ "Mark a notification as read or unread."
1339
+ return await self._call("notifications.update", input, path, idempotency_key)
1340
+
1341
+ async def mark_all_notifications_read(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> NotificationsReadAllResponse:
1342
+ "Mark all your notifications as read."
1343
+ return await self._call("notifications.read_all", input, path, idempotency_key)
1344
+
1345
+ async def run_notification_action(self, input: NotificationsRunActionInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> NotificationsRunActionResponse:
1346
+ "Run one of a notification's actions. It also needs the scope of the action it runs."
1347
+ return await self._call("notifications.run_action", input, path, idempotency_key)
1348
+
1349
+ async def contact_support(self, input: SupportTicketsCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> SupportTicketsCreateResponse:
1350
+ "Contact AbuseZero support about this workspace. Support replies to your account email."
1351
+ return await self._call("support-tickets.create", input, path, idempotency_key)
1352
+
1353
+ async def support_tickets(self, input: SupportTicketsListInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> SupportTicketsListResponse:
1354
+ "List the support tickets you sent about this workspace."
1355
+ return await self._call("support-tickets.list", input, path, idempotency_key)
1356
+
1357
+ async def send_feedback(self, input: FeedbackCreateInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> FeedbackCreateResponse:
1358
+ "Send product feedback to the AbuseZero team."
1359
+ return await self._call("feedback.create", input, path, idempotency_key)
1360
+ class AsyncAbuseZeroPublic(AsyncCore):
1361
+ _public = True
1362
+
1363
+ async def pricing(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicPricingResponse:
1364
+ "Read AbuseZero's plans and prices, what each plan includes and what every plan shares."
1365
+ return await self._call("public.pricing", input, path, idempotency_key)
1366
+
1367
+ async def price_quote(self, input: PublicPricingQuoteInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicPricingQuoteResponse:
1368
+ "Get the exact price of a plan for a month or a year, or of a credit pack."
1369
+ return await self._call("public.pricing_quote", input, path, idempotency_key)
1370
+
1371
+ async def docs(self, input: PublicDocsInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicDocsResponse:
1372
+ "List the developer docs pages, with each page's title, path and last update."
1373
+ return await self._call("public.docs", input, path, idempotency_key)
1374
+
1375
+ async def search_docs(self, input: PublicDocsSearchInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicDocsSearchResponse:
1376
+ "Search the developer docs."
1377
+ return await self._call("public.docs_search", input, path, idempotency_key)
1378
+
1379
+ async def public_docs_page(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicDocsPageResponse:
1380
+ "Read a developer docs page as Markdown."
1381
+ return await self._call("public.docs_page", input, path, idempotency_key)
1382
+
1383
+ async def help_articles(self, input: PublicHelpInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicHelpResponse:
1384
+ "List the help center's articles, with each article's title, path and last update."
1385
+ return await self._call("public.help", input, path, idempotency_key)
1386
+
1387
+ async def search_help(self, input: PublicHelpSearchInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicHelpSearchResponse:
1388
+ "Search the help center."
1389
+ return await self._call("public.help_search", input, path, idempotency_key)
1390
+
1391
+ async def public_help_article(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicHelpArticleResponse:
1392
+ "Read a help center article as Markdown."
1393
+ return await self._call("public.help_article", input, path, idempotency_key)
1394
+
1395
+ async def openapi(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicOpenapiResponse:
1396
+ "Read the OpenAPI document for the AbuseZero API."
1397
+ return await self._call("public.openapi", input, path, idempotency_key)
1398
+
1399
+ async def actions(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicActionsResponse:
1400
+ "List every API action with its MCP tool, CLI command and scope."
1401
+ return await self._call("public.actions", input, path, idempotency_key)
1402
+
1403
+ async def error_codes(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicErrorsResponse:
1404
+ "List the API's error codes: what each means, whether to retry and what to do next."
1405
+ return await self._call("public.errors", input, path, idempotency_key)
1406
+
1407
+ async def reason_codes(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicReasonsResponse:
1408
+ "List the reason codes evaluations return."
1409
+ return await self._call("public.reasons", input, path, idempotency_key)
1410
+
1411
+ async def webhook_event_types(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicWebhookEventsResponse:
1412
+ "List the webhook event types, each with an example payload."
1413
+ return await self._call("public.webhook_events", input, path, idempotency_key)
1414
+
1415
+ async def conditions(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicConditionsResponse:
1416
+ "List the conditions the rules in custom policies can use."
1417
+ return await self._call("public.conditions", input, path, idempotency_key)
1418
+
1419
+ async def glossary(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicGlossaryResponse:
1420
+ "Read the glossary and the developer FAQ."
1421
+ return await self._call("public.glossary", input, path, idempotency_key)
1422
+
1423
+ async def legal_documents(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicLegalResponse:
1424
+ "List AbuseZero's legal documents, with each one's version and effective date."
1425
+ return await self._call("public.legal", input, path, idempotency_key)
1426
+
1427
+ async def legal_document(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicLegalDocumentResponse:
1428
+ "Read a legal document as Markdown."
1429
+ return await self._call("public.legal_document", input, path, idempotency_key)
1430
+
1431
+ async def changelog(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicChangelogResponse:
1432
+ "Read the product changelog."
1433
+ return await self._call("public.changelog", input, path, idempotency_key)
1434
+
1435
+ async def blog_posts(self, input: PublicBlogInput | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicBlogResponse:
1436
+ "List blog posts."
1437
+ return await self._call("public.blog", input, path, idempotency_key)
1438
+
1439
+ async def blog_post(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicBlogPostResponse:
1440
+ "Read a blog post as Markdown."
1441
+ return await self._call("public.blog_post", input, path, idempotency_key)
1442
+
1443
+ async def versions(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicVersionsResponse:
1444
+ "Read the latest npm package version and the browser script address."
1445
+ return await self._call("public.versions", input, path, idempotency_key)
1446
+
1447
+ async def service_status(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicStatusResponse:
1448
+ "Read whether AbuseZero is operational or degraded."
1449
+ return await self._call("public.status", input, path, idempotency_key)
1450
+
1451
+ async def contacts(self, input: dict[str, Any] | None = None, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicContactsResponse:
1452
+ "Read how to reach AbuseZero's support, sales and security."
1453
+ return await self._call("public.contacts", input, path, idempotency_key)
1454
+
1455
+ async def contact_sales(self, input: PublicContactSalesInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicContactSalesResponse:
1456
+ "Send a message to AbuseZero's sales team about an Enterprise plan."
1457
+ return await self._call("public.contact_sales", input, path, idempotency_key)
1458
+
1459
+ async def contact_support(self, input: PublicContactSupportInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicContactSupportResponse:
1460
+ "Send a request to AbuseZero support without an account."
1461
+ return await self._call("public.contact_support", input, path, idempotency_key)
1462
+
1463
+ async def start_onboarding(self, input: PublicOnboardingStartInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicOnboardingStartResponse:
1464
+ "Start agent onboarding for a new workspace: returns the approval link for the person, and a secret only this agent keeps."
1465
+ return await self._call("public.onboarding_start", input, path, idempotency_key)
1466
+
1467
+ async def onboarding_status(self, input: PublicOnboardingStatusInput, *, path: dict[str, str | int] | None = None, idempotency_key: str | None = None) -> PublicOnboardingStatusResponse:
1468
+ "Read whether the person finished onboarding, optionally waiting up to 25 seconds, and how to collect the sign-in."
1469
+ return await self._call("public.onboarding_status", input, path, idempotency_key)