Skip to content

feat:Update openapi.yaml: Add batch-calling endpoint and update schemas#71

Merged
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202504071238
Apr 7, 2025
Merged

feat:Update openapi.yaml: Add batch-calling endpoint and update schemas#71
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202504071238

Conversation

@HavenDV
Copy link
Copy Markdown
Contributor

@HavenDV HavenDV commented Apr 7, 2025

Summary by CodeRabbit

  • New Features
    • Introduced an API endpoint that enables users to submit batch call requests securely.
  • Refactor
    • Expanded audio format options to include additional supported formats.
    • Streamlined API request structures by removing outdated parameters and refining request bodies.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2025

Walkthrough

The changes modify the openapi.yaml file by expanding audio format options and updating several request/response schemas. A new endpoint (POST /v1/convai/batch-calling/submit) has been added with corresponding schemas for batch calling. Additionally, the changes remove the use_tool_ids parameter from multiple endpoints and add a file_format property to various request bodies, streamlining the API structure.

Changes

File Changes Summary
src/.../ElevenLabs/openapi.yaml - New Endpoint: Added POST /v1/convai/batch-calling/submit with new request/response schemas (BatchCallResponse, Body_Submit_a_batch_call_request__v1_convai_batch_calling_submit_post, OutboundCallRecipient).
- Audio Formats: Expanded options to include alaw_8000.
- Schema Updates: Added file_format property in multiple request bodies and removed use_tool_ids from various endpoints.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API
    Client->>API: POST /v1/convai/batch-calling/submit (API key + request body)
    API-->>Client: BatchCallResponse (batch_id, phone_number_id, agent_id, status, created_at_unix)
Loading

Possibly related PRs

Suggested reviewers

  • github-actions

Poem

In the code field where endpoints bloom,
I hop with joy amid the schema room.
New formats and calls, a delightful treat,
Each change a nibble, both crisp and neat.
Hop along, my friend—our API sings! 🐇


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 plan to trigger planning for file edits and PR creation.
  • @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 f5f2dce into main Apr 7, 2025
3 of 4 checks passed
@HavenDV HavenDV deleted the bot/update-openapi_202504071238 branch April 7, 2025 12:39
@coderabbitai coderabbitai Bot changed the title feat:@coderabbitai feat:Update openapi.yaml: Add batch-calling endpoint and update schemas Apr 7, 2025
Copy link
Copy Markdown

@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: 0

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

10848-10855: Default Empty String for id Property (Hunk 15).
A default empty string is now set for the id property. Please verify that an empty default is acceptable for your application logic and that downstream consumers handle it correctly.


10895-10904: Default Empty String for id Property (Hunk 16).
This hunk similarly introduces an empty string default for the id field. Confirm that this behavior is consistent with your schema design and does not lead to unintended consequences.


11025-11032: Addition of tier Property in Conversation Configurations (Hunk 17).
A new property tier is added, marked as nullable. It would be helpful to document what values are expected for this field and to consider adding an enum if there are specific tiers defined.


16831-16840: Default Empty String for id Property (Hunk 20).
Once again, a default empty string is set for the id property in this schema segment. Consistency is key; please ensure this default value is acceptable throughout your API.


18242-18251: Default Empty String for id Property in API Schema (Hunk 21).
The schema update includes a default empty string for id. Review whether this convention is consistently applied across all similar schemas and that it meets the consumers’ expectations.


18277-18286: Default Empty String for id Property in API Schema (Hunk 22).
This final hunk mirrors the previous default-setting changes for the id field. A brief validation to ensure these defaults do not interfere with entity uniqueness or processing logic is suggested.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9deca3f and 785ba7b.

⛔ Files ignored due to path filters (56)
  • src/libs/ElevenLabs/Generated/ElevenLabs.AudioIsolationClient.CreateAudioIsolation.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.AudioIsolationClient.CreateAudioIsolationStream.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.ConversationalAIClient.CreateConvaiAgentsCreate.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.ConversationalAIClient.CreateConvaiBatchCallingSubmit.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.ConversationalAIClient.EditConvaiAgentsByAgentId.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.IAudioIsolationClient.CreateAudioIsolation.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.IAudioIsolationClient.CreateAudioIsolationStream.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.IConversationalAIClient.CreateConvaiAgentsCreate.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.IConversationalAIClient.CreateConvaiBatchCallingSubmit.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.IConversationalAIClient.EditConvaiAgentsByAgentId.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.ISpeechToTextClient.CreateSpeechToText.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallResponse.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallResponse.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallStatisticsResponseModel.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallStatisticsResponseModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallStatusResponseModel.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallStatusResponseModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallStatusResponseModelStatus.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodyAudioIsolationStreamV1AudioIsolationStreamPost.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodyAudioIsolationStreamV1AudioIsolationStreamPostFileFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodyAudioIsolationV1AudioIsolationPost.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodyAudioIsolationV1AudioIsolationPostFileFormat.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.BodySpeechToTextV1SpeechToTextPostFileFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodySubmitABatchCallRequestV1ConvaiBatchCallingSubmitPost.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodySubmitABatchCallRequestV1ConvaiBatchCallingSubmitPost.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ClientToolConfigInput.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ClientToolConfigOutput.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationChargingCommonModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryMetadataCommonModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryRagUsageCommonModel.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryRagUsageCommonModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.GenerateAVoicePreviewFromDescriptionV1TextToVoiceCreatePreviewsPostOutputFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.OutboundCallRecipient.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.OutboundCallRecipient.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.SoundGenerationV1SoundGenerationPostOutputFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.SpeechToSpeechStreamingV1SpeechToSpeechVoiceIdStreamPostOutputFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.SpeechToSpeechV1SpeechToSpeechVoiceIdPostOutputFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.SystemToolConfig.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.TextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostOutputFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.TextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPostOutputFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.TextToSpeechV1TextToSpeechVoiceIdPostOutputFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.TextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostOutputFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.WebhookToolConfigInput.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.WebhookToolConfigOutput.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.SpeechToTextClient.CreateSpeechToText.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.BatchCallStatusResponseModelStatus.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.BatchCallStatusResponseModelStatusNullable.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.BodyAudioIsolationStreamV1AudioIsolationStreamPostFileFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.BodyAudioIsolationStreamV1AudioIsolationStreamPostFileFormatNullable.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.BodyAudioIsolationV1AudioIsolationPostFileFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.BodyAudioIsolationV1AudioIsolationPostFileFormatNullable.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.BodySpeechToTextV1SpeechToTextPostFileFormat.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.BodySpeechToTextV1SpeechToTextPostFileFormatNullable.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 (22 hunks)
🔇 Additional comments (16)
src/libs/ElevenLabs/openapi.yaml (16)

273-279: Addition of alaw_8000 audio format option (Hunk 1).
The new option alaw_8000 has been added to the list of supported audio formats. This change appears consistent with the updated API specifications.


537-543: Addition of alaw_8000 audio format option (Hunk 2).
Similar to Hunk 1, the inclusion of alaw_8000 here ensures expanded support for audio formats.


629-635: Addition of alaw_8000 audio format option (Hunk 3).
The update continues the pattern by adding the alaw_8000 option, improving format options available to clients.


720-726: Addition of alaw_8000 audio format option (Hunk 4).
The change correctly expands the list of PCM format options by including alaw_8000.


813-819: Addition of alaw_8000 audio format option (Hunk 5).
The new alaw_8000 entry is added consistently here as well; please ensure all related documentation is updated accordingly.


905-911: Addition of alaw_8000 audio format option (Hunk 6).
This update adds the alaw_8000 option to the supported formats – a straightforward and appropriate enhancement.


997-1003: Addition of alaw_8000 audio format option (Hunk 7).
Continuing the enhancements, the alaw_8000 format is added. The consistency across sections is commendable.


1114-1120: Addition of alaw_8000 audio format option (Hunk 8).
The inclusion of alaw_8000 here maintains uniform audio format options across the API.


7257-7297: New Endpoint: /v1/convai/batch-calling/submit (Hunk 9).
A new POST endpoint for batch call submissions has been introduced along with its full specification. Please verify that the operationId, header parameters (such as xi-api-key), request body schema reference, and response mappings (including BatchCallResponse) adhere to the API’s naming conventions and design guidelines.


8024-8081: New Batch Call Response Schemas (Hunk 10).
The new schemas BatchCallResponse, BatchCallStatisticsResponseModel, and BatchCallStatusResponseModel have been defined to support the batch call endpoint. They appear comprehensive; ensure that any further constraints (e.g., additional field validations) are documented elsewhere if needed.


8497-8509: Addition of file_format Property in Audio Isolation Schema (Hunk 11).
The schema now includes the file_format property with a clear title, enum, description, and example. The nullable flag indicates that this field is optional. Confirm with client requirements if ‘other’ cases should be treated differently.


8517-8529: Addition of file_format Property in Agent Creation Schema (Hunk 12).
A new file_format property is added similarly to Hunk 11. Consistency in description, enum options, and examples is maintained.


9767-9779: Addition of file_format Property in Dubbing Resource Schema (Hunk 13).
The schema now includes a file_format field with a default value of other. Ensure this default is intentional and well-communicated to API consumers.


9812-9841: New Schema: Batch Call Submission Request (Hunk 14).
The schema Body_Submit_a_batch_call_request__v1_convai_batch_calling_submit_post has been defined with required fields such as call_name, agent_id, agent_phone_number_id, and recipients. The inclusion of a maxItems constraint for the recipients array is a good measure.


11219-11243: Enhancements in Conversation History Schemas (Hunk 18).
The changes update conversation history models by adding the main_language property (nullable) and integrating the ConversationHistoryRagUsageCommonModel. These additions seem to improve the richness of history data. Please double-check that these optional fields are handled correctly by the API consumers.


14364-14378: New Schema: OutboundCallRecipient (Hunk 19).
The OutboundCallRecipient schema has been added with required phone_number and an optional reference to ConversationInitiationClientDataRequest-Input. Validate that the reference is correct and that the naming aligns with your overall schema conventions.

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