Skip to content

Commit dc0caee

Browse files
chrisdengsogithub-actions[bot]
authored andcommitted
feat!: v4.0.0, breaking API changes
1 parent 31c1686 commit dc0caee

84 files changed

Lines changed: 507 additions & 453 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.speakeasy/gen.lock‎

Lines changed: 82 additions & 82 deletions
Large diffs are not rendered by default.

‎.speakeasy/gen.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ generation:
3232
generateNewTests: true
3333
skipResponseBodyAssertions: false
3434
ruby:
35-
version: 3.1.1
35+
version: 4.0.0
3636
additionalDependencies:
3737
development: {}
3838
runtime: {}

‎.speakeasy/openapi.json‎

Lines changed: 41 additions & 40 deletions
Large diffs are not rendered by default.

‎CHANGELOG.md‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
# Changelog
22

3+
## 4.0.0 (2026-10-22)
4+
5+
Full Changelog: [v3.1.1...v4.0.0](https://github.com/moderation-api/sdk-ruby/compare/v3.1.1...v4.0.0)
6+
7+
### ⚠ Breaking changes
8+
9+
- `GET /actions`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
10+
- `POST /actions`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
11+
- `POST /actions/execute`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
12+
- `POST /actions/{actionId}/execute`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
13+
- `DELETE /actions/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
14+
- `GET /actions/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
15+
- `PUT /actions/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
16+
- `GET /auth`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
17+
- `POST /auth`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
18+
- `GET /authors`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
19+
- `POST /authors`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
20+
- `DELETE /authors/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
21+
- `GET /authors/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
22+
- `PUT /authors/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
23+
- `DELETE /channels/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
24+
- `PUT /channels/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
25+
- `POST /channels/{id}/duplicate`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
26+
- `POST /moderate`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
27+
- `POST /moderate/image`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
28+
- `POST /moderate/text`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
29+
- `POST /projects`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
30+
- `PUT /projects/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
31+
- `POST /projects/{id}/duplicate`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
32+
- `POST /projects/{projectId}/channels`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
33+
- `GET /queue/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
34+
- `GET /queue/{id}/items`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
35+
- `POST /queue/{id}/items/{itemId}/resolve`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
36+
- `POST /queue/{id}/items/{itemId}/unresolve`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
37+
- `GET /queue/{id}/stats`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
38+
- `POST /webhooks`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
39+
- `PUT /webhooks/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
40+
- `GET /wordlist`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
41+
- `GET /wordlist/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
42+
- `PUT /wordlist/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
43+
- `GET /wordlist/{id}/embedding-status`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
44+
- `DELETE /wordlist/{id}/words`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
45+
- `POST /wordlist/{id}/words`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400`
46+
47+
### API changes
48+
49+
- a breaking change was detected but the version is still `1.1.0`
50+
351
## 3.1.1 (2026-10-22)
452

553
Full Changelog: [v3.1.0...v3.1.1](https://github.com/moderation-api/sdk-ruby/compare/v3.1.0...v3.1.1)

‎Gemfile.lock‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
moderation_api (3.1.1)
4+
moderation_api (4.0.0)
55
faraday
66
faraday-multipart
77
faraday-retry

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ end
215215
Moderation API has two kinds of API keys:
216216

217217
- A **project key** works with one project: content, authors, review queues, actions, wordlists, webhooks and the account. Most integrations need only this key.
218-
- An **organization key** works with the [management API](https://docs.moderationapi.com/api-reference/management-api): projects and channels. The management API is available on Enterprise plans.
218+
- An **organization key** works with the [management API](https://docs.moderationapi.com/api-reference/management-api): projects and channels. It can also use any project's endpoints: name the project with `projectId`.
219219

220-
Each key works only with its own endpoints. With the wrong key the API returns `403` with the code `project_key_required` or `organization_key_required`. If you use both, create one client for each key:
220+
A project key can't call the management API: the API returns `403` with the code `organization_key_required`. If you use both kinds of key, create one client for each:
221221

222222
```ruby
223223
require "moderation_api"

‎docs/models/components/badrequesterrorcode.md‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
Exactly what went wrong. Stable; safe to branch on. New codes may be added.
44

55
- `invalid_request`: A parameter is invalid. `message` says which one.
6-
- `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the organization has more than one project.
6+
- `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the key reaches more than one project. `message` lists the projects it reaches.
7+
- `project_name_ambiguous`: The name in `Project-Id` fits more than one project the key reaches. `message` lists them; name the project by ID instead.
78
- `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`.
89

910
## Example Usage
@@ -20,8 +21,9 @@ custom = BadRequestErrorCode.deserialize("custom_value")
2021

2122
## Values
2223

23-
| Name | Value |
24-
| --------------------- | --------------------- |
25-
| `INVALID_REQUEST` | invalid_request |
26-
| `PROJECT_ID_REQUIRED` | project_id_required |
27-
| `VALIDATION_FAILED` | validation_failed |
24+
| Name | Value |
25+
| ------------------------ | ------------------------ |
26+
| `INVALID_REQUEST` | invalid_request |
27+
| `PROJECT_ID_REQUIRED` | project_id_required |
28+
| `PROJECT_NAME_AMBIGUOUS` | project_name_ambiguous |
29+
| `VALIDATION_FAILED` | validation_failed |

0 commit comments

Comments
 (0)