Skip to content

Commit f8741f1

Browse files
authored
Merge pull request #6 from moderation-api/speakeasy/regenerate
feat!: v0.3.0, breaking API changes
2 parents a3ecdd5 + 725ec66 commit f8741f1

71 files changed

Lines changed: 268 additions & 216 deletions

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: 69 additions & 69 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
@@ -33,7 +33,7 @@ generation:
3333
generateNewTests: true
3434
skipResponseBodyAssertions: false
3535
cli:
36-
version: 0.2.1
36+
version: 0.3.0
3737
additionalDependencies: {}
3838
agentEnvironmentDetection: true
3939
arrayFlagFormat: repeatable

‎.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+
## 0.3.0 (2026-10-22)
4+
5+
Full Changelog: [v0.2.1...v0.3.0](https://github.com/moderation-api/cli/compare/v0.2.1...v0.3.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
## 0.2.1 (2026-10-22)
452

553
Full Changelog: [v0.2.0...v0.2.1](https://github.com/moderation-api/cli/compare/v0.2.0...v0.2.1)

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ Configuration is stored in `~/.config/modapi/config.yaml`.
339339
Moderation API has two kinds of API keys:
340340

341341
- A **project key** works with one project: content, authors, review queues, actions, wordlists, webhooks and the account.
342-
- An **organization key** works with the [management API](https://docs.moderationapi.com/api-reference/management-api): `modapi projects` and `modapi channels`. The management API is available on Enterprise plans.
342+
- An **organization key** works with the [management API](https://docs.moderationapi.com/api-reference/management-api): `modapi projects` and `modapi channels`. It can also use any project's endpoints: name the project with `--project-id`.
343343

344-
Each key works only with its own commands. With the wrong key the API returns `403` with the code `project_key_required` or `organization_key_required`. To run a management command while `MODAPI_SECRET_KEY` holds your project key, pass the organization key for that command:
344+
A project key can't run the management commands: the API returns `403` with the code `organization_key_required`. To run a management command while `MODAPI_SECRET_KEY` holds your project key, pass the organization key for that command:
345345

346346
```bash
347347
modapi projects list --secret-key "$MODAPI_ORGANIZATION_KEY"

‎internal/cli/account/retrieve.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
)
1515

1616
var retrieveCmdMeta = []flagutil.FlagMeta{
17-
{FlagName: "project-id", Shorthand: "p", FieldPath: "ProjectID", Kind: flagutil.FlagKindString, Optional: true, Description: "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error."},
17+
{FlagName: "project-id", Shorthand: "p", FieldPath: "ProjectID", Kind: flagutil.FlagKindString, Optional: true, Description: "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error."},
1818
}
1919

2020
// initRetrieveCmd initializes the retrieve command.

‎internal/cli/actions/create.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
)
1515

1616
var createCmdMeta = []flagutil.FlagMeta{
17-
{FlagName: "project-id", FieldPath: "ProjectID", Kind: flagutil.FlagKindString, Optional: true, Description: "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error."},
17+
{FlagName: "project-id", FieldPath: "ProjectID", Kind: flagutil.FlagKindString, Optional: true, Description: "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error."},
1818
{FlagName: "key", Shorthand: "k", FieldPath: "Body.Key", Kind: flagutil.FlagKindJSON, Optional: true, Annotations: `json:"key,omitempty"`, Description: "User defined key of the action."},
1919
{FlagName: "name", Shorthand: "n", FieldPath: "Body.Name", Kind: flagutil.FlagKindString, Required: true, Description: "The name of the action. [required]"},
2020
{FlagName: "description", FieldPath: "Body.Description", Kind: flagutil.FlagKindJSON, Optional: true, Annotations: `json:"description,omitempty"`, Description: "The description of the action."},

‎internal/cli/actions/delete.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616

1717
var deleteCmdMeta = []flagutil.FlagMeta{
1818
{FlagName: "id", Shorthand: "i", FieldPath: "ID", Kind: flagutil.FlagKindString, Required: true, Description: "The ID of the action to delete. [required]"},
19-
{FlagName: "project-id", Shorthand: "p", FieldPath: "ProjectID", Kind: flagutil.FlagKindString, Optional: true, Description: "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error."},
19+
{FlagName: "project-id", Shorthand: "p", FieldPath: "ProjectID", Kind: flagutil.FlagKindString, Optional: true, Description: "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error."},
2020
}
2121

2222
// initDeleteCmd initializes the delete command.

‎internal/cli/actions/execute.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
)
1515

1616
var executeCmdMeta = []flagutil.FlagMeta{
17-
{FlagName: "project-id", Shorthand: "p", FieldPath: "ProjectID", Kind: flagutil.FlagKindString, Optional: true, Description: "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error."},
17+
{FlagName: "project-id", Shorthand: "p", FieldPath: "ProjectID", Kind: flagutil.FlagKindString, Optional: true, Description: "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error."},
1818
{FlagName: "action-key", FieldPath: "Body.ActionKey", Kind: flagutil.FlagKindString, Required: true, Description: "ID or key of the action to execute [required]"},
1919
{FlagName: "content-ids", Shorthand: "c", FieldPath: "Body.ContentIds", Kind: flagutil.FlagKindStringArray, Optional: true, Description: "IDs of the content items to apply the action to. Provide this or authorIds."},
2020
{FlagName: "author-ids", FieldPath: "Body.AuthorIds", Kind: flagutil.FlagKindStringArray, Optional: true, Description: "IDs of the authors to apply the action to. Provide this or contentIds."},

‎internal/cli/actions/list.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var listCmdMeta = []flagutil.FlagMeta{
1717
{FlagName: "queue-id", FieldPath: "QueueID", Kind: flagutil.FlagKindString, Optional: true, Description: "string value"},
1818
{FlagName: "page", FieldPath: "Page", Kind: flagutil.FlagKindInt64, Optional: true, HasDefault: true, DefaultInt: 1, HasMinimum: true, Minimum: 1, HasMaximum: true, Maximum: 100000, Description: "integer value"},
1919
{FlagName: "page-size", FieldPath: "PageSize", Kind: flagutil.FlagKindInt64, Optional: true, HasDefault: true, DefaultInt: 20, HasMinimum: true, Minimum: 1, HasMaximum: true, Maximum: 100, Description: "integer value"},
20-
{FlagName: "project-id", FieldPath: "ProjectID", Kind: flagutil.FlagKindString, Optional: true, Description: "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error."},
20+
{FlagName: "project-id", FieldPath: "ProjectID", Kind: flagutil.FlagKindString, Optional: true, Description: "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error."},
2121
}
2222

2323
// initListCmd initializes the list command.

0 commit comments

Comments
 (0)