Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: CI
on:
push:
branches-ignore:
- 'generated'
- 'codegen/**'
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
branches:
- '**'
- '!integrated/**'
- '!stl-preview-head/**'
- '!stl-preview-base/**'
- '!generated'
- '!codegen/**'
- 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.10.0"
".": "0.11.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 27
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-ad93e48ef2ee1066fe81553c7ac1f3be24037c6e1976778acb8b13baedbe5821.yml
openapi_spec_hash: 06e01ccb380f068bff3a571b58089a94
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-a4934bf1e7f1348c021b48224f7a7110a6e41838253dda4fbcc720dd2d2ed6b7.yml
openapi_spec_hash: 537542216811907b1d4ebf23a54dc669
config_hash: 6b825a08e19dfb747c5dc1766502b789
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.11.0 (2026-03-31)

Full Changelog: [v0.10.0...v0.11.0](https://github.com/moderation-api/sdk-php/compare/v0.10.0...v0.11.0)

### Features

* **api:** api update ([061ff7c](https://github.com/moderation-api/sdk-php/commit/061ff7cb37ad9c1d08da38540773c9b706c79c79))


### Chores

* **internal:** tweak CI branches ([5926e74](https://github.com/moderation-api/sdk-php/commit/5926e744944c7ed424579cfa943c5a0a41930f06))

## 0.10.0 (2026-03-16)

Full Changelog: [v0.9.0...v0.10.0](https://github.com/moderation-api/sdk-php/compare/v0.9.0...v0.10.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The REST API documentation can be found on [docs.moderationapi.com](https://docs
<!-- x-release-please-start-version -->

```
composer require "moderation-api/sdk-php 0.10.0"
composer require "moderation-api/sdk-php 0.11.0"
```

<!-- x-release-please-end -->
Expand Down
28 changes: 26 additions & 2 deletions src/Content/ContentSubmitResponse/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace ModerationAPI\Content\ContentSubmitResponse;

use ModerationAPI\Content\ContentSubmitResponse\Content\Modified;
use ModerationAPI\Core\Attributes\Optional;
use ModerationAPI\Core\Attributes\Required;
use ModerationAPI\Core\Concerns\SdkModel;
use ModerationAPI\Core\Contracts\BaseModel;
Expand All @@ -16,7 +17,10 @@
* @phpstan-import-type ModifiedShape from \ModerationAPI\Content\ContentSubmitResponse\Content\Modified
*
* @phpstan-type ContentShape = array{
* id: string, masked: bool, modified: ModifiedShape|null
* id: string,
* masked: bool,
* modified: ModifiedShape|null,
* transcript?: string|null,
* }
*/
final class Content implements BaseModel
Expand Down Expand Up @@ -44,6 +48,12 @@ final class Content implements BaseModel
#[Required(union: Modified::class)]
public string|array|null $modified;

/**
* The transcribed text from audio content. Only present when audio moderation is used and transcript inclusion is enabled on the channel.
*/
#[Optional(nullable: true)]
public ?string $transcript;

/**
* `new Content()` is missing required properties by the API.
*
Expand Down Expand Up @@ -73,14 +83,17 @@ public function __construct()
public static function with(
string $id,
bool $masked,
string|array|null $modified
string|array|null $modified,
?string $transcript = null,
): self {
$self = new self;

$self['id'] = $id;
$self['masked'] = $masked;
$self['modified'] = $modified;

null !== $transcript && $self['transcript'] = $transcript;

return $self;
}

Expand Down Expand Up @@ -118,4 +131,15 @@ public function withModified(string|array|null $modified): self

return $self;
}

/**
* The transcribed text from audio content. Only present when audio moderation is used and transcript inclusion is enabled on the channel.
*/
public function withTranscript(?string $transcript): self
{
$self = clone $this;
$self['transcript'] = $transcript;

return $self;
}
}
2 changes: 1 addition & 1 deletion src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
namespace ModerationAPI;

// x-release-please-start-version
const VERSION = '0.10.0';
const VERSION = '0.11.0';
// x-release-please-end