vapi_server_sdk 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +129 -62
- data/lib/vapi_server_sdk/assistants/client.rb +15 -2
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_credentials_item.rb +512 -0
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_model.rb +13 -0
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_transcriber.rb +13 -0
- data/lib/vapi_server_sdk/assistants/types/update_assistant_dto_voice.rb +13 -0
- data/lib/vapi_server_sdk/blocks/client.rb +7 -166
- data/lib/vapi_server_sdk/blocks/types/blocks_update_request.rb +109 -0
- data/lib/vapi_server_sdk/calls/client.rb +16 -4
- data/lib/vapi_server_sdk/knowledge_bases/client.rb +7 -8
- data/lib/vapi_server_sdk/knowledge_bases/types/knowledge_bases_update_request.rb +96 -0
- data/lib/vapi_server_sdk/logs/client.rb +84 -0
- data/lib/vapi_server_sdk/phone_numbers/client.rb +7 -69
- data/lib/vapi_server_sdk/phone_numbers/types/phone_numbers_update_request.rb +122 -0
- data/lib/vapi_server_sdk/squads/client.rb +8 -0
- data/lib/vapi_server_sdk/tools/client.rb +7 -91
- data/lib/vapi_server_sdk/tools/types/tools_update_request.rb +200 -0
- data/lib/vapi_server_sdk/types/assistant.rb +19 -1
- data/lib/vapi_server_sdk/types/assistant_credentials_item.rb +510 -0
- data/lib/vapi_server_sdk/types/assistant_model.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_overrides.rb +19 -1
- data/lib/vapi_server_sdk/types/assistant_overrides_credentials_item.rb +510 -0
- data/lib/vapi_server_sdk/types/assistant_overrides_model.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_overrides_transcriber.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_overrides_voice.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_transcriber.rb +13 -0
- data/lib/vapi_server_sdk/types/assistant_voice.rb +13 -0
- data/lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb +88 -0
- data/lib/vapi_server_sdk/types/azure_credential.rb +22 -5
- data/lib/vapi_server_sdk/types/azure_credential_region.rb +1 -1
- data/lib/vapi_server_sdk/types/azure_credential_service.rb +9 -0
- data/lib/vapi_server_sdk/types/azure_open_ai_credential.rb +9 -1
- data/lib/vapi_server_sdk/types/azure_open_ai_credential_region.rb +1 -1
- data/lib/vapi_server_sdk/types/azure_speech_transcriber.rb +62 -0
- data/lib/vapi_server_sdk/types/azure_speech_transcriber_language.rb +152 -0
- data/lib/vapi_server_sdk/types/buy_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/byo_phone_number.rb +25 -29
- data/lib/vapi_server_sdk/types/call_ended_reason.rb +44 -29
- data/lib/vapi_server_sdk/types/cartesia_voice_model.rb +2 -0
- data/lib/vapi_server_sdk/types/cerebras_credential.rb +111 -0
- data/lib/vapi_server_sdk/types/chat_dto.rb +103 -0
- data/lib/vapi_server_sdk/types/{credits_buy_dto.rb → chat_service_response.rb} +9 -17
- data/lib/vapi_server_sdk/types/cloudflare_credential.rb +142 -0
- data/lib/vapi_server_sdk/types/cloudflare_r_2_bucket_plan.rb +105 -0
- data/lib/vapi_server_sdk/types/create_anthropic_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_anyscale_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_assembly_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_assistant_dto.rb +19 -1
- data/lib/vapi_server_sdk/types/create_assistant_dto_credentials_item.rb +510 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto_model.rb +13 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto_transcriber.rb +13 -0
- data/lib/vapi_server_sdk/types/create_assistant_dto_voice.rb +13 -0
- data/lib/vapi_server_sdk/types/create_azure_credential_dto.rb +21 -12
- data/lib/vapi_server_sdk/types/create_azure_credential_dto_region.rb +1 -1
- data/lib/vapi_server_sdk/types/create_azure_credential_dto_service.rb +9 -0
- data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb +10 -9
- data/lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto_region.rb +1 -1
- data/lib/vapi_server_sdk/types/create_byo_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/create_byo_sip_trunk_credential_dto.rb +1 -9
- data/lib/vapi_server_sdk/types/create_cartesia_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_cerebras_credential_dto.rb +74 -0
- data/lib/vapi_server_sdk/types/create_cloudflare_credential_dto.rb +101 -0
- data/lib/vapi_server_sdk/types/create_custom_llm_credential_dto.rb +2 -14
- data/lib/vapi_server_sdk/types/create_deep_infra_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_deep_seek_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/create_deepgram_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_eleven_labs_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_gcp_credential_dto.rb +2 -14
- data/lib/vapi_server_sdk/types/create_gladia_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_go_high_level_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_groq_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb +2 -15
- data/lib/vapi_server_sdk/types/create_lmnt_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_make_credential_dto.rb +2 -15
- data/lib/vapi_server_sdk/types/create_open_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_open_router_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_org_dto.rb +25 -25
- data/lib/vapi_server_sdk/types/create_perplexity_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_play_ht_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_rime_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_runpod_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_s_3_credential_dto.rb +2 -10
- data/lib/vapi_server_sdk/types/create_smallest_ai_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/create_tavus_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_together_ai_credential_dto.rb +2 -9
- data/lib/vapi_server_sdk/types/create_twilio_credential_dto.rb +2 -14
- data/lib/vapi_server_sdk/types/create_twilio_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/create_vapi_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/create_vonage_credential_dto.rb +2 -14
- data/lib/vapi_server_sdk/types/create_vonage_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/create_webhook_credential_dto.rb +2 -13
- data/lib/vapi_server_sdk/types/create_x_ai_credential_dto.rb +2 -11
- data/lib/vapi_server_sdk/types/deep_seek_credential.rb +111 -0
- data/lib/vapi_server_sdk/types/deep_seek_model.rb +177 -0
- data/lib/vapi_server_sdk/types/deep_seek_model_tools_item.rb +159 -0
- data/lib/vapi_server_sdk/types/eleven_labs_voice_model.rb +2 -0
- data/lib/vapi_server_sdk/types/fallback_cartesia_voice_model.rb +2 -0
- data/lib/vapi_server_sdk/types/fallback_eleven_labs_voice_model.rb +2 -0
- data/lib/vapi_server_sdk/types/fallback_open_ai_voice.rb +4 -4
- data/lib/vapi_server_sdk/types/fallback_open_ai_voice_id.rb +2 -2
- data/lib/vapi_server_sdk/types/fallback_plan_voices_item.rb +13 -0
- data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice.rb +95 -0
- data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/fallback_smallest_ai_voice_id_enum.rb +31 -0
- data/lib/vapi_server_sdk/types/gemini_multimodal_live_prebuilt_voice_config.rb +58 -0
- data/lib/vapi_server_sdk/types/gemini_multimodal_live_prebuilt_voice_config_voice_name.rb +11 -0
- data/lib/vapi_server_sdk/types/gemini_multimodal_live_speech_config.rb +61 -0
- data/lib/vapi_server_sdk/types/gemini_multimodal_live_voice_config.rb +61 -0
- data/lib/vapi_server_sdk/types/google_model.rb +17 -1
- data/lib/vapi_server_sdk/types/google_model_model.rb +2 -0
- data/lib/vapi_server_sdk/types/google_realtime_config.rb +121 -0
- data/lib/vapi_server_sdk/types/groq_model_model.rb +1 -3
- data/lib/vapi_server_sdk/types/import_twilio_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/import_vonage_phone_number_dto.rb +25 -29
- data/lib/vapi_server_sdk/types/open_ai_model_fallback_models_item.rb +6 -0
- data/lib/vapi_server_sdk/types/open_ai_model_model.rb +6 -0
- data/lib/vapi_server_sdk/types/open_ai_voice.rb +4 -4
- data/lib/vapi_server_sdk/types/open_ai_voice_id.rb +2 -2
- data/lib/vapi_server_sdk/types/org.rb +25 -25
- data/lib/vapi_server_sdk/types/org_with_org_user.rb +25 -25
- data/lib/vapi_server_sdk/types/server_message_end_of_call_report_ended_reason.rb +44 -29
- data/lib/vapi_server_sdk/types/server_message_status_update.rb +11 -1
- data/lib/vapi_server_sdk/types/server_message_status_update_ended_reason.rb +44 -29
- data/lib/vapi_server_sdk/types/smallest_ai_credential.rb +111 -0
- data/lib/vapi_server_sdk/types/smallest_ai_voice.rb +117 -0
- data/lib/vapi_server_sdk/types/smallest_ai_voice_id.rb +53 -0
- data/lib/vapi_server_sdk/types/smallest_ai_voice_id_enum.rb +31 -0
- data/lib/vapi_server_sdk/types/subscription.rb +2 -2
- data/lib/vapi_server_sdk/types/sync_voice_library_dto_providers_item.rb +1 -0
- data/lib/vapi_server_sdk/types/transfer_plan.rb +26 -6
- data/lib/vapi_server_sdk/types/transfer_plan_message.rb +2 -1
- data/lib/vapi_server_sdk/types/twilio_phone_number.rb +25 -29
- data/lib/vapi_server_sdk/types/update_anthropic_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_anyscale_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_assembly_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_azure_credential_dto.rb +24 -14
- data/lib/vapi_server_sdk/types/update_azure_credential_dto_region.rb +1 -1
- data/lib/vapi_server_sdk/types/update_azure_credential_dto_service.rb +9 -0
- data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto.rb +25 -24
- data/lib/vapi_server_sdk/types/update_azure_open_ai_credential_dto_region.rb +1 -1
- data/lib/vapi_server_sdk/types/update_bash_tool_dto.rb +161 -0
- data/lib/vapi_server_sdk/types/update_bash_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_byo_phone_number_dto.rb +187 -0
- data/lib/vapi_server_sdk/types/update_byo_phone_number_dto_fallback_destination.rb +101 -0
- data/lib/vapi_server_sdk/types/update_byo_sip_trunk_credential_dto.rb +13 -21
- data/lib/vapi_server_sdk/types/update_cartesia_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_cerebras_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/update_cloudflare_credential_dto.rb +101 -0
- data/lib/vapi_server_sdk/types/update_computer_tool_dto.rb +185 -0
- data/lib/vapi_server_sdk/types/update_computer_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_conversation_block_dto.rb +206 -0
- data/lib/vapi_server_sdk/types/update_conversation_block_dto_messages_item.rb +95 -0
- data/lib/vapi_server_sdk/types/update_custom_knowledge_base_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_custom_llm_credential_dto.rb +4 -16
- data/lib/vapi_server_sdk/types/update_deep_infra_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_deep_seek_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/update_deepgram_credential_dto.rb +11 -18
- data/lib/vapi_server_sdk/types/update_dtmf_tool_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_dtmf_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_eleven_labs_credential_dto.rb +11 -11
- data/lib/vapi_server_sdk/types/update_end_call_tool_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_end_call_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_function_tool_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_function_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_gcp_credential_dto.rb +11 -23
- data/lib/vapi_server_sdk/types/update_ghl_tool_dto.rb +159 -0
- data/lib/vapi_server_sdk/types/update_ghl_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_gladia_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_go_high_level_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_google_credential_dto.rb +4 -13
- data/lib/vapi_server_sdk/types/update_groq_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_inflection_ai_credential_dto.rb +4 -13
- data/lib/vapi_server_sdk/types/update_langfuse_credential_dto.rb +8 -21
- data/lib/vapi_server_sdk/types/update_lmnt_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_make_credential_dto.rb +8 -21
- data/lib/vapi_server_sdk/types/update_make_tool_dto.rb +159 -0
- data/lib/vapi_server_sdk/types/update_make_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_open_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_open_router_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_org_dto.rb +25 -25
- data/lib/vapi_server_sdk/types/update_output_tool_dto.rb +139 -0
- data/lib/vapi_server_sdk/types/update_output_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_perplexity_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_play_ht_credential_dto.rb +11 -18
- data/lib/vapi_server_sdk/types/update_rime_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_runpod_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_s_3_credential_dto.rb +12 -20
- data/lib/vapi_server_sdk/types/update_smallest_ai_credential_dto.rb +67 -0
- data/lib/vapi_server_sdk/types/update_tavus_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_text_editor_tool_dto.rb +161 -0
- data/lib/vapi_server_sdk/types/update_text_editor_tool_dto_messages_item.rb +120 -0
- data/lib/vapi_server_sdk/types/update_together_ai_credential_dto.rb +4 -11
- data/lib/vapi_server_sdk/types/update_token_dto.rb +81 -0
- data/lib/vapi_server_sdk/types/update_token_dto_tag.rb +9 -0
- data/lib/vapi_server_sdk/types/update_tool_call_block_dto.rb +168 -0
- data/lib/vapi_server_sdk/types/update_tool_call_block_dto_messages_item.rb +94 -0
- data/lib/vapi_server_sdk/types/update_tool_call_block_dto_tool.rb +161 -0
- data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto.rb +161 -0
- data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto_destinations_item.rb +121 -0
- data/lib/vapi_server_sdk/types/update_transfer_call_tool_dto_messages_item.rb +121 -0
- data/lib/vapi_server_sdk/types/update_trieve_knowledge_base_dto.rb +109 -0
- data/lib/vapi_server_sdk/types/update_twilio_credential_dto.rb +11 -23
- data/lib/vapi_server_sdk/types/update_twilio_phone_number_dto.rb +163 -0
- data/lib/vapi_server_sdk/types/update_twilio_phone_number_dto_fallback_destination.rb +101 -0
- data/lib/vapi_server_sdk/types/update_vapi_phone_number_dto.rb +169 -0
- data/lib/vapi_server_sdk/types/update_vapi_phone_number_dto_fallback_destination.rb +101 -0
- data/lib/vapi_server_sdk/types/update_vonage_credential_dto.rb +11 -23
- data/lib/vapi_server_sdk/types/update_vonage_phone_number_dto.rb +157 -0
- data/lib/vapi_server_sdk/types/update_vonage_phone_number_dto_fallback_destination.rb +101 -0
- data/lib/vapi_server_sdk/types/update_workflow_block_dto.rb +154 -0
- data/lib/vapi_server_sdk/types/update_workflow_block_dto_messages_item.rb +94 -0
- data/lib/vapi_server_sdk/types/update_workflow_block_dto_steps_item.rb +94 -0
- data/lib/vapi_server_sdk/types/update_x_ai_credential_dto.rb +4 -13
- data/lib/vapi_server_sdk/types/vapi_phone_number.rb +25 -29
- data/lib/vapi_server_sdk/types/vonage_phone_number.rb +25 -29
- metadata +88 -21
- data/lib/vapi_server_sdk/blocks/types/update_block_dto_messages_item.rb +0 -96
- data/lib/vapi_server_sdk/blocks/types/update_block_dto_steps_item.rb +0 -96
- data/lib/vapi_server_sdk/blocks/types/update_block_dto_tool.rb +0 -163
- data/lib/vapi_server_sdk/phone_numbers/types/update_phone_number_dto_fallback_destination.rb +0 -103
- data/lib/vapi_server_sdk/tools/types/update_tool_dto_messages_item.rb +0 -122
- data/lib/vapi_server_sdk/types/auto_reload_plan_dto.rb +0 -65
- data/lib/vapi_server_sdk/types/hipaa_buy_dto.rb +0 -65
- data/lib/vapi_server_sdk/types/payment.rb +0 -167
- data/lib/vapi_server_sdk/types/payment_retry_dto.rb +0 -55
- data/lib/vapi_server_sdk/types/payment_status.rb +0 -11
- data/lib/vapi_server_sdk/types/payments_paginated_response.rb +0 -75
- data/lib/vapi_server_sdk/types/subscription_concurrency_line_buy_dto.rb +0 -55
- data/lib/vapi_server_sdk/types/subscription_concurrency_line_remove_dto.rb +0 -55
- data/lib/vapi_server_sdk/types/subscription_coupon_add_dto.rb +0 -67
- data/lib/vapi_server_sdk/types/subscription_monthly_charge.rb +0 -65
@@ -0,0 +1,111 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "date"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Vapi
|
8
|
+
class SmallestAiCredential
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :provider
|
11
|
+
# @return [String] This is not returned in the API.
|
12
|
+
attr_reader :api_key
|
13
|
+
# @return [String] This is the unique identifier for the credential.
|
14
|
+
attr_reader :id
|
15
|
+
# @return [String] This is the unique identifier for the org that this credential belongs to.
|
16
|
+
attr_reader :org_id
|
17
|
+
# @return [DateTime] This is the ISO 8601 date-time string of when the credential was created.
|
18
|
+
attr_reader :created_at
|
19
|
+
# @return [DateTime] This is the ISO 8601 date-time string of when the assistant was last updated.
|
20
|
+
attr_reader :updated_at
|
21
|
+
# @return [String] This is the name of credential. This is just for your reference.
|
22
|
+
attr_reader :name
|
23
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
+
attr_reader :additional_properties
|
25
|
+
# @return [Object]
|
26
|
+
attr_reader :_field_set
|
27
|
+
protected :_field_set
|
28
|
+
|
29
|
+
OMIT = Object.new
|
30
|
+
|
31
|
+
# @param provider [String]
|
32
|
+
# @param api_key [String] This is not returned in the API.
|
33
|
+
# @param id [String] This is the unique identifier for the credential.
|
34
|
+
# @param org_id [String] This is the unique identifier for the org that this credential belongs to.
|
35
|
+
# @param created_at [DateTime] This is the ISO 8601 date-time string of when the credential was created.
|
36
|
+
# @param updated_at [DateTime] This is the ISO 8601 date-time string of when the assistant was last updated.
|
37
|
+
# @param name [String] This is the name of credential. This is just for your reference.
|
38
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
39
|
+
# @return [Vapi::SmallestAiCredential]
|
40
|
+
def initialize(provider:, api_key:, id:, org_id:, created_at:, updated_at:, name: OMIT, additional_properties: nil)
|
41
|
+
@provider = provider
|
42
|
+
@api_key = api_key
|
43
|
+
@id = id
|
44
|
+
@org_id = org_id
|
45
|
+
@created_at = created_at
|
46
|
+
@updated_at = updated_at
|
47
|
+
@name = name if name != OMIT
|
48
|
+
@additional_properties = additional_properties
|
49
|
+
@_field_set = {
|
50
|
+
"provider": provider,
|
51
|
+
"apiKey": api_key,
|
52
|
+
"id": id,
|
53
|
+
"orgId": org_id,
|
54
|
+
"createdAt": created_at,
|
55
|
+
"updatedAt": updated_at,
|
56
|
+
"name": name
|
57
|
+
}.reject do |_k, v|
|
58
|
+
v == OMIT
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Deserialize a JSON object to an instance of SmallestAiCredential
|
63
|
+
#
|
64
|
+
# @param json_object [String]
|
65
|
+
# @return [Vapi::SmallestAiCredential]
|
66
|
+
def self.from_json(json_object:)
|
67
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
68
|
+
parsed_json = JSON.parse(json_object)
|
69
|
+
provider = parsed_json["provider"]
|
70
|
+
api_key = parsed_json["apiKey"]
|
71
|
+
id = parsed_json["id"]
|
72
|
+
org_id = parsed_json["orgId"]
|
73
|
+
created_at = (DateTime.parse(parsed_json["createdAt"]) unless parsed_json["createdAt"].nil?)
|
74
|
+
updated_at = (DateTime.parse(parsed_json["updatedAt"]) unless parsed_json["updatedAt"].nil?)
|
75
|
+
name = parsed_json["name"]
|
76
|
+
new(
|
77
|
+
provider: provider,
|
78
|
+
api_key: api_key,
|
79
|
+
id: id,
|
80
|
+
org_id: org_id,
|
81
|
+
created_at: created_at,
|
82
|
+
updated_at: updated_at,
|
83
|
+
name: name,
|
84
|
+
additional_properties: struct
|
85
|
+
)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Serialize an instance of SmallestAiCredential to a JSON object
|
89
|
+
#
|
90
|
+
# @return [String]
|
91
|
+
def to_json(*_args)
|
92
|
+
@_field_set&.to_json
|
93
|
+
end
|
94
|
+
|
95
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
96
|
+
# hash and check each fields type against the current object's property
|
97
|
+
# definitions.
|
98
|
+
#
|
99
|
+
# @param obj [Object]
|
100
|
+
# @return [Void]
|
101
|
+
def self.validate_raw(obj:)
|
102
|
+
obj.provider.is_a?(String) != false || raise("Passed value for field obj.provider is not the expected type, validation failed.")
|
103
|
+
obj.api_key.is_a?(String) != false || raise("Passed value for field obj.api_key is not the expected type, validation failed.")
|
104
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
105
|
+
obj.org_id.is_a?(String) != false || raise("Passed value for field obj.org_id is not the expected type, validation failed.")
|
106
|
+
obj.created_at.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
|
107
|
+
obj.updated_at.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at is not the expected type, validation failed.")
|
108
|
+
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
@@ -0,0 +1,117 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "smallest_ai_voice_id"
|
4
|
+
require_relative "chunk_plan"
|
5
|
+
require_relative "fallback_plan"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module Vapi
|
10
|
+
class SmallestAiVoice
|
11
|
+
# @return [Vapi::SmallestAiVoiceId] This is the provider-specific ID that will be used.
|
12
|
+
attr_reader :voice_id
|
13
|
+
# @return [String] Smallest AI voice model to use. Defaults to 'lightning' when not specified.
|
14
|
+
attr_reader :model
|
15
|
+
# @return [Float] This is the speed multiplier that will be used.
|
16
|
+
attr_reader :speed
|
17
|
+
# @return [Vapi::ChunkPlan] This is the plan for chunking the model output before it is sent to the voice
|
18
|
+
# provider.
|
19
|
+
attr_reader :chunk_plan
|
20
|
+
# @return [Vapi::FallbackPlan] This is the plan for voice provider fallbacks in the event that the primary
|
21
|
+
# voice provider fails.
|
22
|
+
attr_reader :fallback_plan
|
23
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
+
attr_reader :additional_properties
|
25
|
+
# @return [Object]
|
26
|
+
attr_reader :_field_set
|
27
|
+
protected :_field_set
|
28
|
+
|
29
|
+
OMIT = Object.new
|
30
|
+
|
31
|
+
# @param voice_id [Vapi::SmallestAiVoiceId] This is the provider-specific ID that will be used.
|
32
|
+
# @param model [String] Smallest AI voice model to use. Defaults to 'lightning' when not specified.
|
33
|
+
# @param speed [Float] This is the speed multiplier that will be used.
|
34
|
+
# @param chunk_plan [Vapi::ChunkPlan] This is the plan for chunking the model output before it is sent to the voice
|
35
|
+
# provider.
|
36
|
+
# @param fallback_plan [Vapi::FallbackPlan] This is the plan for voice provider fallbacks in the event that the primary
|
37
|
+
# voice provider fails.
|
38
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
39
|
+
# @return [Vapi::SmallestAiVoice]
|
40
|
+
def initialize(voice_id:, model: OMIT, speed: OMIT, chunk_plan: OMIT, fallback_plan: OMIT,
|
41
|
+
additional_properties: nil)
|
42
|
+
@voice_id = voice_id
|
43
|
+
@model = model if model != OMIT
|
44
|
+
@speed = speed if speed != OMIT
|
45
|
+
@chunk_plan = chunk_plan if chunk_plan != OMIT
|
46
|
+
@fallback_plan = fallback_plan if fallback_plan != OMIT
|
47
|
+
@additional_properties = additional_properties
|
48
|
+
@_field_set = {
|
49
|
+
"voiceId": voice_id,
|
50
|
+
"model": model,
|
51
|
+
"speed": speed,
|
52
|
+
"chunkPlan": chunk_plan,
|
53
|
+
"fallbackPlan": fallback_plan
|
54
|
+
}.reject do |_k, v|
|
55
|
+
v == OMIT
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# Deserialize a JSON object to an instance of SmallestAiVoice
|
60
|
+
#
|
61
|
+
# @param json_object [String]
|
62
|
+
# @return [Vapi::SmallestAiVoice]
|
63
|
+
def self.from_json(json_object:)
|
64
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
65
|
+
parsed_json = JSON.parse(json_object)
|
66
|
+
if parsed_json["voiceId"].nil?
|
67
|
+
voice_id = nil
|
68
|
+
else
|
69
|
+
voice_id = parsed_json["voiceId"].to_json
|
70
|
+
voice_id = Vapi::SmallestAiVoiceId.from_json(json_object: voice_id)
|
71
|
+
end
|
72
|
+
model = parsed_json["model"]
|
73
|
+
speed = parsed_json["speed"]
|
74
|
+
if parsed_json["chunkPlan"].nil?
|
75
|
+
chunk_plan = nil
|
76
|
+
else
|
77
|
+
chunk_plan = parsed_json["chunkPlan"].to_json
|
78
|
+
chunk_plan = Vapi::ChunkPlan.from_json(json_object: chunk_plan)
|
79
|
+
end
|
80
|
+
if parsed_json["fallbackPlan"].nil?
|
81
|
+
fallback_plan = nil
|
82
|
+
else
|
83
|
+
fallback_plan = parsed_json["fallbackPlan"].to_json
|
84
|
+
fallback_plan = Vapi::FallbackPlan.from_json(json_object: fallback_plan)
|
85
|
+
end
|
86
|
+
new(
|
87
|
+
voice_id: voice_id,
|
88
|
+
model: model,
|
89
|
+
speed: speed,
|
90
|
+
chunk_plan: chunk_plan,
|
91
|
+
fallback_plan: fallback_plan,
|
92
|
+
additional_properties: struct
|
93
|
+
)
|
94
|
+
end
|
95
|
+
|
96
|
+
# Serialize an instance of SmallestAiVoice to a JSON object
|
97
|
+
#
|
98
|
+
# @return [String]
|
99
|
+
def to_json(*_args)
|
100
|
+
@_field_set&.to_json
|
101
|
+
end
|
102
|
+
|
103
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
104
|
+
# hash and check each fields type against the current object's property
|
105
|
+
# definitions.
|
106
|
+
#
|
107
|
+
# @param obj [Object]
|
108
|
+
# @return [Void]
|
109
|
+
def self.validate_raw(obj:)
|
110
|
+
Vapi::SmallestAiVoiceId.validate_raw(obj: obj.voice_id)
|
111
|
+
obj.model&.is_a?(String) != false || raise("Passed value for field obj.model is not the expected type, validation failed.")
|
112
|
+
obj.speed&.is_a?(Float) != false || raise("Passed value for field obj.speed is not the expected type, validation failed.")
|
113
|
+
obj.chunk_plan.nil? || Vapi::ChunkPlan.validate_raw(obj: obj.chunk_plan)
|
114
|
+
obj.fallback_plan.nil? || Vapi::FallbackPlan.validate_raw(obj: obj.fallback_plan)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Vapi
|
6
|
+
# This is the provider-specific ID that will be used.
|
7
|
+
class SmallestAiVoiceId
|
8
|
+
# Deserialize a JSON object to an instance of SmallestAiVoiceId
|
9
|
+
#
|
10
|
+
# @param json_object [String]
|
11
|
+
# @return [Vapi::SmallestAiVoiceId]
|
12
|
+
def self.from_json(json_object:)
|
13
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
14
|
+
begin
|
15
|
+
struct.is_a?(Vapi::SmallestAiVoiceIdEnum) != false || raise("Passed value for field struct is not the expected type, validation failed.")
|
16
|
+
return struct unless struct.nil?
|
17
|
+
|
18
|
+
return nil
|
19
|
+
rescue StandardError
|
20
|
+
# noop
|
21
|
+
end
|
22
|
+
begin
|
23
|
+
struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
|
24
|
+
return struct unless struct.nil?
|
25
|
+
|
26
|
+
return nil
|
27
|
+
rescue StandardError
|
28
|
+
# noop
|
29
|
+
end
|
30
|
+
struct
|
31
|
+
end
|
32
|
+
|
33
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
34
|
+
# hash and check each fields type against the current object's property
|
35
|
+
# definitions.
|
36
|
+
#
|
37
|
+
# @param obj [Object]
|
38
|
+
# @return [Void]
|
39
|
+
def self.validate_raw(obj:)
|
40
|
+
begin
|
41
|
+
return obj.is_a?(Vapi::SmallestAiVoiceIdEnum) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
42
|
+
rescue StandardError
|
43
|
+
# noop
|
44
|
+
end
|
45
|
+
begin
|
46
|
+
return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
47
|
+
rescue StandardError
|
48
|
+
# noop
|
49
|
+
end
|
50
|
+
raise("Passed value matched no type within the union, validation failed.")
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Vapi
|
4
|
+
class SmallestAiVoiceIdEnum
|
5
|
+
EMILY = "emily"
|
6
|
+
JASMINE = "jasmine"
|
7
|
+
ARMAN = "arman"
|
8
|
+
JAMES = "james"
|
9
|
+
MITHALI = "mithali"
|
10
|
+
ARAVIND = "aravind"
|
11
|
+
RAJ = "raj"
|
12
|
+
DIYA = "diya"
|
13
|
+
RAMAN = "raman"
|
14
|
+
ANANYA = "ananya"
|
15
|
+
ISHA = "isha"
|
16
|
+
WILLIAM = "william"
|
17
|
+
AARAV = "aarav"
|
18
|
+
MONIKA = "monika"
|
19
|
+
NIHARIKA = "niharika"
|
20
|
+
DEEPIKA = "deepika"
|
21
|
+
RAGHAV = "raghav"
|
22
|
+
KAJAL = "kajal"
|
23
|
+
RADHIKA = "radhika"
|
24
|
+
MANSI = "mansi"
|
25
|
+
NISHA = "nisha"
|
26
|
+
SAURABH = "saurabh"
|
27
|
+
POOJA = "pooja"
|
28
|
+
SAINA = "saina"
|
29
|
+
SANYA = "sanya"
|
30
|
+
end
|
31
|
+
end
|
@@ -54,7 +54,7 @@ module Vapi
|
|
54
54
|
# @return [String] This is the Stripe fingerprint of the payment method (card). It allows us
|
55
55
|
# to detect users who try to abuse our system through multiple sign-ups.
|
56
56
|
attr_reader :stripe_payment_method_fingerprint
|
57
|
-
# @return [String] This is the
|
57
|
+
# @return [String] This is the customer's email on Stripe.
|
58
58
|
attr_reader :stripe_customer_email
|
59
59
|
# @return [String] This is the email of the referrer for the subscription.
|
60
60
|
attr_reader :referred_by_email
|
@@ -117,7 +117,7 @@ module Vapi
|
|
117
117
|
# @param hipaa_common_paper_agreement_id [String] This is the ID for the Common Paper agreement outlining the HIPAA contract.
|
118
118
|
# @param stripe_payment_method_fingerprint [String] This is the Stripe fingerprint of the payment method (card). It allows us
|
119
119
|
# to detect users who try to abuse our system through multiple sign-ups.
|
120
|
-
# @param stripe_customer_email [String] This is the
|
120
|
+
# @param stripe_customer_email [String] This is the customer's email on Stripe.
|
121
121
|
# @param referred_by_email [String] This is the email of the referrer for the subscription.
|
122
122
|
# @param auto_reload_plan [Vapi::AutoReloadPlan] This is the auto reload plan configured for the subscription.
|
123
123
|
# @param minutes_included [Float] The number of minutes included in the subscription. Enterprise only.
|
@@ -32,13 +32,19 @@ module Vapi
|
|
32
32
|
# @return [Vapi::TransferPlanMessage] This is the message the assistant will deliver to the destination party before
|
33
33
|
# connecting the customer.
|
34
34
|
# Usage:
|
35
|
-
# - Used only when `mode` is `
|
35
|
+
# - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`,
|
36
|
+
# `warm-transfer-say-message` or
|
36
37
|
# `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`.
|
37
38
|
attr_reader :message
|
39
|
+
# @return [Hash{String => Object}] This specifies the SIP verb to use while transferring the call.
|
40
|
+
# - 'refer': Uses SIP REFER to transfer the call (default)
|
41
|
+
# - 'bye': Ends current call with SIP BYE
|
42
|
+
attr_reader :sip_verb
|
38
43
|
# @return [Vapi::SummaryPlan] This is the plan for generating a summary of the call to present to the
|
39
44
|
# destination party.
|
40
45
|
# Usage:
|
41
|
-
# - Used only when `mode` is `
|
46
|
+
# - Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or
|
47
|
+
# `warm-transfer-say-summary` or
|
42
48
|
# `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`.
|
43
49
|
attr_reader :summary_plan
|
44
50
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -72,21 +78,32 @@ module Vapi
|
|
72
78
|
# @param message [Vapi::TransferPlanMessage] This is the message the assistant will deliver to the destination party before
|
73
79
|
# connecting the customer.
|
74
80
|
# Usage:
|
75
|
-
# - Used only when `mode` is `
|
81
|
+
# - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`,
|
82
|
+
# `warm-transfer-say-message` or
|
76
83
|
# `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`.
|
84
|
+
# @param sip_verb [Hash{String => Object}] This specifies the SIP verb to use while transferring the call.
|
85
|
+
# - 'refer': Uses SIP REFER to transfer the call (default)
|
86
|
+
# - 'bye': Ends current call with SIP BYE
|
77
87
|
# @param summary_plan [Vapi::SummaryPlan] This is the plan for generating a summary of the call to present to the
|
78
88
|
# destination party.
|
79
89
|
# Usage:
|
80
|
-
# - Used only when `mode` is `
|
90
|
+
# - Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or
|
91
|
+
# `warm-transfer-say-summary` or
|
81
92
|
# `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`.
|
82
93
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
83
94
|
# @return [Vapi::TransferPlan]
|
84
|
-
def initialize(mode:, message: OMIT, summary_plan: OMIT, additional_properties: nil)
|
95
|
+
def initialize(mode:, message: OMIT, sip_verb: OMIT, summary_plan: OMIT, additional_properties: nil)
|
85
96
|
@mode = mode
|
86
97
|
@message = message if message != OMIT
|
98
|
+
@sip_verb = sip_verb if sip_verb != OMIT
|
87
99
|
@summary_plan = summary_plan if summary_plan != OMIT
|
88
100
|
@additional_properties = additional_properties
|
89
|
-
@_field_set = {
|
101
|
+
@_field_set = {
|
102
|
+
"mode": mode,
|
103
|
+
"message": message,
|
104
|
+
"sipVerb": sip_verb,
|
105
|
+
"summaryPlan": summary_plan
|
106
|
+
}.reject do |_k, v|
|
90
107
|
v == OMIT
|
91
108
|
end
|
92
109
|
end
|
@@ -105,6 +122,7 @@ module Vapi
|
|
105
122
|
message = parsed_json["message"].to_json
|
106
123
|
message = Vapi::TransferPlanMessage.from_json(json_object: message)
|
107
124
|
end
|
125
|
+
sip_verb = parsed_json["sipVerb"]
|
108
126
|
if parsed_json["summaryPlan"].nil?
|
109
127
|
summary_plan = nil
|
110
128
|
else
|
@@ -114,6 +132,7 @@ module Vapi
|
|
114
132
|
new(
|
115
133
|
mode: mode,
|
116
134
|
message: message,
|
135
|
+
sip_verb: sip_verb,
|
117
136
|
summary_plan: summary_plan,
|
118
137
|
additional_properties: struct
|
119
138
|
)
|
@@ -135,6 +154,7 @@ module Vapi
|
|
135
154
|
def self.validate_raw(obj:)
|
136
155
|
obj.mode.is_a?(Vapi::TransferPlanMode) != false || raise("Passed value for field obj.mode is not the expected type, validation failed.")
|
137
156
|
obj.message.nil? || Vapi::TransferPlanMessage.validate_raw(obj: obj.message)
|
157
|
+
obj.sip_verb&.is_a?(Hash) != false || raise("Passed value for field obj.sip_verb is not the expected type, validation failed.")
|
138
158
|
obj.summary_plan.nil? || Vapi::SummaryPlan.validate_raw(obj: obj.summary_plan)
|
139
159
|
end
|
140
160
|
end
|
@@ -7,7 +7,8 @@ module Vapi
|
|
7
7
|
# This is the message the assistant will deliver to the destination party before
|
8
8
|
# connecting the customer.
|
9
9
|
# Usage:
|
10
|
-
# - Used only when `mode` is `
|
10
|
+
# - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`,
|
11
|
+
# `warm-transfer-say-message` or
|
11
12
|
# `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`.
|
12
13
|
class TransferPlanMessage
|
13
14
|
# Deserialize a JSON object to an instance of TransferPlanMessage
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative "twilio_phone_number_fallback_destination"
|
4
4
|
require "date"
|
5
|
+
require_relative "server"
|
5
6
|
require "ostruct"
|
6
7
|
require "json"
|
7
8
|
|
@@ -34,16 +35,13 @@ module Vapi
|
|
34
35
|
# to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
|
35
36
|
# shape of the message and response that is expected.
|
36
37
|
attr_reader :squad_id
|
37
|
-
# @return [
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
|
43
|
-
|
44
|
-
# as a header called x-vapi-secret.
|
45
|
-
# Same precedence logic as serverUrl.
|
46
|
-
attr_reader :server_url_secret
|
38
|
+
# @return [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
|
39
|
+
# with their shape in ServerMessage schema.
|
40
|
+
# The order of precedence is:
|
41
|
+
# 1. assistant.server
|
42
|
+
# 2. phoneNumber.server
|
43
|
+
# 3. org.server
|
44
|
+
attr_reader :server
|
47
45
|
# @return [String] These are the digits of the phone number you own on your Twilio.
|
48
46
|
attr_reader :number
|
49
47
|
# @return [String] This is the Twilio Account SID for the phone number.
|
@@ -77,21 +75,19 @@ module Vapi
|
|
77
75
|
# If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent
|
78
76
|
# to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the
|
79
77
|
# shape of the message and response that is expected.
|
80
|
-
# @param
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
85
|
-
#
|
86
|
-
# as a header called x-vapi-secret.
|
87
|
-
# Same precedence logic as serverUrl.
|
78
|
+
# @param server [Vapi::Server] This is where Vapi will send webhooks. You can find all webhooks available along
|
79
|
+
# with their shape in ServerMessage schema.
|
80
|
+
# The order of precedence is:
|
81
|
+
# 1. assistant.server
|
82
|
+
# 2. phoneNumber.server
|
83
|
+
# 3. org.server
|
88
84
|
# @param number [String] These are the digits of the phone number you own on your Twilio.
|
89
85
|
# @param twilio_account_sid [String] This is the Twilio Account SID for the phone number.
|
90
86
|
# @param twilio_auth_token [String] This is the Twilio Auth Token for the phone number.
|
91
87
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
92
88
|
# @return [Vapi::TwilioPhoneNumber]
|
93
89
|
def initialize(id:, org_id:, created_at:, updated_at:, number:, twilio_account_sid:, twilio_auth_token:, fallback_destination: OMIT, name: OMIT, assistant_id: OMIT,
|
94
|
-
squad_id: OMIT,
|
90
|
+
squad_id: OMIT, server: OMIT, additional_properties: nil)
|
95
91
|
@fallback_destination = fallback_destination if fallback_destination != OMIT
|
96
92
|
@id = id
|
97
93
|
@org_id = org_id
|
@@ -100,8 +96,7 @@ module Vapi
|
|
100
96
|
@name = name if name != OMIT
|
101
97
|
@assistant_id = assistant_id if assistant_id != OMIT
|
102
98
|
@squad_id = squad_id if squad_id != OMIT
|
103
|
-
@
|
104
|
-
@server_url_secret = server_url_secret if server_url_secret != OMIT
|
99
|
+
@server = server if server != OMIT
|
105
100
|
@number = number
|
106
101
|
@twilio_account_sid = twilio_account_sid
|
107
102
|
@twilio_auth_token = twilio_auth_token
|
@@ -115,8 +110,7 @@ module Vapi
|
|
115
110
|
"name": name,
|
116
111
|
"assistantId": assistant_id,
|
117
112
|
"squadId": squad_id,
|
118
|
-
"
|
119
|
-
"serverUrlSecret": server_url_secret,
|
113
|
+
"server": server,
|
120
114
|
"number": number,
|
121
115
|
"twilioAccountSid": twilio_account_sid,
|
122
116
|
"twilioAuthToken": twilio_auth_token
|
@@ -145,8 +139,12 @@ module Vapi
|
|
145
139
|
name = parsed_json["name"]
|
146
140
|
assistant_id = parsed_json["assistantId"]
|
147
141
|
squad_id = parsed_json["squadId"]
|
148
|
-
|
149
|
-
|
142
|
+
if parsed_json["server"].nil?
|
143
|
+
server = nil
|
144
|
+
else
|
145
|
+
server = parsed_json["server"].to_json
|
146
|
+
server = Vapi::Server.from_json(json_object: server)
|
147
|
+
end
|
150
148
|
number = parsed_json["number"]
|
151
149
|
twilio_account_sid = parsed_json["twilioAccountSid"]
|
152
150
|
twilio_auth_token = parsed_json["twilioAuthToken"]
|
@@ -159,8 +157,7 @@ module Vapi
|
|
159
157
|
name: name,
|
160
158
|
assistant_id: assistant_id,
|
161
159
|
squad_id: squad_id,
|
162
|
-
|
163
|
-
server_url_secret: server_url_secret,
|
160
|
+
server: server,
|
164
161
|
number: number,
|
165
162
|
twilio_account_sid: twilio_account_sid,
|
166
163
|
twilio_auth_token: twilio_auth_token,
|
@@ -190,8 +187,7 @@ module Vapi
|
|
190
187
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
191
188
|
obj.assistant_id&.is_a?(String) != false || raise("Passed value for field obj.assistant_id is not the expected type, validation failed.")
|
192
189
|
obj.squad_id&.is_a?(String) != false || raise("Passed value for field obj.squad_id is not the expected type, validation failed.")
|
193
|
-
obj.
|
194
|
-
obj.server_url_secret&.is_a?(String) != false || raise("Passed value for field obj.server_url_secret is not the expected type, validation failed.")
|
190
|
+
obj.server.nil? || Vapi::Server.validate_raw(obj: obj.server)
|
195
191
|
obj.number.is_a?(String) != false || raise("Passed value for field obj.number is not the expected type, validation failed.")
|
196
192
|
obj.twilio_account_sid.is_a?(String) != false || raise("Passed value for field obj.twilio_account_sid is not the expected type, validation failed.")
|
197
193
|
obj.twilio_auth_token.is_a?(String) != false || raise("Passed value for field obj.twilio_auth_token is not the expected type, validation failed.")
|
@@ -5,8 +5,6 @@ require "json"
|
|
5
5
|
|
6
6
|
module Vapi
|
7
7
|
class UpdateAnthropicCredentialDto
|
8
|
-
# @return [String]
|
9
|
-
attr_reader :provider
|
10
8
|
# @return [String] This is not returned in the API.
|
11
9
|
attr_reader :api_key
|
12
10
|
# @return [String] This is the name of credential. This is just for your reference.
|
@@ -19,17 +17,15 @@ module Vapi
|
|
19
17
|
|
20
18
|
OMIT = Object.new
|
21
19
|
|
22
|
-
# @param provider [String]
|
23
20
|
# @param api_key [String] This is not returned in the API.
|
24
21
|
# @param name [String] This is the name of credential. This is just for your reference.
|
25
22
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
23
|
# @return [Vapi::UpdateAnthropicCredentialDto]
|
27
|
-
def initialize(
|
28
|
-
@
|
29
|
-
@api_key = api_key
|
24
|
+
def initialize(api_key: OMIT, name: OMIT, additional_properties: nil)
|
25
|
+
@api_key = api_key if api_key != OMIT
|
30
26
|
@name = name if name != OMIT
|
31
27
|
@additional_properties = additional_properties
|
32
|
-
@_field_set = { "
|
28
|
+
@_field_set = { "apiKey": api_key, "name": name }.reject do |_k, v|
|
33
29
|
v == OMIT
|
34
30
|
end
|
35
31
|
end
|
@@ -41,11 +37,9 @@ module Vapi
|
|
41
37
|
def self.from_json(json_object:)
|
42
38
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
39
|
parsed_json = JSON.parse(json_object)
|
44
|
-
provider = parsed_json["provider"]
|
45
40
|
api_key = parsed_json["apiKey"]
|
46
41
|
name = parsed_json["name"]
|
47
42
|
new(
|
48
|
-
provider: provider,
|
49
43
|
api_key: api_key,
|
50
44
|
name: name,
|
51
45
|
additional_properties: struct
|
@@ -66,8 +60,7 @@ module Vapi
|
|
66
60
|
# @param obj [Object]
|
67
61
|
# @return [Void]
|
68
62
|
def self.validate_raw(obj:)
|
69
|
-
obj.
|
70
|
-
obj.api_key.is_a?(String) != false || raise("Passed value for field obj.api_key is not the expected type, validation failed.")
|
63
|
+
obj.api_key&.is_a?(String) != false || raise("Passed value for field obj.api_key is not the expected type, validation failed.")
|
71
64
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
72
65
|
end
|
73
66
|
end
|
@@ -5,8 +5,6 @@ require "json"
|
|
5
5
|
|
6
6
|
module Vapi
|
7
7
|
class UpdateAnyscaleCredentialDto
|
8
|
-
# @return [String]
|
9
|
-
attr_reader :provider
|
10
8
|
# @return [String] This is not returned in the API.
|
11
9
|
attr_reader :api_key
|
12
10
|
# @return [String] This is the name of credential. This is just for your reference.
|
@@ -19,17 +17,15 @@ module Vapi
|
|
19
17
|
|
20
18
|
OMIT = Object.new
|
21
19
|
|
22
|
-
# @param provider [String]
|
23
20
|
# @param api_key [String] This is not returned in the API.
|
24
21
|
# @param name [String] This is the name of credential. This is just for your reference.
|
25
22
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
23
|
# @return [Vapi::UpdateAnyscaleCredentialDto]
|
27
|
-
def initialize(
|
28
|
-
@
|
29
|
-
@api_key = api_key
|
24
|
+
def initialize(api_key: OMIT, name: OMIT, additional_properties: nil)
|
25
|
+
@api_key = api_key if api_key != OMIT
|
30
26
|
@name = name if name != OMIT
|
31
27
|
@additional_properties = additional_properties
|
32
|
-
@_field_set = { "
|
28
|
+
@_field_set = { "apiKey": api_key, "name": name }.reject do |_k, v|
|
33
29
|
v == OMIT
|
34
30
|
end
|
35
31
|
end
|
@@ -41,11 +37,9 @@ module Vapi
|
|
41
37
|
def self.from_json(json_object:)
|
42
38
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
39
|
parsed_json = JSON.parse(json_object)
|
44
|
-
provider = parsed_json["provider"]
|
45
40
|
api_key = parsed_json["apiKey"]
|
46
41
|
name = parsed_json["name"]
|
47
42
|
new(
|
48
|
-
provider: provider,
|
49
43
|
api_key: api_key,
|
50
44
|
name: name,
|
51
45
|
additional_properties: struct
|
@@ -66,8 +60,7 @@ module Vapi
|
|
66
60
|
# @param obj [Object]
|
67
61
|
# @return [Void]
|
68
62
|
def self.validate_raw(obj:)
|
69
|
-
obj.
|
70
|
-
obj.api_key.is_a?(String) != false || raise("Passed value for field obj.api_key is not the expected type, validation failed.")
|
63
|
+
obj.api_key&.is_a?(String) != false || raise("Passed value for field obj.api_key is not the expected type, validation failed.")
|
71
64
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
72
65
|
end
|
73
66
|
end
|