Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"cliVersion": "5.51.2",
"cliVersion": "5.80.4",
"generatorName": "fernapi/fern-swift-sdk",
"generatorVersion": "0.31.0",
"generatorConfig": {
"clientClassName": "VapiClient",
"moduleName": "Vapi",
"environmentEnumName": "VapiEnvironment"
},
"originGitCommit": "5a015aa01196915bea6110904c69d5804f457ff5",
"sdkVersion": "1.0.0"
"originGitCommit": "170bed6970e526a517e8ec4d249db90b7f6d95d4",
"sdkVersion": "1.0.1"
}
16 changes: 16 additions & 0 deletions .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .fernignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Specify files that shouldn't be modified by Fern
.github/workflows/sdk-release-pr-notification.yml
changelog.md
.fern/replay.lock
.fern/replay.yml
.gitattributes
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.fern/replay.lock linguist-generated=true
1 change: 1 addition & 0 deletions Sources/Requests/Requests+CreateFileDto.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Foundation

extension Requests {
/// A file-upload request containing the file to store and process in Vapi.
public struct CreateFileDto {
/// This is the File you want to upload for use with the Knowledge Base.
public let file: FormFile
Expand Down
1 change: 1 addition & 0 deletions Sources/Requests/Requests+InsightRunDto.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Foundation

extension Requests {
public struct InsightRunDto: Codable, Hashable, Sendable {
/// Output-formatting instructions applied to the insight run.
public let formatPlan: InsightRunFormatPlan?
/// This is the optional time range override for the insight.
/// If provided, overrides every field in the insight's timeRange.
Expand Down
3 changes: 3 additions & 0 deletions Sources/Requests/Requests+UpdateAssistantDto.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ extension Requests {
///
/// If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
public let firstMessage: String?
/// Set to `true` to allow the user to interrupt the assistant while it speaks the first message. Default is `false`.
public let firstMessageInterruptionsEnabled: Bool?
/// This is the mode for the first message. Default is 'assistant-speaks-first'.
///
Expand Down Expand Up @@ -64,6 +65,7 @@ extension Requests {
public let endCallMessage: String?
/// This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.
public let endCallPhrases: [String]?
/// Compliance settings for the assistant, including HIPAA and PCI behavior, security filtering, and recording consent.
public let compliancePlan: CompliancePlan?
/// This is for metadata you want to store on the assistant.
public let metadata: [String: JSONValue]?
Expand Down Expand Up @@ -116,6 +118,7 @@ extension Requests {
/// 2. phoneNumber.serverUrl
/// 3. org.serverUrl
public let server: Server?
/// Configuration for collecting and processing DTMF keypad input during calls.
public let keypadInputPlan: KeypadInputPlan?
/// Additional properties that are not explicitly defined in the schema
public let additionalProperties: [String: JSONValue]
Expand Down
3 changes: 3 additions & 0 deletions Sources/Resources/Analytics/AnalyticsClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ public final class AnalyticsClient: Sendable {
self.httpClient = HTTPClient(config: config)
}

/// Runs one or more metric queries against call or subscription data using the requested time range, groupings, and aggregate operations.
///
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func get(request: Requests.AnalyticsQueryDto, requestOptions: RequestOptions? = nil) async throws -> [AnalyticsQueryResult] {
return try await httpClient.performRequest(
method: .post,
Expand Down
27 changes: 27 additions & 0 deletions Sources/Resources/Assistants/AssistantsClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ public final class AssistantsClient: Sendable {
self.httpClient = HTTPClient(config: config)
}

/// Returns assistants for the authenticated organization. Filter results by creation or update timestamps and limit the number returned.
///
/// - Parameter limit: This is the maximum number of items to return. Defaults to 100.
/// - Parameter createdAtGt: This will return items where the createdAt is greater than the specified value.
/// - Parameter createdAtLt: This will return items where the createdAt is less than the specified value.
/// - Parameter createdAtGe: This will return items where the createdAt is greater than or equal to the specified value.
/// - Parameter createdAtLe: This will return items where the createdAt is less than or equal to the specified value.
/// - Parameter updatedAtGt: This will return items where the updatedAt is greater than the specified value.
/// - Parameter updatedAtLt: This will return items where the updatedAt is less than the specified value.
/// - Parameter updatedAtGe: This will return items where the updatedAt is greater than or equal to the specified value.
/// - Parameter updatedAtLe: This will return items where the updatedAt is less than or equal to the specified value.
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func list(limit: Double? = nil, createdAtGt: Date? = nil, createdAtLt: Date? = nil, createdAtGe: Date? = nil, createdAtLe: Date? = nil, updatedAtGt: Date? = nil, updatedAtLt: Date? = nil, updatedAtGe: Date? = nil, updatedAtLe: Date? = nil, requestOptions: RequestOptions? = nil) async throws -> [Assistant] {
return try await httpClient.performRequest(
method: .get,
Expand All @@ -27,6 +39,9 @@ public final class AssistantsClient: Sendable {
)
}

/// Creates a reusable assistant configuration containing the model, voice, transcriber, tools, prompts, and call behavior.
///
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func create(request: CreateAssistantDto, requestOptions: RequestOptions? = nil) async throws -> Assistant {
return try await httpClient.performRequest(
method: .post,
Expand All @@ -37,6 +52,10 @@ public final class AssistantsClient: Sendable {
)
}

/// Returns the assistant identified by its ID.
///
/// - Parameter id: The unique identifier of the assistant.
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func get(id: String, requestOptions: RequestOptions? = nil) async throws -> Assistant {
return try await httpClient.performRequest(
method: .get,
Expand All @@ -46,6 +65,10 @@ public final class AssistantsClient: Sendable {
)
}

/// Deletes the assistant identified by its ID.
///
/// - Parameter id: The unique identifier of the assistant.
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func delete(id: String, requestOptions: RequestOptions? = nil) async throws -> Assistant {
return try await httpClient.performRequest(
method: .delete,
Expand All @@ -55,6 +78,10 @@ public final class AssistantsClient: Sendable {
)
}

/// Updates the specified fields of the assistant identified by its ID.
///
/// - Parameter id: The unique identifier of the assistant.
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func update(id: String, request: Requests.UpdateAssistantDto, requestOptions: RequestOptions? = nil) async throws -> Assistant {
return try await httpClient.performRequest(
method: .patch,
Expand Down
31 changes: 31 additions & 0 deletions Sources/Resources/Calls/CallsClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ public final class CallsClient: Sendable {
self.httpClient = HTTPClient(config: config)
}

/// Returns calls for the authenticated organization. Filter results by call ID, assistant ID, phone number ID, or creation and update timestamps.
///
/// - Parameter id: This is the unique identifier for the call.
/// - Parameter assistantId: This will return calls with the specified assistantId.
/// - Parameter phoneNumberId: This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
///
/// Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
/// - Parameter limit: This is the maximum number of items to return. Defaults to 100.
/// - Parameter createdAtGt: This will return items where the createdAt is greater than the specified value.
/// - Parameter createdAtLt: This will return items where the createdAt is less than the specified value.
/// - Parameter createdAtGe: This will return items where the createdAt is greater than or equal to the specified value.
/// - Parameter createdAtLe: This will return items where the createdAt is less than or equal to the specified value.
/// - Parameter updatedAtGt: This will return items where the updatedAt is greater than the specified value.
/// - Parameter updatedAtLt: This will return items where the updatedAt is less than the specified value.
/// - Parameter updatedAtGe: This will return items where the updatedAt is greater than or equal to the specified value.
/// - Parameter updatedAtLe: This will return items where the updatedAt is less than or equal to the specified value.
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func list(id: String? = nil, assistantId: String? = nil, phoneNumberId: String? = nil, limit: Double? = nil, createdAtGt: Date? = nil, createdAtLt: Date? = nil, createdAtGe: Date? = nil, createdAtLe: Date? = nil, updatedAtGt: Date? = nil, updatedAtLt: Date? = nil, updatedAtGe: Date? = nil, updatedAtLe: Date? = nil, requestOptions: RequestOptions? = nil) async throws -> [Call] {
return try await httpClient.performRequest(
method: .get,
Expand All @@ -30,6 +47,9 @@ public final class CallsClient: Sendable {
)
}

/// Creates a call using an assistant or squad. The request can reference saved resources or include transient configurations.
///
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func create(request: Requests.CreateCallDto, requestOptions: RequestOptions? = nil) async throws -> CreateCallsResponse {
return try await httpClient.performRequest(
method: .post,
Expand All @@ -40,6 +60,10 @@ public final class CallsClient: Sendable {
)
}

/// Returns the call identified by its ID, including its status, configuration, and available call data.
///
/// - Parameter id: The unique identifier of the call.
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func get(id: String, requestOptions: RequestOptions? = nil) async throws -> Call {
return try await httpClient.performRequest(
method: .get,
Expand All @@ -49,6 +73,9 @@ public final class CallsClient: Sendable {
)
}

/// Deletes the call identified by its ID.
///
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func delete(id: String, request: Requests.DeleteCallDto, requestOptions: RequestOptions? = nil) async throws -> Call {
return try await httpClient.performRequest(
method: .delete,
Expand All @@ -59,6 +86,10 @@ public final class CallsClient: Sendable {
)
}

/// Updates the call identified by its ID.
///
/// - Parameter id: The unique identifier of the call.
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func update(id: String, request: Requests.UpdateCallDto, requestOptions: RequestOptions? = nil) async throws -> Call {
return try await httpClient.performRequest(
method: .patch,
Expand Down
31 changes: 31 additions & 0 deletions Sources/Resources/Campaigns/CampaignsClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ public final class CampaignsClient: Sendable {
self.httpClient = HTTPClient(config: config)
}

/// Returns outbound calling campaigns for the authenticated organization. Filter results by campaign ID, status, or creation and update timestamps.
///
/// - Parameter id: Filters campaigns by ID.
/// - Parameter status: Filters campaigns by status.
/// - Parameter page: This is the page number to return. Defaults to 1.
/// - Parameter sortOrder: This is the sort order for pagination. Defaults to 'DESC'.
/// - Parameter limit: This is the maximum number of items to return. Defaults to 100.
/// - Parameter createdAtGt: This will return items where the createdAt is greater than the specified value.
/// - Parameter createdAtLt: This will return items where the createdAt is less than the specified value.
/// - Parameter createdAtGe: This will return items where the createdAt is greater than or equal to the specified value.
/// - Parameter createdAtLe: This will return items where the createdAt is less than or equal to the specified value.
/// - Parameter updatedAtGt: This will return items where the updatedAt is greater than the specified value.
/// - Parameter updatedAtLt: This will return items where the updatedAt is less than the specified value.
/// - Parameter updatedAtGe: This will return items where the updatedAt is greater than or equal to the specified value.
/// - Parameter updatedAtLe: This will return items where the updatedAt is less than or equal to the specified value.
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func campaignControllerFindAll(id: String? = nil, status: CampaignControllerFindAllRequestStatus? = nil, page: Double? = nil, sortOrder: CampaignControllerFindAllRequestSortOrder? = nil, limit: Double? = nil, createdAtGt: Date? = nil, createdAtLt: Date? = nil, createdAtGe: Date? = nil, createdAtLe: Date? = nil, updatedAtGt: Date? = nil, updatedAtLt: Date? = nil, updatedAtGe: Date? = nil, updatedAtLe: Date? = nil, requestOptions: RequestOptions? = nil) async throws -> CampaignPaginatedResponse {
return try await httpClient.performRequest(
method: .get,
Expand All @@ -31,6 +47,9 @@ public final class CampaignsClient: Sendable {
)
}

/// Creates an outbound calling campaign that calls a set of customers.
///
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func campaignControllerCreate(request: Requests.CreateCampaignDto, requestOptions: RequestOptions? = nil) async throws -> Campaign {
return try await httpClient.performRequest(
method: .post,
Expand All @@ -41,6 +60,10 @@ public final class CampaignsClient: Sendable {
)
}

/// Returns the outbound calling campaign identified by its ID.
///
/// - Parameter id: The unique identifier of the campaign.
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func campaignControllerFindOne(id: String, requestOptions: RequestOptions? = nil) async throws -> Campaign {
return try await httpClient.performRequest(
method: .get,
Expand All @@ -50,6 +73,10 @@ public final class CampaignsClient: Sendable {
)
}

/// Deletes the outbound calling campaign identified by its ID.
///
/// - Parameter id: The unique identifier of the campaign.
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func campaignControllerRemove(id: String, requestOptions: RequestOptions? = nil) async throws -> Campaign {
return try await httpClient.performRequest(
method: .delete,
Expand All @@ -59,6 +86,10 @@ public final class CampaignsClient: Sendable {
)
}

/// Updates the outbound calling campaign identified by its ID. Campaigns can be ended by updating their status to `ended`.
///
/// - Parameter id: The unique identifier of the campaign.
/// - Parameter requestOptions: Additional options for configuring the request, such as custom headers or timeout settings.
public func campaignControllerUpdate(id: String, request: Requests.UpdateCampaignDto, requestOptions: RequestOptions? = nil) async throws -> Campaign {
return try await httpClient.performRequest(
method: .patch,
Expand Down
Loading