Skip to content

Commit d58e587

Browse files
feat(api): api update
1 parent 0eaf195 commit d58e587

3 files changed

Lines changed: 31 additions & 2 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 27
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-c3aa8563e03f0cddc62cbbc8ad42dcbd6f35b4652fd2dd09e0eb4d6a41364872.yml
3-
openapi_spec_hash: 4647c8878266624f4af6605277061a59
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-c6993914ad5f9cb983c4b4eb18276af82b53ef3b56fbb7aec82fad2e2a39049a.yml
3+
openapi_spec_hash: b528665c10bbfa79a5de41c338423fdd
44
config_hash: 9d144cc6c49d3fd53e5b4472c1e22165

‎src/moderation_api/types/content_submit_params.py‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
"PolicyPolitical",
4949
"PolicyReligion",
5050
"PolicyCodeAbuse",
51+
"PolicyUnicodeSpoofing",
52+
"PolicyUnicodeSpoofingSignals",
5153
"PolicyPiiMasking",
5254
"PolicyPiiMaskingEntities",
5355
"PolicyURLMasking",
@@ -450,6 +452,25 @@ class PolicyCodeAbuse(TypedDict, total=False):
450452
threshold: float
451453

452454

455+
class PolicyUnicodeSpoofingSignals(TypedDict, total=False):
456+
flag: bool
457+
458+
459+
class PolicyUnicodeSpoofing(TypedDict, total=False):
460+
id: Required[Literal["unicode_spoofing"]]
461+
462+
flag: Required[bool]
463+
464+
signals: Dict[str, PolicyUnicodeSpoofingSignals]
465+
"""Per-signal flag toggles.
466+
467+
Omitted signals are enabled. A signal set to { flag: false } is still detected
468+
and reported as a label, but does not by itself flag the policy.
469+
"""
470+
471+
threshold: float
472+
473+
453474
class PolicyPiiMaskingEntities( # type: ignore[call-arg]
454475
TypedDict,
455476
total=False,
@@ -555,6 +576,7 @@ class PolicyGuideline(TypedDict, total=False):
555576
PolicyPolitical,
556577
PolicyReligion,
557578
PolicyCodeAbuse,
579+
PolicyUnicodeSpoofing,
558580
PolicyPiiMasking,
559581
PolicyURLMasking,
560582
PolicyURLRisk,

‎src/moderation_api/types/content_submit_response.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ class Content(BaseModel):
151151
on the channel.
152152
"""
153153

154+
unicode_cleaned: Optional[bool] = None
155+
"""
156+
Whether Unicode spoofing normalization rewrote the content — confusables folded
157+
to their Latin lookalikes, invisible characters and combining-mark abuse
158+
stripped.
159+
"""
160+
154161

155162
class Evaluation(BaseModel):
156163
"""The evaluation of the content after running the channel policies."""

0 commit comments

Comments
 (0)