Skip to content

feat:Add DELETE workspace member endpoint and update schemas in OpenAPI spec#80

Merged
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202504211519
Apr 21, 2025
Merged

feat:Add DELETE workspace member endpoint and update schemas in OpenAPI spec#80
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202504211519

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Apr 21, 2025

Summary by CodeRabbit

  • New Features

    • Added ability for workspace administrators to remove members by email.
    • Introduced new LLM model variants: gpt-4.1, gpt-4.1-mini, and gpt-4.1-nano.
  • Improvements

    • Enhanced export options with new settings to include speakers and timestamps.
    • Increased allowed length for conversation goal prompts.
    • Updated status tracking for rendering processes and speaker separation requests.
  • Other Changes

    • Improved descriptions and naming consistency for various settings and options.

@coderabbitai
Copy link

coderabbitai bot commented Apr 21, 2025

Walkthrough

The OpenAPI specification for the ElevenLabs API was updated to introduce a new DELETE endpoint for removing workspace members, along with associated request and response schemas. Modifications include updating the response model for a speaker separation endpoint, expanding the LLM enum with new model variants, increasing the prompt length limit in prompt evaluation criteria, renaming an enum value, and adding a status property to the Render schema. Export option schemas were extended with new boolean properties, and several descriptions were clarified or updated throughout the specification.

Changes

File(s) Change Summary
src/libs/ElevenLabs/openapi.yaml - Added DELETE /v1/workspace/members endpoint with new request and response schemas.
- Changed response model for speaker separation endpoint.
- Added new LLM enum values: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano.
- Increased conversation_goal_prompt maxLength.
- Renamed internal_vad_score to vad_score in ClientEvent enum.
- Added required status property to Render schema.
- Added include_speakers and include_timestamps to export option schemas.
- Updated descriptions for cloud_storage_url and turn_timeout properties.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API
    participant Workspace

    Client->>API: DELETE /v1/workspace/members (email)
    API->>Workspace: Remove member by email
    Workspace-->>API: Success/Failure
    API-->>Client: DeleteWorkspaceMemberResponseModel (status)
Loading
sequenceDiagram
    participant Client
    participant API
    participant VoiceService

    Client->>API: POST /v1/voices/pvc/{voice_id}/samples/{sample_id}/separate-speakers
    API->>VoiceService: Start speaker separation
    VoiceService-->>API: Status
    API-->>Client: StartSpeakerSeparationResponseModel (status)
Loading

Possibly related PRs

Poem

A rabbit hopped through OpenAPI fields,
New endpoints sprouted, and schemas revealed.
Members can vanish with a single request,
While speaker separation puts models to the test.
Export options grew with toggles anew,
And enum names got a gentle review.
In the warren of specs, things are tidy and bright—
🐇✨ All ready for code to take flight!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@HavenDV HavenDV merged commit 14dd074 into main Apr 21, 2025
3 of 4 checks passed
@HavenDV HavenDV deleted the bot/update-openapi_202504211519 branch April 21, 2025 15:20
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Add DELETE workspace member endpoint and update schemas in OpenAPI spec Apr 21, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (7)
src/libs/ElevenLabs/openapi.yaml (7)

9926-9935: Add format: email and example to DELETE request body schema
The Body_Delete_member_v1_workspace_members_delete schema can be improved by validating the email format and providing an example:

     properties:
       email:
         title: Email
         type: string
+        format: email
+        example: [email protected]

10641-10643: Update example to illustrate Cloudflare R2 URL
The description now mentions Cloudflare R2, but the example still uses Google Cloud Storage. Consider adding or replacing with a Cloudflare R2–style URL (e.g., https://<account>.r2.cloudflarestorage.com/bucket/audio.mp3).


12803-12814: Consider constraining status values in response model
The DeleteWorkspaceMemberResponseModel’s status field allows any string. If the only valid success indicator is "ok", you could enforce this:

      properties:
        status:
          title: Status
          type: string
          enum:
            - ok

This helps client validation and codegen.


16819-16825: Add a description to the new status property
The status field in the Render schema currently lacks a description. Consider adding one:

        status:
          title: Status
          type: string
          enum:
            - complete
            - processing
            - failed
          description: The current state of the render job

17174-17182: Extract shared export options into a base schema
Since include_speakers and include_timestamps are added to multiple export option schemas, you can DRY this up by creating a shared ExportOptionsBase and using allOf in each format schema:

components:
  schemas:
    ExportOptionsBase:
      type: object
      properties:
        include_speakers:
          type: boolean
          default: true
        include_timestamps:
          type: boolean
          default: true

    DocxExportOptions:
      allOf:
        - $ref: '#/components/schemas/ExportOptionsBase'
        - type: object
          properties:
            format:
              enum: [docx]

17683-17686: Fix typo in response schema description
The word “seperation” is misspelled. Please correct it to “separation”:

- description: 'The status of the start speaker seperation request...'
+ description: 'The status of the start speaker separation request...'

18232-18232: Add trailing period to description
For consistency with other descriptions, consider adding a period at the end:

- description: Maximum wait time for the user's reply before re-engaging the user
+ description: Maximum wait time for the user's reply before re-engaging the user.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8162dc1 and 1e3f3fd.

⛔ Files ignored due to path filters (23)
  • src/libs/ElevenLabs/Generated/ElevenLabs.IPvcVoicesClient.CreateVoicesPvcByVoiceIdSamplesBySampleIdSeparateSpeakers.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.ISpeechToTextClient.CreateSpeechToText.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.IWorkspaceClient.DeleteWorkspaceMembers.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodyDeleteMemberV1WorkspaceMembersDelete.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodyDeleteMemberV1WorkspaceMembersDelete.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodySpeechToTextV1SpeechToTextPost.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ClientEvent.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.DeleteWorkspaceMemberResponseModel.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.DeleteWorkspaceMemberResponseModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.LLM.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.Render.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.RenderStatus.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.SegmentedJsonExportOptions.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.StartSpeakerSeparationResponseModel.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.StartSpeakerSeparationResponseModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.TurnConfig.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.PvcVoicesClient.CreateVoicesPvcByVoiceIdSamplesBySampleIdSeparateSpeakers.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.SpeechToTextClient.CreateSpeechToText.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.WorkspaceClient.DeleteWorkspaceMembers.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.RenderStatus.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.RenderStatusNullable.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonSerializerContext.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonSerializerContextTypes.g.cs is excluded by !**/generated/**
📒 Files selected for processing (1)
  • src/libs/ElevenLabs/openapi.yaml (13 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test / Build, test and publish
🔇 Additional comments (4)
src/libs/ElevenLabs/openapi.yaml (4)

7787-7787: Ensure old response model is retired or referenced
You’ve updated the response for the speaker‑separation endpoint to StartSpeakerSeparationResponseModel. Confirm whether the original SpeakerSeparationResponseModel schema should be removed or marked deprecated to avoid dead references in the spec.


11722-11722: Verify backward compatibility for renamed enum value
You renamed internal_vad_score to vad_score in the ClientEvent enum. Ensure client SDKs or integrations are updated accordingly. If this is a breaking change, consider marking internal_vad_score as deprecated instead of removing it outright.


14749-14751: Validate enum value formatting for new LLM variants
The new enum values (gpt-4.1, gpt-4.1-mini, gpt-4.1-nano) include dots. Some code generators may not handle dotted enum names correctly. Confirm your OpenAPI toolchain supports these or wrap them in quotes in the generated code.


16452-16452: Verify backend support for increased prompt length
You increased conversation_goal_prompt.maxLength to 2000. Ensure the server implementation, validation logic, and any downstream systems can handle prompts of this size.

Comment on lines +16802 to 16803
- status
type: object
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Update examples to include new status field in Render schema
You added status as a required property. Please update all response examples and endpoint documentation that return Render objects to include the new status field.

Comment on lines +5433 to +5457
delete:
tags:
- workspace
summary: Delete Member
description: Deletes a workspace member. This endpoint may only be called by workspace administrators.
operationId: Delete_member_v1_workspace_members_delete
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Body_Delete_member_v1_workspace_members_delete'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteWorkspaceMemberResponseModel'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add security requirement and standard error responses to DELETE endpoint
The new delete operation for /v1/workspace/members is missing a security section and common error responses. To align with the rest of the spec, please add:

  • A security block (e.g., Bearer auth) so only authenticated workspace admins can call it
  • 401 Unauthorized, 403 Forbidden and 404 Not Found responses
    Example diff:
     delete:
+    security:
+      - bearerAuth: []
     tags:
       - workspace
     summary: Delete Member
     ...
     responses:
+      '401':
+        $ref: '#/components/responses/UnauthorizedError'
+      '403':
+        description: Forbidden – admin privileges required
+      '404':
+        description: Workspace member not found
       '200':
         description: Successful Response
         content:
           application/json:
             schema:
               $ref: '#/components/schemas/DeleteWorkspaceMemberResponseModel'
       '422':
         description: Validation Error
         content:
           application/json:
             schema:
               $ref: '#/components/schemas/HTTPValidationError'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
delete:
tags:
- workspace
summary: Delete Member
description: Deletes a workspace member. This endpoint may only be called by workspace administrators.
operationId: Delete_member_v1_workspace_members_delete
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Body_Delete_member_v1_workspace_members_delete'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteWorkspaceMemberResponseModel'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
security:
- bearerAuth: []
tags:
- workspace
summary: Delete Member
description: Deletes a workspace member. This endpoint may only be called by workspace administrators.
operationId: Delete_member_v1_workspace_members_delete
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Body_Delete_member_v1_workspace_members_delete'
required: true
responses:
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
description: Forbidden – admin privileges required
'404':
description: Workspace member not found
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteWorkspaceMemberResponseModel'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant