diff --git a/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerCreate.g.cs b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerCreate.g.cs index 602a89c2..6a636c18 100644 --- a/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerCreate.g.cs +++ b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerCreate.g.cs @@ -459,6 +459,18 @@ partial void ProcessCampaignControllerCreateResponseContent( /// /// These are the customers that will be called in the campaign. Required if dialPlan is not provided. /// + /// + /// This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10. + /// + /// + /// These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`. + /// + /// + /// These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a `squadId`. Per-contact `squadOverrides` are deep-merged on top of this at dispatch time. + /// + /// + /// Optional campaign ID to duplicate config from. Provided fields in the request override the source. If `customers` is omitted, contacts are copied from the source. + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -471,6 +483,10 @@ partial void ProcessCampaignControllerCreateResponseContent( global::System.Collections.Generic.IList? dialPlan = default, global::Vapi.SchedulePlan? schedulePlan = default, global::System.Collections.Generic.IList? customers = default, + double? maxConcurrency = default, + global::Vapi.AssistantOverrides? assistantOverrides = default, + global::Vapi.AssistantOverrides? squadOverrides = default, + string? duplicateFromCampaignId = default, global::Vapi.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -484,6 +500,10 @@ partial void ProcessCampaignControllerCreateResponseContent( DialPlan = dialPlan, SchedulePlan = schedulePlan, Customers = customers, + MaxConcurrency = maxConcurrency, + AssistantOverrides = assistantOverrides, + SquadOverrides = squadOverrides, + DuplicateFromCampaignId = duplicateFromCampaignId, }; return await CampaignControllerCreateAsync( diff --git a/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerCreateV2.g.cs b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerCreateV2.g.cs new file mode 100644 index 00000000..c6e60df6 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerCreateV2.g.cs @@ -0,0 +1,515 @@ + +#nullable enable + +namespace Vapi +{ + public partial class CampaignsClient + { + + + private static readonly global::Vapi.EndPointSecurityRequirement s_CampaignControllerCreateV2SecurityRequirement0 = + new global::Vapi.EndPointSecurityRequirement + { + Authorizations = new global::Vapi.EndPointAuthorizationRequirement[] + { new global::Vapi.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Vapi.EndPointSecurityRequirement[] s_CampaignControllerCreateV2SecurityRequirements = + new global::Vapi.EndPointSecurityRequirement[] + { s_CampaignControllerCreateV2SecurityRequirement0, + }; + partial void PrepareCampaignControllerCreateV2Arguments( + global::System.Net.Http.HttpClient httpClient, + global::Vapi.CreateCampaignDTO request); + partial void PrepareCampaignControllerCreateV2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Vapi.CreateCampaignDTO request); + partial void ProcessCampaignControllerCreateV2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCampaignControllerCreateV2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create Campaign V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CampaignControllerCreateV2Async( + + global::Vapi.CreateCampaignDTO request, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CampaignControllerCreateV2AsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Campaign V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CampaignControllerCreateV2AsResponseAsync( + + global::Vapi.CreateCampaignDTO request, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCampaignControllerCreateV2Arguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Vapi.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CampaignControllerCreateV2SecurityRequirements, + operationName: "CampaignControllerCreateV2Async"); + + using var __timeoutCancellationTokenSource = global::Vapi.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vapi.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vapi.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vapi.PathBuilder( + path: "/v2/campaign", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vapi.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Vapi.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCampaignControllerCreateV2Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vapi.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerCreateV2", + methodName: "CampaignControllerCreateV2Async", + pathTemplate: "\"/v2/campaign\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vapi.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerCreateV2", + methodName: "CampaignControllerCreateV2Async", + pathTemplate: "\"/v2/campaign\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vapi.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vapi.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vapi.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerCreateV2", + methodName: "CampaignControllerCreateV2Async", + pathTemplate: "\"/v2/campaign\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vapi.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCampaignControllerCreateV2Response( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerCreateV2", + methodName: "CampaignControllerCreateV2Async", + pathTemplate: "\"/v2/campaign\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerCreateV2", + methodName: "CampaignControllerCreateV2Async", + pathTemplate: "\"/v2/campaign\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCampaignControllerCreateV2ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vapi.Campaign.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vapi.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vapi.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vapi.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vapi.Campaign.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vapi.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vapi.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vapi.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create Campaign V2 + /// + /// + /// This is the name of the campaign. This is just for your own reference.
+ /// Example: Q2 Sales Campaign + /// + /// + /// This is the assistant ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + /// + /// + /// This is the workflow ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + /// + /// + /// This is the squad ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + /// + /// + /// This is the phone number ID that will be used for the campaign calls. Required if dialPlan is not provided. Note: phoneNumberId and dialPlan are mutually exclusive. + /// + /// + /// This is a list of dial entries, each specifying a phone number and the customers to call using that number. Use this when you want different phone numbers to call different sets of customers. Note: phoneNumberId and dialPlan are mutually exclusive. + /// + /// + /// This is the schedule plan for the campaign. Calls will start at startedAt and continue until your organization’s concurrency limit is reached. Any remaining calls will be retried for up to one hour as capacity becomes available. After that hour or after latestAt, whichever comes first, any calls that couldn’t be placed won’t be retried. + /// + /// + /// These are the customers that will be called in the campaign. Required if dialPlan is not provided. + /// + /// + /// This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10. + /// + /// + /// These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`. + /// + /// + /// These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a `squadId`. Per-contact `squadOverrides` are deep-merged on top of this at dispatch time. + /// + /// + /// Optional campaign ID to duplicate config from. Provided fields in the request override the source. If `customers` is omitted, contacts are copied from the source. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CampaignControllerCreateV2Async( + string name, + string? assistantId = default, + string? workflowId = default, + string? squadId = default, + string? phoneNumberId = default, + global::System.Collections.Generic.IList? dialPlan = default, + global::Vapi.SchedulePlan? schedulePlan = default, + global::System.Collections.Generic.IList? customers = default, + double? maxConcurrency = default, + global::Vapi.AssistantOverrides? assistantOverrides = default, + global::Vapi.AssistantOverrides? squadOverrides = default, + string? duplicateFromCampaignId = default, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Vapi.CreateCampaignDTO + { + Name = name, + AssistantId = assistantId, + WorkflowId = workflowId, + SquadId = squadId, + PhoneNumberId = phoneNumberId, + DialPlan = dialPlan, + SchedulePlan = schedulePlan, + Customers = customers, + MaxConcurrency = maxConcurrency, + AssistantOverrides = assistantOverrides, + SquadOverrides = squadOverrides, + DuplicateFromCampaignId = duplicateFromCampaignId, + }; + + return await CampaignControllerCreateV2Async( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerFindAllV2.g.cs b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerFindAllV2.g.cs new file mode 100644 index 00000000..f56d937a --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerFindAllV2.g.cs @@ -0,0 +1,557 @@ + +#nullable enable + +namespace Vapi +{ + public partial class CampaignsClient + { + + + private static readonly global::Vapi.EndPointSecurityRequirement s_CampaignControllerFindAllV2SecurityRequirement0 = + new global::Vapi.EndPointSecurityRequirement + { + Authorizations = new global::Vapi.EndPointAuthorizationRequirement[] + { new global::Vapi.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Vapi.EndPointSecurityRequirement[] s_CampaignControllerFindAllV2SecurityRequirements = + new global::Vapi.EndPointSecurityRequirement[] + { s_CampaignControllerFindAllV2SecurityRequirement0, + }; + partial void PrepareCampaignControllerFindAllV2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref string? id, + ref global::Vapi.CampaignControllerFindAllV2Status? status, + ref double? page, + ref global::Vapi.CampaignControllerFindAllV2SortOrder? sortOrder, + ref global::Vapi.CampaignControllerFindAllV2SortBy? sortBy, + ref double? limit, + ref global::System.DateTime? createdAtGt, + ref global::System.DateTime? createdAtLt, + ref global::System.DateTime? createdAtGe, + ref global::System.DateTime? createdAtLe, + ref global::System.DateTime? updatedAtGt, + ref global::System.DateTime? updatedAtLt, + ref global::System.DateTime? updatedAtGe, + ref global::System.DateTime? updatedAtLe); + partial void PrepareCampaignControllerFindAllV2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? id, + global::Vapi.CampaignControllerFindAllV2Status? status, + double? page, + global::Vapi.CampaignControllerFindAllV2SortOrder? sortOrder, + global::Vapi.CampaignControllerFindAllV2SortBy? sortBy, + double? limit, + global::System.DateTime? createdAtGt, + global::System.DateTime? createdAtLt, + global::System.DateTime? createdAtGe, + global::System.DateTime? createdAtLe, + global::System.DateTime? updatedAtGt, + global::System.DateTime? updatedAtLt, + global::System.DateTime? updatedAtGe, + global::System.DateTime? updatedAtLe); + partial void ProcessCampaignControllerFindAllV2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCampaignControllerFindAllV2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Campaigns V2 + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CampaignControllerFindAllV2Async( + string? id = default, + global::Vapi.CampaignControllerFindAllV2Status? status = default, + double? page = default, + global::Vapi.CampaignControllerFindAllV2SortOrder? sortOrder = default, + global::Vapi.CampaignControllerFindAllV2SortBy? sortBy = default, + double? limit = default, + global::System.DateTime? createdAtGt = default, + global::System.DateTime? createdAtLt = default, + global::System.DateTime? createdAtGe = default, + global::System.DateTime? createdAtLe = default, + global::System.DateTime? updatedAtGt = default, + global::System.DateTime? updatedAtLt = default, + global::System.DateTime? updatedAtGe = default, + global::System.DateTime? updatedAtLe = default, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CampaignControllerFindAllV2AsResponseAsync( + id: id, + status: status, + page: page, + sortOrder: sortOrder, + sortBy: sortBy, + limit: limit, + createdAtGt: createdAtGt, + createdAtLt: createdAtLt, + createdAtGe: createdAtGe, + createdAtLe: createdAtLe, + updatedAtGt: updatedAtGt, + updatedAtLt: updatedAtLt, + updatedAtGe: updatedAtGe, + updatedAtLe: updatedAtLe, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Campaigns V2 + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CampaignControllerFindAllV2AsResponseAsync( + string? id = default, + global::Vapi.CampaignControllerFindAllV2Status? status = default, + double? page = default, + global::Vapi.CampaignControllerFindAllV2SortOrder? sortOrder = default, + global::Vapi.CampaignControllerFindAllV2SortBy? sortBy = default, + double? limit = default, + global::System.DateTime? createdAtGt = default, + global::System.DateTime? createdAtLt = default, + global::System.DateTime? createdAtGe = default, + global::System.DateTime? createdAtLe = default, + global::System.DateTime? updatedAtGt = default, + global::System.DateTime? updatedAtLt = default, + global::System.DateTime? updatedAtGe = default, + global::System.DateTime? updatedAtLe = default, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCampaignControllerFindAllV2Arguments( + httpClient: HttpClient, + id: ref id, + status: ref status, + page: ref page, + sortOrder: ref sortOrder, + sortBy: ref sortBy, + limit: ref limit, + createdAtGt: ref createdAtGt, + createdAtLt: ref createdAtLt, + createdAtGe: ref createdAtGe, + createdAtLe: ref createdAtLe, + updatedAtGt: ref updatedAtGt, + updatedAtLt: ref updatedAtLt, + updatedAtGe: ref updatedAtGe, + updatedAtLe: ref updatedAtLe); + + + var __authorizations = global::Vapi.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CampaignControllerFindAllV2SecurityRequirements, + operationName: "CampaignControllerFindAllV2Async"); + + using var __timeoutCancellationTokenSource = global::Vapi.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vapi.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vapi.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vapi.PathBuilder( + path: "/v2/campaign", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("id", id) + .AddOptionalParameter("status", status?.ToValueString()) + .AddOptionalParameter("page", page?.ToString()) + .AddOptionalParameter("sortOrder", sortOrder?.ToValueString()) + .AddOptionalParameter("sortBy", sortBy?.ToValueString()) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("createdAtGt", createdAtGt?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("createdAtLt", createdAtLt?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("createdAtGe", createdAtGe?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("createdAtLe", createdAtLe?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("updatedAtGt", updatedAtGt?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("updatedAtLt", updatedAtLt?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("updatedAtGe", updatedAtGe?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("updatedAtLe", updatedAtLe?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + ; + var __path = __pathBuilder.ToString(); + __path = global::Vapi.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::Vapi.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCampaignControllerFindAllV2Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + id: id, + status: status, + page: page, + sortOrder: sortOrder, + sortBy: sortBy, + limit: limit, + createdAtGt: createdAtGt, + createdAtLt: createdAtLt, + createdAtGe: createdAtGe, + createdAtLe: createdAtLe, + updatedAtGt: updatedAtGt, + updatedAtLt: updatedAtLt, + updatedAtGe: updatedAtGe, + updatedAtLe: updatedAtLe); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vapi.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerFindAllV2", + methodName: "CampaignControllerFindAllV2Async", + pathTemplate: "\"/v2/campaign\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vapi.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerFindAllV2", + methodName: "CampaignControllerFindAllV2Async", + pathTemplate: "\"/v2/campaign\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vapi.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vapi.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vapi.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerFindAllV2", + methodName: "CampaignControllerFindAllV2Async", + pathTemplate: "\"/v2/campaign\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vapi.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCampaignControllerFindAllV2Response( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerFindAllV2", + methodName: "CampaignControllerFindAllV2Async", + pathTemplate: "\"/v2/campaign\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerFindAllV2", + methodName: "CampaignControllerFindAllV2Async", + pathTemplate: "\"/v2/campaign\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCampaignControllerFindAllV2ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vapi.CampaignPaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vapi.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vapi.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vapi.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vapi.CampaignPaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vapi.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vapi.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vapi.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerFindOneV2.g.cs b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerFindOneV2.g.cs new file mode 100644 index 00000000..37f01488 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerFindOneV2.g.cs @@ -0,0 +1,424 @@ + +#nullable enable + +namespace Vapi +{ + public partial class CampaignsClient + { + + + private static readonly global::Vapi.EndPointSecurityRequirement s_CampaignControllerFindOneV2SecurityRequirement0 = + new global::Vapi.EndPointSecurityRequirement + { + Authorizations = new global::Vapi.EndPointAuthorizationRequirement[] + { new global::Vapi.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Vapi.EndPointSecurityRequirement[] s_CampaignControllerFindOneV2SecurityRequirements = + new global::Vapi.EndPointSecurityRequirement[] + { s_CampaignControllerFindOneV2SecurityRequirement0, + }; + partial void PrepareCampaignControllerFindOneV2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid id); + partial void PrepareCampaignControllerFindOneV2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid id); + partial void ProcessCampaignControllerFindOneV2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCampaignControllerFindOneV2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Campaign V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CampaignControllerFindOneV2Async( + global::System.Guid id, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CampaignControllerFindOneV2AsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Campaign V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CampaignControllerFindOneV2AsResponseAsync( + global::System.Guid id, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCampaignControllerFindOneV2Arguments( + httpClient: HttpClient, + id: ref id); + + + var __authorizations = global::Vapi.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CampaignControllerFindOneV2SecurityRequirements, + operationName: "CampaignControllerFindOneV2Async"); + + using var __timeoutCancellationTokenSource = global::Vapi.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vapi.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vapi.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vapi.PathBuilder( + path: $"/v2/campaign/{id}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vapi.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::Vapi.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCampaignControllerFindOneV2Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + id: id!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vapi.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerFindOneV2", + methodName: "CampaignControllerFindOneV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vapi.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerFindOneV2", + methodName: "CampaignControllerFindOneV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vapi.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vapi.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vapi.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerFindOneV2", + methodName: "CampaignControllerFindOneV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vapi.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCampaignControllerFindOneV2Response( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerFindOneV2", + methodName: "CampaignControllerFindOneV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerFindOneV2", + methodName: "CampaignControllerFindOneV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCampaignControllerFindOneV2ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vapi.Campaign.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vapi.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vapi.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vapi.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vapi.Campaign.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vapi.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vapi.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vapi.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerRemoveV2.g.cs b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerRemoveV2.g.cs new file mode 100644 index 00000000..ba483548 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerRemoveV2.g.cs @@ -0,0 +1,424 @@ + +#nullable enable + +namespace Vapi +{ + public partial class CampaignsClient + { + + + private static readonly global::Vapi.EndPointSecurityRequirement s_CampaignControllerRemoveV2SecurityRequirement0 = + new global::Vapi.EndPointSecurityRequirement + { + Authorizations = new global::Vapi.EndPointAuthorizationRequirement[] + { new global::Vapi.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Vapi.EndPointSecurityRequirement[] s_CampaignControllerRemoveV2SecurityRequirements = + new global::Vapi.EndPointSecurityRequirement[] + { s_CampaignControllerRemoveV2SecurityRequirement0, + }; + partial void PrepareCampaignControllerRemoveV2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid id); + partial void PrepareCampaignControllerRemoveV2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid id); + partial void ProcessCampaignControllerRemoveV2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCampaignControllerRemoveV2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete Campaign + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CampaignControllerRemoveV2Async( + global::System.Guid id, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CampaignControllerRemoveV2AsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Campaign + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CampaignControllerRemoveV2AsResponseAsync( + global::System.Guid id, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCampaignControllerRemoveV2Arguments( + httpClient: HttpClient, + id: ref id); + + + var __authorizations = global::Vapi.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CampaignControllerRemoveV2SecurityRequirements, + operationName: "CampaignControllerRemoveV2Async"); + + using var __timeoutCancellationTokenSource = global::Vapi.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vapi.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vapi.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vapi.PathBuilder( + path: $"/v2/campaign/{id}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vapi.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::Vapi.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCampaignControllerRemoveV2Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + id: id!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vapi.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerRemoveV2", + methodName: "CampaignControllerRemoveV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vapi.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerRemoveV2", + methodName: "CampaignControllerRemoveV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vapi.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vapi.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vapi.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerRemoveV2", + methodName: "CampaignControllerRemoveV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vapi.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCampaignControllerRemoveV2Response( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerRemoveV2", + methodName: "CampaignControllerRemoveV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerRemoveV2", + methodName: "CampaignControllerRemoveV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCampaignControllerRemoveV2ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vapi.Campaign.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vapi.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vapi.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vapi.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vapi.Campaign.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vapi.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vapi.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vapi.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerUpdate.g.cs b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerUpdate.g.cs index 1978e541..9fac4e14 100644 --- a/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerUpdate.g.cs +++ b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerUpdate.g.cs @@ -472,9 +472,8 @@ partial void ProcessCampaignControllerUpdateResponseContent( /// Can only be updated if campaign is not in progress or has ended. /// /// - /// This is the status of the campaign.
- /// Can only be updated to 'ended' if you want to end the campaign.
- /// When set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete. + /// Set to 'cancelled' to stop the campaign ('ended' is a V1 alias). Scheduled
+ /// calls are deleted; in-progress calls are allowed to finish. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerUpdateV2.g.cs b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerUpdateV2.g.cs new file mode 100644 index 00000000..3c30c365 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.CampaignsClient.CampaignControllerUpdateV2.g.cs @@ -0,0 +1,513 @@ + +#nullable enable + +namespace Vapi +{ + public partial class CampaignsClient + { + + + private static readonly global::Vapi.EndPointSecurityRequirement s_CampaignControllerUpdateV2SecurityRequirement0 = + new global::Vapi.EndPointSecurityRequirement + { + Authorizations = new global::Vapi.EndPointAuthorizationRequirement[] + { new global::Vapi.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Vapi.EndPointSecurityRequirement[] s_CampaignControllerUpdateV2SecurityRequirements = + new global::Vapi.EndPointSecurityRequirement[] + { s_CampaignControllerUpdateV2SecurityRequirement0, + }; + partial void PrepareCampaignControllerUpdateV2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid id, + global::Vapi.UpdateCampaignDTO request); + partial void PrepareCampaignControllerUpdateV2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid id, + global::Vapi.UpdateCampaignDTO request); + partial void ProcessCampaignControllerUpdateV2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCampaignControllerUpdateV2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update Campaign + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CampaignControllerUpdateV2Async( + global::System.Guid id, + + global::Vapi.UpdateCampaignDTO request, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CampaignControllerUpdateV2AsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Campaign + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CampaignControllerUpdateV2AsResponseAsync( + global::System.Guid id, + + global::Vapi.UpdateCampaignDTO request, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCampaignControllerUpdateV2Arguments( + httpClient: HttpClient, + id: ref id, + request: request); + + + var __authorizations = global::Vapi.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CampaignControllerUpdateV2SecurityRequirements, + operationName: "CampaignControllerUpdateV2Async"); + + using var __timeoutCancellationTokenSource = global::Vapi.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vapi.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vapi.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vapi.PathBuilder( + path: $"/v2/campaign/{id}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vapi.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Vapi.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCampaignControllerUpdateV2Request( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + id: id!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vapi.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerUpdateV2", + methodName: "CampaignControllerUpdateV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vapi.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerUpdateV2", + methodName: "CampaignControllerUpdateV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vapi.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vapi.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vapi.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerUpdateV2", + methodName: "CampaignControllerUpdateV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vapi.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCampaignControllerUpdateV2Response( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerUpdateV2", + methodName: "CampaignControllerUpdateV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vapi.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vapi.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CampaignControllerUpdateV2", + methodName: "CampaignControllerUpdateV2Async", + pathTemplate: "$\"/v2/campaign/{id}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCampaignControllerUpdateV2ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vapi.Campaign.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vapi.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vapi.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Vapi.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Vapi.Campaign.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vapi.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vapi.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Vapi.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Update Campaign + /// + /// + /// + /// This is the name of the campaign. This is just for your own reference. + /// + /// + /// This is the assistant ID that will be used for the campaign calls.
+ /// Can only be updated if campaign is not in progress or has ended. + /// + /// + /// This is the workflow ID that will be used for the campaign calls.
+ /// Can only be updated if campaign is not in progress or has ended. + /// + /// + /// This is the squad ID that will be used for the campaign calls.
+ /// Can only be updated if campaign is not in progress or has ended. + /// + /// + /// This is the phone number ID that will be used for the campaign calls.
+ /// Can only be updated if campaign is not in progress or has ended.
+ /// Note: `phoneNumberId` and `dialPlan` are mutually exclusive. + /// + /// + /// This is a list of dial entries, each specifying a phone number and the customers to call using that number. Can only be updated if campaign is not in progress or has ended. Note: phoneNumberId and dialPlan are mutually exclusive. + /// + /// + /// This is the schedule plan for the campaign.
+ /// Can only be updated if campaign is not in progress or has ended. + /// + /// + /// Set to 'cancelled' to stop the campaign ('ended' is a V1 alias). Scheduled
+ /// calls are deleted; in-progress calls are allowed to finish. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CampaignControllerUpdateV2Async( + global::System.Guid id, + string? name = default, + string? assistantId = default, + string? workflowId = default, + string? squadId = default, + string? phoneNumberId = default, + global::System.Collections.Generic.IList? dialPlan = default, + global::Vapi.SchedulePlan? schedulePlan = default, + global::Vapi.UpdateCampaignDTOStatus? status = default, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Vapi.UpdateCampaignDTO + { + Name = name, + AssistantId = assistantId, + WorkflowId = workflowId, + SquadId = squadId, + PhoneNumberId = phoneNumberId, + DialPlan = dialPlan, + SchedulePlan = schedulePlan, + Status = status, + }; + + return await CampaignControllerUpdateV2Async( + id: id, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerCreate.g.cs b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerCreate.g.cs index 39a9ec6e..5a3992f3 100644 --- a/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerCreate.g.cs +++ b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerCreate.g.cs @@ -56,6 +56,18 @@ public partial interface ICampaignsClient /// /// These are the customers that will be called in the campaign. Required if dialPlan is not provided. /// + /// + /// This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10. + /// + /// + /// These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`. + /// + /// + /// These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a `squadId`. Per-contact `squadOverrides` are deep-merged on top of this at dispatch time. + /// + /// + /// Optional campaign ID to duplicate config from. Provided fields in the request override the source. If `customers` is omitted, contacts are copied from the source. + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -68,6 +80,10 @@ public partial interface ICampaignsClient global::System.Collections.Generic.IList? dialPlan = default, global::Vapi.SchedulePlan? schedulePlan = default, global::System.Collections.Generic.IList? customers = default, + double? maxConcurrency = default, + global::Vapi.AssistantOverrides? assistantOverrides = default, + global::Vapi.AssistantOverrides? squadOverrides = default, + string? duplicateFromCampaignId = default, global::Vapi.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerCreateV2.g.cs b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerCreateV2.g.cs new file mode 100644 index 00000000..e4986da3 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerCreateV2.g.cs @@ -0,0 +1,90 @@ +#nullable enable + +namespace Vapi +{ + public partial interface ICampaignsClient + { + /// + /// Create Campaign V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CampaignControllerCreateV2Async( + + global::Vapi.CreateCampaignDTO request, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Campaign V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CampaignControllerCreateV2AsResponseAsync( + + global::Vapi.CreateCampaignDTO request, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Campaign V2 + /// + /// + /// This is the name of the campaign. This is just for your own reference.
+ /// Example: Q2 Sales Campaign + /// + /// + /// This is the assistant ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + /// + /// + /// This is the workflow ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + /// + /// + /// This is the squad ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used. + /// + /// + /// This is the phone number ID that will be used for the campaign calls. Required if dialPlan is not provided. Note: phoneNumberId and dialPlan are mutually exclusive. + /// + /// + /// This is a list of dial entries, each specifying a phone number and the customers to call using that number. Use this when you want different phone numbers to call different sets of customers. Note: phoneNumberId and dialPlan are mutually exclusive. + /// + /// + /// This is the schedule plan for the campaign. Calls will start at startedAt and continue until your organization’s concurrency limit is reached. Any remaining calls will be retried for up to one hour as capacity becomes available. After that hour or after latestAt, whichever comes first, any calls that couldn’t be placed won’t be retried. + /// + /// + /// These are the customers that will be called in the campaign. Required if dialPlan is not provided. + /// + /// + /// This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10. + /// + /// + /// These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`. + /// + /// + /// These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a `squadId`. Per-contact `squadOverrides` are deep-merged on top of this at dispatch time. + /// + /// + /// Optional campaign ID to duplicate config from. Provided fields in the request override the source. If `customers` is omitted, contacts are copied from the source. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CampaignControllerCreateV2Async( + string name, + string? assistantId = default, + string? workflowId = default, + string? squadId = default, + string? phoneNumberId = default, + global::System.Collections.Generic.IList? dialPlan = default, + global::Vapi.SchedulePlan? schedulePlan = default, + global::System.Collections.Generic.IList? customers = default, + double? maxConcurrency = default, + global::Vapi.AssistantOverrides? assistantOverrides = default, + global::Vapi.AssistantOverrides? squadOverrides = default, + string? duplicateFromCampaignId = default, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerFindAllV2.g.cs b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerFindAllV2.g.cs new file mode 100644 index 00000000..54d6dcbf --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerFindAllV2.g.cs @@ -0,0 +1,82 @@ +#nullable enable + +namespace Vapi +{ + public partial interface ICampaignsClient + { + /// + /// List Campaigns V2 + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CampaignControllerFindAllV2Async( + string? id = default, + global::Vapi.CampaignControllerFindAllV2Status? status = default, + double? page = default, + global::Vapi.CampaignControllerFindAllV2SortOrder? sortOrder = default, + global::Vapi.CampaignControllerFindAllV2SortBy? sortBy = default, + double? limit = default, + global::System.DateTime? createdAtGt = default, + global::System.DateTime? createdAtLt = default, + global::System.DateTime? createdAtGe = default, + global::System.DateTime? createdAtLe = default, + global::System.DateTime? updatedAtGt = default, + global::System.DateTime? updatedAtLt = default, + global::System.DateTime? updatedAtGe = default, + global::System.DateTime? updatedAtLe = default, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Campaigns V2 + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CampaignControllerFindAllV2AsResponseAsync( + string? id = default, + global::Vapi.CampaignControllerFindAllV2Status? status = default, + double? page = default, + global::Vapi.CampaignControllerFindAllV2SortOrder? sortOrder = default, + global::Vapi.CampaignControllerFindAllV2SortBy? sortBy = default, + double? limit = default, + global::System.DateTime? createdAtGt = default, + global::System.DateTime? createdAtLt = default, + global::System.DateTime? createdAtGe = default, + global::System.DateTime? createdAtLe = default, + global::System.DateTime? updatedAtGt = default, + global::System.DateTime? updatedAtLt = default, + global::System.DateTime? updatedAtGe = default, + global::System.DateTime? updatedAtLe = default, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerFindOneV2.g.cs b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerFindOneV2.g.cs new file mode 100644 index 00000000..0644e956 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerFindOneV2.g.cs @@ -0,0 +1,30 @@ +#nullable enable + +namespace Vapi +{ + public partial interface ICampaignsClient + { + /// + /// Get Campaign V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CampaignControllerFindOneV2Async( + global::System.Guid id, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Campaign V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CampaignControllerFindOneV2AsResponseAsync( + global::System.Guid id, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerRemoveV2.g.cs b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerRemoveV2.g.cs new file mode 100644 index 00000000..7ef212a4 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerRemoveV2.g.cs @@ -0,0 +1,30 @@ +#nullable enable + +namespace Vapi +{ + public partial interface ICampaignsClient + { + /// + /// Delete Campaign + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CampaignControllerRemoveV2Async( + global::System.Guid id, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Campaign + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CampaignControllerRemoveV2AsResponseAsync( + global::System.Guid id, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerUpdate.g.cs b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerUpdate.g.cs index b5a9ac81..8486780c 100644 --- a/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerUpdate.g.cs +++ b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerUpdate.g.cs @@ -64,9 +64,8 @@ public partial interface ICampaignsClient /// Can only be updated if campaign is not in progress or has ended. /// /// - /// This is the status of the campaign.
- /// Can only be updated to 'ended' if you want to end the campaign.
- /// When set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete. + /// Set to 'cancelled' to stop the campaign ('ended' is a V1 alias). Scheduled
+ /// calls are deleted; in-progress calls are allowed to finish. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerUpdateV2.g.cs b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerUpdateV2.g.cs new file mode 100644 index 00000000..1e150a0f --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.ICampaignsClient.CampaignControllerUpdateV2.g.cs @@ -0,0 +1,86 @@ +#nullable enable + +namespace Vapi +{ + public partial interface ICampaignsClient + { + /// + /// Update Campaign + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CampaignControllerUpdateV2Async( + global::System.Guid id, + + global::Vapi.UpdateCampaignDTO request, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Campaign + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CampaignControllerUpdateV2AsResponseAsync( + global::System.Guid id, + + global::Vapi.UpdateCampaignDTO request, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Campaign + /// + /// + /// + /// This is the name of the campaign. This is just for your own reference. + /// + /// + /// This is the assistant ID that will be used for the campaign calls.
+ /// Can only be updated if campaign is not in progress or has ended. + /// + /// + /// This is the workflow ID that will be used for the campaign calls.
+ /// Can only be updated if campaign is not in progress or has ended. + /// + /// + /// This is the squad ID that will be used for the campaign calls.
+ /// Can only be updated if campaign is not in progress or has ended. + /// + /// + /// This is the phone number ID that will be used for the campaign calls.
+ /// Can only be updated if campaign is not in progress or has ended.
+ /// Note: `phoneNumberId` and `dialPlan` are mutually exclusive. + /// + /// + /// This is a list of dial entries, each specifying a phone number and the customers to call using that number. Can only be updated if campaign is not in progress or has ended. Note: phoneNumberId and dialPlan are mutually exclusive. + /// + /// + /// This is the schedule plan for the campaign.
+ /// Can only be updated if campaign is not in progress or has ended. + /// + /// + /// Set to 'cancelled' to stop the campaign ('ended' is a V1 alias). Scheduled
+ /// calls are deleted; in-progress calls are allowed to finish. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CampaignControllerUpdateV2Async( + global::System.Guid id, + string? name = default, + string? assistantId = default, + string? workflowId = default, + string? squadId = default, + string? phoneNumberId = default, + global::System.Collections.Generic.IList? dialPlan = default, + global::Vapi.SchedulePlan? schedulePlan = default, + global::Vapi.UpdateCampaignDTOStatus? status = default, + global::Vapi.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.ISessionsClient.SessionControllerFindAllPaginated.g.cs b/src/libs/Vapi/Generated/Vapi.ISessionsClient.SessionControllerFindAllPaginated.g.cs index 16548356..67e8f5f5 100644 --- a/src/libs/Vapi/Generated/Vapi.ISessionsClient.SessionControllerFindAllPaginated.g.cs +++ b/src/libs/Vapi/Generated/Vapi.ISessionsClient.SessionControllerFindAllPaginated.g.cs @@ -22,6 +22,7 @@ public partial interface ISessionsClient /// Example: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// + /// /// /// /// @@ -57,6 +58,7 @@ public partial interface ISessionsClient bool? numberE164CheckEnabled = default, string? extension = default, object? assistantOverrides = default, + object? squadOverrides = default, string? number = default, string? sipUri = default, string? customerName = default, @@ -97,6 +99,7 @@ public partial interface ISessionsClient /// Example: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// + /// /// /// /// @@ -132,6 +135,7 @@ public partial interface ISessionsClient bool? numberE164CheckEnabled = default, string? extension = default, object? assistantOverrides = default, + object? squadOverrides = default, string? number = default, string? sipUri = default, string? customerName = default, diff --git a/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2SortBy.g.cs b/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2SortBy.g.cs new file mode 100644 index 00000000..38135ca1 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2SortBy.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vapi.JsonConverters +{ + /// + public sealed class CampaignControllerFindAllV2SortByJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vapi.CampaignControllerFindAllV2SortBy Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vapi.CampaignControllerFindAllV2SortByExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vapi.CampaignControllerFindAllV2SortBy)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vapi.CampaignControllerFindAllV2SortBy); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vapi.CampaignControllerFindAllV2SortBy value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vapi.CampaignControllerFindAllV2SortByExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2SortByNullable.g.cs b/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2SortByNullable.g.cs new file mode 100644 index 00000000..c752f378 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2SortByNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vapi.JsonConverters +{ + /// + public sealed class CampaignControllerFindAllV2SortByNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vapi.CampaignControllerFindAllV2SortBy? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vapi.CampaignControllerFindAllV2SortByExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vapi.CampaignControllerFindAllV2SortBy)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vapi.CampaignControllerFindAllV2SortBy?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vapi.CampaignControllerFindAllV2SortBy? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Vapi.CampaignControllerFindAllV2SortByExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2SortOrder.g.cs b/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2SortOrder.g.cs new file mode 100644 index 00000000..7c0f8efe --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2SortOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vapi.JsonConverters +{ + /// + public sealed class CampaignControllerFindAllV2SortOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vapi.CampaignControllerFindAllV2SortOrder Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vapi.CampaignControllerFindAllV2SortOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vapi.CampaignControllerFindAllV2SortOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vapi.CampaignControllerFindAllV2SortOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vapi.CampaignControllerFindAllV2SortOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vapi.CampaignControllerFindAllV2SortOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderNullable.g.cs b/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderNullable.g.cs new file mode 100644 index 00000000..8680be5e --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vapi.JsonConverters +{ + /// + public sealed class CampaignControllerFindAllV2SortOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vapi.CampaignControllerFindAllV2SortOrder? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vapi.CampaignControllerFindAllV2SortOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vapi.CampaignControllerFindAllV2SortOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vapi.CampaignControllerFindAllV2SortOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vapi.CampaignControllerFindAllV2SortOrder? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Vapi.CampaignControllerFindAllV2SortOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2Status.g.cs b/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2Status.g.cs new file mode 100644 index 00000000..6eaafbda --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2Status.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vapi.JsonConverters +{ + /// + public sealed class CampaignControllerFindAllV2StatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vapi.CampaignControllerFindAllV2Status Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vapi.CampaignControllerFindAllV2StatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vapi.CampaignControllerFindAllV2Status)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vapi.CampaignControllerFindAllV2Status); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vapi.CampaignControllerFindAllV2Status value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vapi.CampaignControllerFindAllV2StatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2StatusNullable.g.cs b/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2StatusNullable.g.cs new file mode 100644 index 00000000..bc61ee2c --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.JsonConverters.CampaignControllerFindAllV2StatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vapi.JsonConverters +{ + /// + public sealed class CampaignControllerFindAllV2StatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vapi.CampaignControllerFindAllV2Status? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vapi.CampaignControllerFindAllV2StatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vapi.CampaignControllerFindAllV2Status)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vapi.CampaignControllerFindAllV2Status?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vapi.CampaignControllerFindAllV2Status? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Vapi.CampaignControllerFindAllV2StatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vapi/Generated/Vapi.JsonSerializerContext.g.cs b/src/libs/Vapi/Generated/Vapi.JsonSerializerContext.g.cs index 5e4f3f41..f6ba01f1 100644 --- a/src/libs/Vapi/Generated/Vapi.JsonSerializerContext.g.cs +++ b/src/libs/Vapi/Generated/Vapi.JsonSerializerContext.g.cs @@ -3973,6 +3973,18 @@ namespace Vapi typeof(global::Vapi.JsonConverters.CampaignControllerFindAllSortByNullableJsonConverter), + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusNullableJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderNullableJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByNullableJsonConverter), + typeof(global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderJsonConverter), typeof(global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderNullableJsonConverter), @@ -9542,6 +9554,18 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vapi.JsonConverters.CampaignControllerFindAllSortByNullableJsonConverter), + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusNullableJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderNullableJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByNullableJsonConverter), + typeof(global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderJsonConverter), typeof(global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderNullableJsonConverter), @@ -15111,6 +15135,18 @@ internal sealed partial class SourceGenerationContextChunk1 : global::System.Tex typeof(global::Vapi.JsonConverters.CampaignControllerFindAllSortByNullableJsonConverter), + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusNullableJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderNullableJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByNullableJsonConverter), + typeof(global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderJsonConverter), typeof(global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderNullableJsonConverter), @@ -20680,6 +20716,18 @@ internal sealed partial class SourceGenerationContextChunk2 : global::System.Tex typeof(global::Vapi.JsonConverters.CampaignControllerFindAllSortByNullableJsonConverter), + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusNullableJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderNullableJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByNullableJsonConverter), + typeof(global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderJsonConverter), typeof(global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderNullableJsonConverter), @@ -26249,6 +26297,18 @@ internal sealed partial class SourceGenerationContextChunk3 : global::System.Tex typeof(global::Vapi.JsonConverters.CampaignControllerFindAllSortByNullableJsonConverter), + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusNullableJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderNullableJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByNullableJsonConverter), + typeof(global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderJsonConverter), typeof(global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderNullableJsonConverter), @@ -31818,6 +31878,18 @@ internal sealed partial class SourceGenerationContextChunk4 : global::System.Tex typeof(global::Vapi.JsonConverters.CampaignControllerFindAllSortByNullableJsonConverter), + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusNullableJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderNullableJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByJsonConverter), + + typeof(global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByNullableJsonConverter), + typeof(global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderJsonConverter), typeof(global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderNullableJsonConverter), @@ -33040,6 +33112,9 @@ internal sealed partial class SourceGenerationContextChunk4 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.CampaignControllerFindAllStatus), TypeInfoPropertyName = "CampaignControllerFindAllStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.CampaignControllerFindAllSortOrder), TypeInfoPropertyName = "CampaignControllerFindAllSortOrder2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.CampaignControllerFindAllSortBy), TypeInfoPropertyName = "CampaignControllerFindAllSortBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.CampaignControllerFindAllV2Status), TypeInfoPropertyName = "CampaignControllerFindAllV2Status2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.CampaignControllerFindAllV2SortOrder), TypeInfoPropertyName = "CampaignControllerFindAllV2SortOrder2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.CampaignControllerFindAllV2SortBy), TypeInfoPropertyName = "CampaignControllerFindAllV2SortBy2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.SessionControllerFindAllPaginatedSortOrder), TypeInfoPropertyName = "SessionControllerFindAllPaginatedSortOrder2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.SessionControllerFindAllPaginatedSortBy), TypeInfoPropertyName = "SessionControllerFindAllPaginatedSortBy2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vapi.PhoneNumberControllerFindAllPaginatedSortOrder), TypeInfoPropertyName = "PhoneNumberControllerFindAllPaginatedSortOrder2")] @@ -35286,6 +35361,12 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vapi.JsonConverters.CampaignControllerFindAllSortOrderNullableJsonConverter()); options.Converters.Add(new global::Vapi.JsonConverters.CampaignControllerFindAllSortByJsonConverter()); options.Converters.Add(new global::Vapi.JsonConverters.CampaignControllerFindAllSortByNullableJsonConverter()); + options.Converters.Add(new global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusJsonConverter()); + options.Converters.Add(new global::Vapi.JsonConverters.CampaignControllerFindAllV2StatusNullableJsonConverter()); + options.Converters.Add(new global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderJsonConverter()); + options.Converters.Add(new global::Vapi.JsonConverters.CampaignControllerFindAllV2SortOrderNullableJsonConverter()); + options.Converters.Add(new global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByJsonConverter()); + options.Converters.Add(new global::Vapi.JsonConverters.CampaignControllerFindAllV2SortByNullableJsonConverter()); options.Converters.Add(new global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderJsonConverter()); options.Converters.Add(new global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortOrderNullableJsonConverter()); options.Converters.Add(new global::Vapi.JsonConverters.SessionControllerFindAllPaginatedSortByJsonConverter()); diff --git a/src/libs/Vapi/Generated/Vapi.JsonSerializerContextTypes.g.cs b/src/libs/Vapi/Generated/Vapi.JsonSerializerContextTypes.g.cs index 307ca26d..0477ab19 100644 --- a/src/libs/Vapi/Generated/Vapi.JsonSerializerContextTypes.g.cs +++ b/src/libs/Vapi/Generated/Vapi.JsonSerializerContextTypes.g.cs @@ -8660,307 +8660,319 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Vapi.SessionControllerFindAllPaginatedSortOrder? Type2158 { get; set; } + public global::Vapi.CampaignControllerFindAllV2Status? Type2158 { get; set; } /// /// /// - public global::Vapi.SessionControllerFindAllPaginatedSortBy? Type2159 { get; set; } + public global::Vapi.CampaignControllerFindAllV2SortOrder? Type2159 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerFindAllPaginatedSortOrder? Type2160 { get; set; } + public global::Vapi.CampaignControllerFindAllV2SortBy? Type2160 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerFindAllPaginatedSortBy? Type2161 { get; set; } + public global::Vapi.SessionControllerFindAllPaginatedSortOrder? Type2161 { get; set; } /// /// /// - public global::Vapi.StructuredOutputControllerFindAllSortOrder? Type2162 { get; set; } + public global::Vapi.SessionControllerFindAllPaginatedSortBy? Type2162 { get; set; } /// /// /// - public global::Vapi.StructuredOutputControllerFindAllSortBy? Type2163 { get; set; } + public global::Vapi.PhoneNumberControllerFindAllPaginatedSortOrder? Type2163 { get; set; } /// /// /// - public global::Vapi.InsightControllerFindAllSortOrder? Type2164 { get; set; } + public global::Vapi.PhoneNumberControllerFindAllPaginatedSortBy? Type2164 { get; set; } /// /// /// - public global::Vapi.InsightControllerFindAllSortBy? Type2165 { get; set; } + public global::Vapi.StructuredOutputControllerFindAllSortOrder? Type2165 { get; set; } /// /// /// - public global::Vapi.EvalControllerGetPaginatedSortOrder? Type2166 { get; set; } + public global::Vapi.StructuredOutputControllerFindAllSortBy? Type2166 { get; set; } /// /// /// - public global::Vapi.EvalControllerGetPaginatedSortBy? Type2167 { get; set; } + public global::Vapi.InsightControllerFindAllSortOrder? Type2167 { get; set; } /// /// /// - public global::Vapi.EvalControllerGetRunsPaginatedSortOrder? Type2168 { get; set; } + public global::Vapi.InsightControllerFindAllSortBy? Type2168 { get; set; } /// /// /// - public global::Vapi.EvalControllerGetRunsPaginatedSortBy? Type2169 { get; set; } + public global::Vapi.EvalControllerGetPaginatedSortOrder? Type2169 { get; set; } /// /// /// - public global::Vapi.ScorecardControllerGetPaginatedSortOrder? Type2170 { get; set; } + public global::Vapi.EvalControllerGetPaginatedSortBy? Type2170 { get; set; } /// /// /// - public global::Vapi.ScorecardControllerGetPaginatedSortBy? Type2171 { get; set; } + public global::Vapi.EvalControllerGetRunsPaginatedSortOrder? Type2171 { get; set; } /// /// /// - public global::Vapi.ProviderResourceControllerCreateProviderResourceProvider? Type2172 { get; set; } + public global::Vapi.EvalControllerGetRunsPaginatedSortBy? Type2172 { get; set; } /// /// /// - public global::Vapi.ProviderResourceControllerCreateProviderResourceResourceName? Type2173 { get; set; } + public global::Vapi.ScorecardControllerGetPaginatedSortOrder? Type2173 { get; set; } /// /// /// - public global::Vapi.ProviderResourceControllerGetProviderResourcesPaginatedProvider? Type2174 { get; set; } + public global::Vapi.ScorecardControllerGetPaginatedSortBy? Type2174 { get; set; } /// /// /// - public global::Vapi.ProviderResourceControllerGetProviderResourcesPaginatedResourceName? Type2175 { get; set; } + public global::Vapi.ProviderResourceControllerCreateProviderResourceProvider? Type2175 { get; set; } /// /// /// - public global::Vapi.ProviderResourceControllerGetProviderResourcesPaginatedSortOrder? Type2176 { get; set; } + public global::Vapi.ProviderResourceControllerCreateProviderResourceResourceName? Type2176 { get; set; } /// /// /// - public global::Vapi.ProviderResourceControllerGetProviderResourcesPaginatedSortBy? Type2177 { get; set; } + public global::Vapi.ProviderResourceControllerGetProviderResourcesPaginatedProvider? Type2177 { get; set; } /// /// /// - public global::Vapi.ProviderResourceControllerGetProviderResourceProvider? Type2178 { get; set; } + public global::Vapi.ProviderResourceControllerGetProviderResourcesPaginatedResourceName? Type2178 { get; set; } /// /// /// - public global::Vapi.ProviderResourceControllerGetProviderResourceResourceName? Type2179 { get; set; } + public global::Vapi.ProviderResourceControllerGetProviderResourcesPaginatedSortOrder? Type2179 { get; set; } /// /// /// - public global::Vapi.ProviderResourceControllerDeleteProviderResourceProvider? Type2180 { get; set; } + public global::Vapi.ProviderResourceControllerGetProviderResourcesPaginatedSortBy? Type2180 { get; set; } /// /// /// - public global::Vapi.ProviderResourceControllerDeleteProviderResourceResourceName? Type2181 { get; set; } + public global::Vapi.ProviderResourceControllerGetProviderResourceProvider? Type2181 { get; set; } /// /// /// - public global::Vapi.ProviderResourceControllerUpdateProviderResourceProvider? Type2182 { get; set; } + public global::Vapi.ProviderResourceControllerGetProviderResourceResourceName? Type2182 { get; set; } /// /// /// - public global::Vapi.ProviderResourceControllerUpdateProviderResourceResourceName? Type2183 { get; set; } + public global::Vapi.ProviderResourceControllerDeleteProviderResourceProvider? Type2183 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2184 { get; set; } + public global::Vapi.ProviderResourceControllerDeleteProviderResourceResourceName? Type2184 { get; set; } /// /// /// - public global::Vapi.OneOf? Type2185 { get; set; } + public global::Vapi.ProviderResourceControllerUpdateProviderResourceProvider? Type2185 { get; set; } /// /// /// - public global::Vapi.OneOf? Type2186 { get; set; } + public global::Vapi.ProviderResourceControllerUpdateProviderResourceResourceName? Type2186 { get; set; } /// /// /// - public global::Vapi.OneOf? Type2187 { get; set; } + public global::System.Collections.Generic.IList? Type2187 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerCreateResponse? Type2188 { get; set; } + public global::Vapi.OneOf? Type2188 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerCreateResponseDiscriminator? Type2189 { get; set; } + public global::Vapi.OneOf? Type2189 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerCreateResponseDiscriminatorProvider? Type2190 { get; set; } + public global::Vapi.OneOf? Type2190 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2191 { get; set; } + public global::Vapi.PhoneNumberControllerCreateResponse? Type2191 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerFindAllResponseItem? Type2192 { get; set; } + public global::Vapi.PhoneNumberControllerCreateResponseDiscriminator? Type2192 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerFindAllResponseItemDiscriminator? Type2193 { get; set; } + public global::Vapi.PhoneNumberControllerCreateResponseDiscriminatorProvider? Type2193 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerFindAllResponseItemDiscriminatorProvider? Type2194 { get; set; } + public global::System.Collections.Generic.IList? Type2194 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerFindOneResponse? Type2195 { get; set; } + public global::Vapi.PhoneNumberControllerFindAllResponseItem? Type2195 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerFindOneResponseDiscriminator? Type2196 { get; set; } + public global::Vapi.PhoneNumberControllerFindAllResponseItemDiscriminator? Type2196 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerFindOneResponseDiscriminatorProvider? Type2197 { get; set; } + public global::Vapi.PhoneNumberControllerFindAllResponseItemDiscriminatorProvider? Type2197 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerUpdateResponse? Type2198 { get; set; } + public global::Vapi.PhoneNumberControllerFindOneResponse? Type2198 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerUpdateResponseDiscriminator? Type2199 { get; set; } + public global::Vapi.PhoneNumberControllerFindOneResponseDiscriminator? Type2199 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerUpdateResponseDiscriminatorProvider? Type2200 { get; set; } + public global::Vapi.PhoneNumberControllerFindOneResponseDiscriminatorProvider? Type2200 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerRemoveResponse? Type2201 { get; set; } + public global::Vapi.PhoneNumberControllerUpdateResponse? Type2201 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerRemoveResponseDiscriminator? Type2202 { get; set; } + public global::Vapi.PhoneNumberControllerUpdateResponseDiscriminator? Type2202 { get; set; } /// /// /// - public global::Vapi.PhoneNumberControllerRemoveResponseDiscriminatorProvider? Type2203 { get; set; } + public global::Vapi.PhoneNumberControllerUpdateResponseDiscriminatorProvider? Type2203 { get; set; } /// /// /// - public global::Vapi.ToolControllerCreateResponse? Type2204 { get; set; } + public global::Vapi.PhoneNumberControllerRemoveResponse? Type2204 { get; set; } /// /// /// - public global::Vapi.ToolControllerCreateResponseDiscriminator? Type2205 { get; set; } + public global::Vapi.PhoneNumberControllerRemoveResponseDiscriminator? Type2205 { get; set; } /// /// /// - public global::Vapi.ToolControllerCreateResponseDiscriminatorType? Type2206 { get; set; } + public global::Vapi.PhoneNumberControllerRemoveResponseDiscriminatorProvider? Type2206 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2207 { get; set; } + public global::Vapi.ToolControllerCreateResponse? Type2207 { get; set; } /// /// /// - public global::Vapi.ToolControllerFindAllResponseItem? Type2208 { get; set; } + public global::Vapi.ToolControllerCreateResponseDiscriminator? Type2208 { get; set; } /// /// /// - public global::Vapi.ToolControllerFindAllResponseItemDiscriminator? Type2209 { get; set; } + public global::Vapi.ToolControllerCreateResponseDiscriminatorType? Type2209 { get; set; } /// /// /// - public global::Vapi.ToolControllerFindAllResponseItemDiscriminatorType? Type2210 { get; set; } + public global::System.Collections.Generic.IList? Type2210 { get; set; } /// /// /// - public global::Vapi.ToolControllerFindOneResponse? Type2211 { get; set; } + public global::Vapi.ToolControllerFindAllResponseItem? Type2211 { get; set; } /// /// /// - public global::Vapi.ToolControllerFindOneResponseDiscriminator? Type2212 { get; set; } + public global::Vapi.ToolControllerFindAllResponseItemDiscriminator? Type2212 { get; set; } /// /// /// - public global::Vapi.ToolControllerFindOneResponseDiscriminatorType? Type2213 { get; set; } + public global::Vapi.ToolControllerFindAllResponseItemDiscriminatorType? Type2213 { get; set; } /// /// /// - public global::Vapi.ToolControllerUpdateResponse? Type2214 { get; set; } + public global::Vapi.ToolControllerFindOneResponse? Type2214 { get; set; } /// /// /// - public global::Vapi.ToolControllerUpdateResponseDiscriminator? Type2215 { get; set; } + public global::Vapi.ToolControllerFindOneResponseDiscriminator? Type2215 { get; set; } /// /// /// - public global::Vapi.ToolControllerUpdateResponseDiscriminatorType? Type2216 { get; set; } + public global::Vapi.ToolControllerFindOneResponseDiscriminatorType? Type2216 { get; set; } /// /// /// - public global::Vapi.ToolControllerRemoveResponse? Type2217 { get; set; } + public global::Vapi.ToolControllerUpdateResponse? Type2217 { get; set; } /// /// /// - public global::Vapi.ToolControllerRemoveResponseDiscriminator? Type2218 { get; set; } + public global::Vapi.ToolControllerUpdateResponseDiscriminator? Type2218 { get; set; } /// /// /// - public global::Vapi.ToolControllerRemoveResponseDiscriminatorType? Type2219 { get; set; } + public global::Vapi.ToolControllerUpdateResponseDiscriminatorType? Type2219 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2220 { get; set; } + public global::Vapi.ToolControllerRemoveResponse? Type2220 { get; set; } /// /// /// - public global::Vapi.InsightControllerCreateResponse? Type2221 { get; set; } + public global::Vapi.ToolControllerRemoveResponseDiscriminator? Type2221 { get; set; } /// /// /// - public global::Vapi.InsightControllerCreateResponseDiscriminator? Type2222 { get; set; } + public global::Vapi.ToolControllerRemoveResponseDiscriminatorType? Type2222 { get; set; } /// /// /// - public global::Vapi.InsightControllerCreateResponseDiscriminatorType? Type2223 { get; set; } + public global::System.Collections.Generic.IList? Type2223 { get; set; } /// /// /// - public global::Vapi.InsightControllerUpdateResponse? Type2224 { get; set; } + public global::Vapi.InsightControllerCreateResponse? Type2224 { get; set; } /// /// /// - public global::Vapi.InsightControllerUpdateResponseDiscriminator? Type2225 { get; set; } + public global::Vapi.InsightControllerCreateResponseDiscriminator? Type2225 { get; set; } /// /// /// - public global::Vapi.InsightControllerUpdateResponseDiscriminatorType? Type2226 { get; set; } + public global::Vapi.InsightControllerCreateResponseDiscriminatorType? Type2226 { get; set; } /// /// /// - public global::Vapi.InsightControllerFindOneResponse? Type2227 { get; set; } + public global::Vapi.InsightControllerUpdateResponse? Type2227 { get; set; } /// /// /// - public global::Vapi.InsightControllerFindOneResponseDiscriminator? Type2228 { get; set; } + public global::Vapi.InsightControllerUpdateResponseDiscriminator? Type2228 { get; set; } /// /// /// - public global::Vapi.InsightControllerFindOneResponseDiscriminatorType? Type2229 { get; set; } + public global::Vapi.InsightControllerUpdateResponseDiscriminatorType? Type2229 { get; set; } /// /// /// - public global::Vapi.InsightControllerRemoveResponse? Type2230 { get; set; } + public global::Vapi.InsightControllerFindOneResponse? Type2230 { get; set; } /// /// /// - public global::Vapi.InsightControllerRemoveResponseDiscriminator? Type2231 { get; set; } + public global::Vapi.InsightControllerFindOneResponseDiscriminator? Type2231 { get; set; } /// /// /// - public global::Vapi.InsightControllerRemoveResponseDiscriminatorType? Type2232 { get; set; } + public global::Vapi.InsightControllerFindOneResponseDiscriminatorType? Type2232 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2233 { get; set; } + public global::Vapi.InsightControllerRemoveResponse? Type2233 { get; set; } + /// + /// + /// + public global::Vapi.InsightControllerRemoveResponseDiscriminator? Type2234 { get; set; } + /// + /// + /// + public global::Vapi.InsightControllerRemoveResponseDiscriminatorType? Type2235 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2236 { get; set; } /// /// diff --git a/src/libs/Vapi/Generated/Vapi.Models.Campaign.g.cs b/src/libs/Vapi/Generated/Vapi.Models.Campaign.g.cs index c1c5471d..65fc0b92 100644 --- a/src/libs/Vapi/Generated/Vapi.Models.Campaign.g.cs +++ b/src/libs/Vapi/Generated/Vapi.Models.Campaign.g.cs @@ -74,6 +74,24 @@ public sealed partial class Campaign [global::System.Text.Json.Serialization.JsonPropertyName("customers")] public global::System.Collections.Generic.IList? Customers { get; set; } + /// + /// This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("maxConcurrency")] + public double? MaxConcurrency { get; set; } + + /// + /// These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("assistantOverrides")] + public global::Vapi.AssistantOverrides? AssistantOverrides { get; set; } + + /// + /// These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a `squadId`. Per-contact `squadOverrides` are deep-merged on top of this at dispatch time. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("squadOverrides")] + public global::Vapi.AssistantOverrides? SquadOverrides { get; set; } + /// /// This is the unique identifier for the campaign. /// @@ -214,6 +232,15 @@ public sealed partial class Campaign /// /// These are the customers that will be called in the campaign. Required if dialPlan is not provided. /// + /// + /// This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10. + /// + /// + /// These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`. + /// + /// + /// These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a `squadId`. Per-contact `squadOverrides` are deep-merged on top of this at dispatch time. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -237,7 +264,10 @@ public Campaign( string? phoneNumberId, global::System.Collections.Generic.IList? dialPlan, global::Vapi.SchedulePlan? schedulePlan, - global::System.Collections.Generic.IList? customers) + global::System.Collections.Generic.IList? customers, + double? maxConcurrency, + global::Vapi.AssistantOverrides? assistantOverrides, + global::Vapi.AssistantOverrides? squadOverrides) { this.Status = status; this.EndedReason = endedReason; @@ -249,6 +279,9 @@ public Campaign( this.DialPlan = dialPlan; this.SchedulePlan = schedulePlan; this.Customers = customers; + this.MaxConcurrency = maxConcurrency; + this.AssistantOverrides = assistantOverrides; + this.SquadOverrides = squadOverrides; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.OrgId = orgId ?? throw new global::System.ArgumentNullException(nameof(orgId)); this.CreatedAt = createdAt; diff --git a/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllStatus.g.cs b/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllStatus.g.cs index 8cf02a48..c7c30f8b 100644 --- a/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllStatus.g.cs +++ b/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllStatus.g.cs @@ -8,6 +8,14 @@ namespace Vapi /// public enum CampaignControllerFindAllStatus { + /// + /// + /// + Archived, + /// + /// + /// + Cancelled, /// /// /// @@ -34,6 +42,8 @@ public static string ToValueString(this CampaignControllerFindAllStatus value) { return value switch { + CampaignControllerFindAllStatus.Archived => "archived", + CampaignControllerFindAllStatus.Cancelled => "cancelled", CampaignControllerFindAllStatus.Ended => "ended", CampaignControllerFindAllStatus.InProgress => "in-progress", CampaignControllerFindAllStatus.Scheduled => "scheduled", @@ -47,6 +57,8 @@ public static string ToValueString(this CampaignControllerFindAllStatus value) { return value switch { + "archived" => CampaignControllerFindAllStatus.Archived, + "cancelled" => CampaignControllerFindAllStatus.Cancelled, "ended" => CampaignControllerFindAllStatus.Ended, "in-progress" => CampaignControllerFindAllStatus.InProgress, "scheduled" => CampaignControllerFindAllStatus.Scheduled, diff --git a/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllV2SortBy.g.cs b/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllV2SortBy.g.cs new file mode 100644 index 00000000..41677250 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllV2SortBy.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Vapi +{ + /// + /// + /// + public enum CampaignControllerFindAllV2SortBy + { + /// + /// + /// + Cost, + /// + /// + /// + CreatedAt, + /// + /// + /// + Duration, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CampaignControllerFindAllV2SortByExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CampaignControllerFindAllV2SortBy value) + { + return value switch + { + CampaignControllerFindAllV2SortBy.Cost => "cost", + CampaignControllerFindAllV2SortBy.CreatedAt => "createdAt", + CampaignControllerFindAllV2SortBy.Duration => "duration", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CampaignControllerFindAllV2SortBy? ToEnum(string value) + { + return value switch + { + "cost" => CampaignControllerFindAllV2SortBy.Cost, + "createdAt" => CampaignControllerFindAllV2SortBy.CreatedAt, + "duration" => CampaignControllerFindAllV2SortBy.Duration, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllV2SortOrder.g.cs b/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllV2SortOrder.g.cs new file mode 100644 index 00000000..3330acd4 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllV2SortOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Vapi +{ + /// + /// + /// + public enum CampaignControllerFindAllV2SortOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CampaignControllerFindAllV2SortOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CampaignControllerFindAllV2SortOrder value) + { + return value switch + { + CampaignControllerFindAllV2SortOrder.Asc => "ASC", + CampaignControllerFindAllV2SortOrder.Desc => "DESC", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CampaignControllerFindAllV2SortOrder? ToEnum(string value) + { + return value switch + { + "ASC" => CampaignControllerFindAllV2SortOrder.Asc, + "DESC" => CampaignControllerFindAllV2SortOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllV2Status.g.cs b/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllV2Status.g.cs new file mode 100644 index 00000000..9fac6b79 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.Models.CampaignControllerFindAllV2Status.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace Vapi +{ + /// + /// + /// + public enum CampaignControllerFindAllV2Status + { + /// + /// + /// + Archived, + /// + /// + /// + Cancelled, + /// + /// + /// + Ended, + /// + /// + /// + InProgress, + /// + /// + /// + Scheduled, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CampaignControllerFindAllV2StatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CampaignControllerFindAllV2Status value) + { + return value switch + { + CampaignControllerFindAllV2Status.Archived => "archived", + CampaignControllerFindAllV2Status.Cancelled => "cancelled", + CampaignControllerFindAllV2Status.Ended => "ended", + CampaignControllerFindAllV2Status.InProgress => "in-progress", + CampaignControllerFindAllV2Status.Scheduled => "scheduled", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CampaignControllerFindAllV2Status? ToEnum(string value) + { + return value switch + { + "archived" => CampaignControllerFindAllV2Status.Archived, + "cancelled" => CampaignControllerFindAllV2Status.Cancelled, + "ended" => CampaignControllerFindAllV2Status.Ended, + "in-progress" => CampaignControllerFindAllV2Status.InProgress, + "scheduled" => CampaignControllerFindAllV2Status.Scheduled, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.Models.CampaignStatus.g.cs b/src/libs/Vapi/Generated/Vapi.Models.CampaignStatus.g.cs index 79f8ef83..d6e04f92 100644 --- a/src/libs/Vapi/Generated/Vapi.Models.CampaignStatus.g.cs +++ b/src/libs/Vapi/Generated/Vapi.Models.CampaignStatus.g.cs @@ -8,6 +8,14 @@ namespace Vapi /// public enum CampaignStatus { + /// + /// + /// + Archived, + /// + /// + /// + Cancelled, /// /// /// @@ -34,6 +42,8 @@ public static string ToValueString(this CampaignStatus value) { return value switch { + CampaignStatus.Archived => "archived", + CampaignStatus.Cancelled => "cancelled", CampaignStatus.Ended => "ended", CampaignStatus.InProgress => "in-progress", CampaignStatus.Scheduled => "scheduled", @@ -47,6 +57,8 @@ public static string ToValueString(this CampaignStatus value) { return value switch { + "archived" => CampaignStatus.Archived, + "cancelled" => CampaignStatus.Cancelled, "ended" => CampaignStatus.Ended, "in-progress" => CampaignStatus.InProgress, "scheduled" => CampaignStatus.Scheduled, diff --git a/src/libs/Vapi/Generated/Vapi.Models.CreateCampaignDTO.g.cs b/src/libs/Vapi/Generated/Vapi.Models.CreateCampaignDTO.g.cs index fe699752..9330ad39 100644 --- a/src/libs/Vapi/Generated/Vapi.Models.CreateCampaignDTO.g.cs +++ b/src/libs/Vapi/Generated/Vapi.Models.CreateCampaignDTO.g.cs @@ -59,6 +59,30 @@ public sealed partial class CreateCampaignDTO [global::System.Text.Json.Serialization.JsonPropertyName("customers")] public global::System.Collections.Generic.IList? Customers { get; set; } + /// + /// This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("maxConcurrency")] + public double? MaxConcurrency { get; set; } + + /// + /// These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("assistantOverrides")] + public global::Vapi.AssistantOverrides? AssistantOverrides { get; set; } + + /// + /// These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a `squadId`. Per-contact `squadOverrides` are deep-merged on top of this at dispatch time. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("squadOverrides")] + public global::Vapi.AssistantOverrides? SquadOverrides { get; set; } + + /// + /// Optional campaign ID to duplicate config from. Provided fields in the request override the source. If `customers` is omitted, contacts are copied from the source. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("duplicateFromCampaignId")] + public string? DuplicateFromCampaignId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -93,6 +117,18 @@ public sealed partial class CreateCampaignDTO /// /// These are the customers that will be called in the campaign. Required if dialPlan is not provided. /// + /// + /// This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10. + /// + /// + /// These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`. + /// + /// + /// These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a `squadId`. Per-contact `squadOverrides` are deep-merged on top of this at dispatch time. + /// + /// + /// Optional campaign ID to duplicate config from. Provided fields in the request override the source. If `customers` is omitted, contacts are copied from the source. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -104,7 +140,11 @@ public CreateCampaignDTO( string? phoneNumberId, global::System.Collections.Generic.IList? dialPlan, global::Vapi.SchedulePlan? schedulePlan, - global::System.Collections.Generic.IList? customers) + global::System.Collections.Generic.IList? customers, + double? maxConcurrency, + global::Vapi.AssistantOverrides? assistantOverrides, + global::Vapi.AssistantOverrides? squadOverrides, + string? duplicateFromCampaignId) { this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.AssistantId = assistantId; @@ -114,6 +154,10 @@ public CreateCampaignDTO( this.DialPlan = dialPlan; this.SchedulePlan = schedulePlan; this.Customers = customers; + this.MaxConcurrency = maxConcurrency; + this.AssistantOverrides = assistantOverrides; + this.SquadOverrides = squadOverrides; + this.DuplicateFromCampaignId = duplicateFromCampaignId; } /// diff --git a/src/libs/Vapi/Generated/Vapi.Models.CreateCustomerDTO.g.cs b/src/libs/Vapi/Generated/Vapi.Models.CreateCustomerDTO.g.cs index 0171316c..f00c8843 100644 --- a/src/libs/Vapi/Generated/Vapi.Models.CreateCustomerDTO.g.cs +++ b/src/libs/Vapi/Generated/Vapi.Models.CreateCustomerDTO.g.cs @@ -35,6 +35,14 @@ public sealed partial class CreateCustomerDTO [global::System.Text.Json.Serialization.JsonPropertyName("assistantOverrides")] public global::Vapi.AssistantOverrides? AssistantOverrides { get; set; } + /// + /// These are the overrides applied when the call targets a `squadId`. Mirrors
+ /// the call-level `squadOverrides` — use this instead of `assistantOverrides`
+ /// when the campaign or call is squad-based. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("squadOverrides")] + public global::Vapi.AssistantOverrides? SquadOverrides { get; set; } + /// /// This is the number of the customer. /// @@ -92,6 +100,11 @@ public sealed partial class CreateCustomerDTO /// These are the overrides for the assistant's settings and template variables specific to this customer.
/// This allows customization of the assistant's behavior for individual customers in batch calls. /// + /// + /// These are the overrides applied when the call targets a `squadId`. Mirrors
+ /// the call-level `squadOverrides` — use this instead of `assistantOverrides`
+ /// when the campaign or call is squad-based. + /// /// /// This is the number of the customer. /// @@ -115,6 +128,7 @@ public CreateCustomerDTO( bool? numberE164CheckEnabled, string? extension, global::Vapi.AssistantOverrides? assistantOverrides, + global::Vapi.AssistantOverrides? squadOverrides, string? number, string? sipUri, string? name, @@ -124,6 +138,7 @@ public CreateCustomerDTO( this.NumberE164CheckEnabled = numberE164CheckEnabled; this.Extension = extension; this.AssistantOverrides = assistantOverrides; + this.SquadOverrides = squadOverrides; this.Number = number; this.SipUri = sipUri; this.Name = name; diff --git a/src/libs/Vapi/Generated/Vapi.Models.PaginationMeta.g.cs b/src/libs/Vapi/Generated/Vapi.Models.PaginationMeta.g.cs index 76938784..e35f28c4 100644 --- a/src/libs/Vapi/Generated/Vapi.Models.PaginationMeta.g.cs +++ b/src/libs/Vapi/Generated/Vapi.Models.PaginationMeta.g.cs @@ -41,6 +41,14 @@ public sealed partial class PaginationMeta [global::System.Text.Json.Serialization.JsonPropertyName("hasNextPage")] public bool? HasNextPage { get; set; } + /// + /// Opaque cursor for the next page under keyset pagination (PRO-3163). Pass it
+ /// back as the `cursor` query param to fetch the next page without an OFFSET
+ /// scan. Present only when a further page likely exists. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("nextCursor")] + public string? NextCursor { get; set; } + /// /// /// @@ -80,6 +88,11 @@ public sealed partial class PaginationMeta /// /// /// + /// + /// Opaque cursor for the next page under keyset pagination (PRO-3163). Pass it
+ /// back as the `cursor` query param to fetch the next page without an OFFSET
+ /// scan. Present only when a further page likely exists. + /// /// /// /// @@ -93,6 +106,7 @@ public PaginationMeta( double currentPage, double? totalPages, bool? hasNextPage, + string? nextCursor, global::Vapi.PaginationMetaSortOrder? sortOrder, bool? itemsBeyondRetention, global::System.DateTime? createdAtLe, @@ -103,6 +117,7 @@ public PaginationMeta( this.CurrentPage = currentPage; this.TotalPages = totalPages; this.HasNextPage = hasNextPage; + this.NextCursor = nextCursor; this.SortOrder = sortOrder; this.ItemsBeyondRetention = itemsBeyondRetention; this.CreatedAtLe = createdAtLe; diff --git a/src/libs/Vapi/Generated/Vapi.Models.SessionControllerFindAllPaginatedSquadOverrides.Json.g.cs b/src/libs/Vapi/Generated/Vapi.Models.SessionControllerFindAllPaginatedSquadOverrides.Json.g.cs new file mode 100644 index 00000000..b4765fa2 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.Models.SessionControllerFindAllPaginatedSquadOverrides.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Vapi +{ + public sealed partial class SessionControllerFindAllPaginatedSquadOverrides + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Vapi.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Vapi.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vapi.SessionControllerFindAllPaginatedSquadOverrides? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vapi.SessionControllerFindAllPaginatedSquadOverrides), + jsonSerializerContext) as global::Vapi.SessionControllerFindAllPaginatedSquadOverrides; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Vapi.SessionControllerFindAllPaginatedSquadOverrides? FromJson( + string json) + { + return FromJson( + json, + global::Vapi.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vapi.SessionControllerFindAllPaginatedSquadOverrides? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Vapi.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vapi.SessionControllerFindAllPaginatedSquadOverrides), + jsonSerializerContext).ConfigureAwait(false)) as global::Vapi.SessionControllerFindAllPaginatedSquadOverrides; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Vapi.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Vapi.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vapi/Generated/Vapi.Models.SessionControllerFindAllPaginatedSquadOverrides.g.cs b/src/libs/Vapi/Generated/Vapi.Models.SessionControllerFindAllPaginatedSquadOverrides.g.cs new file mode 100644 index 00000000..d2003e29 --- /dev/null +++ b/src/libs/Vapi/Generated/Vapi.Models.SessionControllerFindAllPaginatedSquadOverrides.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Vapi +{ + /// + /// + /// + public sealed partial class SessionControllerFindAllPaginatedSquadOverrides + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Vapi/Generated/Vapi.Models.UpdateCampaignDTO.g.cs b/src/libs/Vapi/Generated/Vapi.Models.UpdateCampaignDTO.g.cs index 9d0c7c67..8712be03 100644 --- a/src/libs/Vapi/Generated/Vapi.Models.UpdateCampaignDTO.g.cs +++ b/src/libs/Vapi/Generated/Vapi.Models.UpdateCampaignDTO.g.cs @@ -57,9 +57,8 @@ public sealed partial class UpdateCampaignDTO public global::Vapi.SchedulePlan? SchedulePlan { get; set; } /// - /// This is the status of the campaign.
- /// Can only be updated to 'ended' if you want to end the campaign.
- /// When set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete. + /// Set to 'cancelled' to stop the campaign ('ended' is a V1 alias). Scheduled
+ /// calls are deleted; in-progress calls are allowed to finish. ///
[global::System.Text.Json.Serialization.JsonPropertyName("status")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vapi.JsonConverters.UpdateCampaignDTOStatusJsonConverter))] @@ -102,9 +101,8 @@ public sealed partial class UpdateCampaignDTO /// Can only be updated if campaign is not in progress or has ended. /// /// - /// This is the status of the campaign.
- /// Can only be updated to 'ended' if you want to end the campaign.
- /// When set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete. + /// Set to 'cancelled' to stop the campaign ('ended' is a V1 alias). Scheduled
+ /// calls are deleted; in-progress calls are allowed to finish. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/Vapi/Generated/Vapi.Models.UpdateCampaignDTOStatus.g.cs b/src/libs/Vapi/Generated/Vapi.Models.UpdateCampaignDTOStatus.g.cs index e15088e9..0bef8296 100644 --- a/src/libs/Vapi/Generated/Vapi.Models.UpdateCampaignDTOStatus.g.cs +++ b/src/libs/Vapi/Generated/Vapi.Models.UpdateCampaignDTOStatus.g.cs @@ -4,12 +4,15 @@ namespace Vapi { /// - /// This is the status of the campaign.
- /// Can only be updated to 'ended' if you want to end the campaign.
- /// When set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete. + /// Set to 'cancelled' to stop the campaign ('ended' is a V1 alias). Scheduled
+ /// calls are deleted; in-progress calls are allowed to finish. ///
public enum UpdateCampaignDTOStatus { + /// + /// + /// + Cancelled, /// /// /// @@ -28,6 +31,7 @@ public static string ToValueString(this UpdateCampaignDTOStatus value) { return value switch { + UpdateCampaignDTOStatus.Cancelled => "cancelled", UpdateCampaignDTOStatus.Ended => "ended", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; @@ -39,6 +43,7 @@ public static string ToValueString(this UpdateCampaignDTOStatus value) { return value switch { + "cancelled" => UpdateCampaignDTOStatus.Cancelled, "ended" => UpdateCampaignDTOStatus.Ended, _ => null, }; diff --git a/src/libs/Vapi/Generated/Vapi.SessionsClient.SessionControllerFindAllPaginated.g.cs b/src/libs/Vapi/Generated/Vapi.SessionsClient.SessionControllerFindAllPaginated.g.cs index 5ed74933..e2308066 100644 --- a/src/libs/Vapi/Generated/Vapi.SessionsClient.SessionControllerFindAllPaginated.g.cs +++ b/src/libs/Vapi/Generated/Vapi.SessionsClient.SessionControllerFindAllPaginated.g.cs @@ -36,6 +36,7 @@ partial void PrepareSessionControllerFindAllPaginatedArguments( ref bool? numberE164CheckEnabled, ref string? extension, object? assistantOverrides, + object? squadOverrides, ref string? number, ref string? sipUri, ref string? customerName, @@ -68,6 +69,7 @@ partial void PrepareSessionControllerFindAllPaginatedRequest( bool? numberE164CheckEnabled, string? extension, object? assistantOverrides, + object? squadOverrides, string? number, string? sipUri, string? customerName, @@ -115,6 +117,7 @@ partial void ProcessSessionControllerFindAllPaginatedResponseContent( /// Example: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// + /// /// /// /// @@ -150,6 +153,7 @@ partial void ProcessSessionControllerFindAllPaginatedResponseContent( bool? numberE164CheckEnabled = default, string? extension = default, object? assistantOverrides = default, + object? squadOverrides = default, string? number = default, string? sipUri = default, string? customerName = default, @@ -183,6 +187,7 @@ partial void ProcessSessionControllerFindAllPaginatedResponseContent( numberE164CheckEnabled: numberE164CheckEnabled, extension: extension, assistantOverrides: assistantOverrides, + squadOverrides: squadOverrides, number: number, sipUri: sipUri, customerName: customerName, @@ -227,6 +232,7 @@ partial void ProcessSessionControllerFindAllPaginatedResponseContent( /// Example: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// + /// /// /// /// @@ -262,6 +268,7 @@ partial void ProcessSessionControllerFindAllPaginatedResponseContent( bool? numberE164CheckEnabled = default, string? extension = default, object? assistantOverrides = default, + object? squadOverrides = default, string? number = default, string? sipUri = default, string? customerName = default, @@ -298,6 +305,7 @@ partial void ProcessSessionControllerFindAllPaginatedResponseContent( numberE164CheckEnabled: ref numberE164CheckEnabled, extension: ref extension, assistantOverrides: assistantOverrides, + squadOverrides: squadOverrides, number: ref number, sipUri: ref sipUri, customerName: ref customerName, @@ -355,6 +363,7 @@ partial void ProcessSessionControllerFindAllPaginatedResponseContent( .AddOptionalParameter("numberE164CheckEnabled", numberE164CheckEnabled?.ToString().ToLowerInvariant()) .AddOptionalParameter("extension", extension) .AddOptionalParameter("assistantOverrides", assistantOverrides?.ToString()) + .AddOptionalParameter("squadOverrides", squadOverrides?.ToString()) .AddOptionalParameter("number", number) .AddOptionalParameter("sipUri", sipUri) .AddOptionalParameter("customerName", customerName) @@ -425,6 +434,7 @@ partial void ProcessSessionControllerFindAllPaginatedResponseContent( numberE164CheckEnabled: numberE164CheckEnabled, extension: extension, assistantOverrides: assistantOverrides, + squadOverrides: squadOverrides, number: number, sipUri: sipUri, customerName: customerName, diff --git a/src/libs/Vapi/openapi.yaml b/src/libs/Vapi/openapi.yaml index 441ab086..9793d5ce 100644 --- a/src/libs/Vapi/openapi.yaml +++ b/src/libs/Vapi/openapi.yaml @@ -1596,6 +1596,8 @@ "in": "query", "schema": { "enum": [ + "archived", + "cancelled", "ended", "in-progress", "scheduled" @@ -1754,6 +1756,340 @@ ] } }, + "/v2/campaign": { + "post": { + "operationId": "CampaignController_createV2", + "summary": "Create Campaign V2", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCampaignDTO" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Campaign" + } + } + } + } + }, + "tags": [ + "Campaigns" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "get": { + "operationId": "CampaignController_findAllV2", + "summary": "List Campaigns V2", + "parameters": [ + { + "name": "id", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "status", + "required": false, + "in": "query", + "schema": { + "enum": [ + "archived", + "cancelled", + "ended", + "in-progress", + "scheduled" + ], + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "description": "This is the page number to return. Defaults to 1.", + "schema": { + "minimum": 1, + "type": "number" + } + }, + { + "name": "sortOrder", + "required": false, + "in": "query", + "description": "This is the sort order for pagination. Defaults to 'DESC'.", + "schema": { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + }, + { + "name": "sortBy", + "required": false, + "in": "query", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "schema": { + "enum": [ + "cost", + "createdAt", + "duration" + ], + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "This is the maximum number of items to return. Defaults to 100.", + "schema": { + "minimum": 0, + "maximum": 1000, + "type": "number" + } + }, + { + "name": "createdAtGt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtGe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CampaignPaginatedResponse" + } + } + } + } + }, + "tags": [ + "Campaigns" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/v2/campaign/{id}": { + "get": { + "operationId": "CampaignController_findOneV2", + "summary": "Get Campaign V2", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "The unique identifier for the resource.", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Campaign" + } + } + } + } + }, + "tags": [ + "Campaigns" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "patch": { + "operationId": "CampaignController_updateV2", + "summary": "Update Campaign", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "The unique identifier for the resource.", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCampaignDTO" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Campaign" + } + } + } + } + }, + "tags": [ + "Campaigns" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "operationId": "CampaignController_removeV2", + "summary": "Delete Campaign", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "The unique identifier for the resource.", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Campaign" + } + } + } + } + }, + "tags": [ + "Campaigns" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, "/campaign/{id}": { "get": { "operationId": "CampaignController_findOne", @@ -2002,6 +2338,18 @@ "in": "query", "schema": {} }, + { + "name": "squadOverrides", + "required": false, + "description": "These are the overrides applied when the call targets a `squadId`. Mirrors\nthe call-level `squadOverrides` — use this instead of `assistantOverrides`\nwhen the campaign or call is squad-based.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ], + "in": "query", + "schema": {} + }, { "required": false, "description": "This is the number of the customer.", @@ -31595,6 +31943,10 @@ "hasNextPage": { "type": "boolean" }, + "nextCursor": { + "type": "string", + "description": "Opaque cursor for the next page under keyset pagination (PRO-3163). Pass it\nback as the `cursor` query param to fetch the next page without an OFFSET\nscan. Present only when a further page likely exists." + }, "sortOrder": { "type": "string", "enum": [ @@ -36301,6 +36653,14 @@ } ] }, + "squadOverrides": { + "description": "These are the overrides applied when the call targets a `squadId`. Mirrors\nthe call-level `squadOverrides` — use this instead of `assistantOverrides`\nwhen the campaign or call is squad-based.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, "number": { "type": "string", "description": "This is the number of the customer.", @@ -39425,6 +39785,31 @@ "items": { "$ref": "#/components/schemas/CreateCustomerDTO" } + }, + "maxConcurrency": { + "type": "number", + "minimum": 1, + "description": "This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10." + }, + "assistantOverrides": { + "description": "These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, + "squadOverrides": { + "description": "These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a `squadId`. Per-contact `squadOverrides` are deep-merged on top of this at dispatch time.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, + "duplicateFromCampaignId": { + "type": "string", + "description": "Optional campaign ID to duplicate config from. Provided fields in the request override the source. If `customers` is omitted, contacts are copied from the source." } }, "required": [ @@ -39438,6 +39823,8 @@ "type": "string", "description": "This is the status of the campaign.", "enum": [ + "archived", + "cancelled", "ended", "in-progress", "scheduled" @@ -39495,6 +39882,27 @@ "$ref": "#/components/schemas/CreateCustomerDTO" } }, + "maxConcurrency": { + "type": "number", + "minimum": 1, + "description": "This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10." + }, + "assistantOverrides": { + "description": "These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, + "squadOverrides": { + "description": "These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a `squadId`. Per-contact `squadOverrides` are deep-merged on top of this at dispatch time.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, "id": { "type": "string", "description": "This is the unique identifier for the campaign." @@ -39611,8 +40019,9 @@ }, "status": { "type": "string", - "description": "This is the status of the campaign.\nCan only be updated to 'ended' if you want to end the campaign.\nWhen set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete.", + "description": "Set to 'cancelled' to stop the campaign ('ended' is a V1 alias). Scheduled\ncalls are deleted; in-progress calls are allowed to finish.", "enum": [ + "cancelled", "ended" ] }