Skip to content

Commit a9968a7

Browse files
feat(api): api update
1 parent 372d1dd commit a9968a7

3 files changed

Lines changed: 20 additions & 25 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%2Fmoderation-api-b71e4bef3bf1d91ff75dc3414d212613e5be0efb29b773ff12363814491fc604.yml
3-
openapi_spec_hash: 261c3af6614314fbdd6ea3f7fb61979a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-00998c942fa9c81cb927833a3ebb681744bf59757610d9e6ce64ecf71ff2c13e.yml
3+
openapi_spec_hash: 73a0d08c06aa948c82999fe0bca9a5e9
44
config_hash: 80bc46a244d6ba9f10c013ab7e3fc555

‎src/moderation_api/resources/content.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ def submit(
8383
8484
meta_type: The meta type of content being moderated
8585
86-
policies: Optionally override the channel policies for this moderation request only
87-
(enterprise).
86+
policies: (Enterprise) override the channel policies for this moderation request only.
8887
8988
extra_headers: Send extra headers
9089
@@ -176,8 +175,7 @@ async def submit(
176175
177176
meta_type: The meta type of content being moderated
178177
179-
policies: Optionally override the channel policies for this moderation request only
180-
(enterprise).
178+
policies: (Enterprise) override the channel policies for this moderation request only.
181179
182180
extra_headers: Send extra headers
183181

‎src/moderation_api/types/content_submit_params.py‎

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
"ContentImage",
1515
"ContentVideo",
1616
"ContentAudio",
17-
"ContentContentNode",
18-
"ContentContentNodeData",
19-
"ContentContentNodeDataText",
20-
"ContentContentNodeDataImage",
21-
"ContentContentNodeDataVideo",
22-
"ContentContentNodeDataAudio",
17+
"ContentObject",
18+
"ContentObjectData",
19+
"ContentObjectDataText",
20+
"ContentObjectDataImage",
21+
"ContentObjectDataVideo",
22+
"ContentObjectDataAudio",
2323
"Policy",
2424
"PolicyToxicity",
2525
"PolicyPersonalInformation",
@@ -81,10 +81,7 @@ class ContentSubmitParams(TypedDict, total=False):
8181
"""The meta type of content being moderated"""
8282

8383
policies: Iterable[Policy]
84-
"""
85-
Optionally override the channel policies for this moderation request only
86-
(enterprise).
87-
"""
84+
"""(Enterprise) override the channel policies for this moderation request only."""
8885

8986

9087
class ContentText(TypedDict, total=False):
@@ -115,47 +112,47 @@ class ContentAudio(TypedDict, total=False):
115112
"""The URL of the audio content"""
116113

117114

118-
class ContentContentNodeDataText(TypedDict, total=False):
115+
class ContentObjectDataText(TypedDict, total=False):
119116
text: Required[str]
120117
"""The content text"""
121118

122119
type: Required[Literal["text"]]
123120

124121

125-
class ContentContentNodeDataImage(TypedDict, total=False):
122+
class ContentObjectDataImage(TypedDict, total=False):
126123
type: Required[Literal["image"]]
127124

128125
url: Required[str]
129126
"""A public URL of the image content"""
130127

131128

132-
class ContentContentNodeDataVideo(TypedDict, total=False):
129+
class ContentObjectDataVideo(TypedDict, total=False):
133130
type: Required[Literal["video"]]
134131

135132
url: Required[str]
136133
"""A public URL of the video content"""
137134

138135

139-
class ContentContentNodeDataAudio(TypedDict, total=False):
136+
class ContentObjectDataAudio(TypedDict, total=False):
140137
type: Required[Literal["audio"]]
141138

142139
url: Required[str]
143140
"""The URL of the audio content"""
144141

145142

146-
ContentContentNodeData: TypeAlias = Union[
147-
ContentContentNodeDataText, ContentContentNodeDataImage, ContentContentNodeDataVideo, ContentContentNodeDataAudio
143+
ContentObjectData: TypeAlias = Union[
144+
ContentObjectDataText, ContentObjectDataImage, ContentObjectDataVideo, ContentObjectDataAudio
148145
]
149146

150147

151-
class ContentContentNode(TypedDict, total=False):
152-
data: Required[Dict[str, ContentContentNodeData]]
148+
class ContentObject(TypedDict, total=False):
149+
data: Required[Dict[str, ContentObjectData]]
153150
"""Values in the object. Can be mixed content types."""
154151

155152
type: Required[Literal["object"]]
156153

157154

158-
Content: TypeAlias = Union[ContentText, ContentImage, ContentVideo, ContentAudio, ContentContentNode]
155+
Content: TypeAlias = Union[ContentText, ContentImage, ContentVideo, ContentAudio, ContentObject]
159156

160157

161158
class PolicyToxicity(TypedDict, total=False):

0 commit comments

Comments
 (0)