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.89.2",
"generatorName": "fernapi/fern-swift-sdk",
"generatorVersion": "0.31.0",
"generatorConfig": {
"clientClassName": "VapiClient",
"moduleName": "Vapi",
"environmentEnumName": "VapiEnvironment"
},
"originGitCommit": "5a015aa01196915bea6110904c69d5804f457ff5",
"sdkVersion": "1.0.0"
"originGitCommit": "548dddb5e7bc17a9e26b0832d0359a988546b0ba",
"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
58 changes: 58 additions & 0 deletions Sources/Requests/Requests+CreateBoardDto.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import Foundation

extension Requests {
public struct CreateBoardDto: Codable, Hashable, Sendable {
/// This is the contents of the Board, which is an array of objects defining the type, contents, and position of the widgets on the Board.
public let items: [CreateBoardDtoItemsItem]?
/// This is the name of the Board.
public let name: String
/// This is the layout of the Board.
public let layout: BoardLayout
/// This is the timerange override for the board.
/// By default, individual insights have their own timerange.
/// This is a global override for the board which will be passed to all insights on the board.
public let timeRangeOverride: InsightTimeRangeWithStep?
/// Additional properties that are not explicitly defined in the schema
public let additionalProperties: [String: JSONValue]

public init(
items: [CreateBoardDtoItemsItem]? = nil,
name: String,
layout: BoardLayout,
timeRangeOverride: InsightTimeRangeWithStep? = nil,
additionalProperties: [String: JSONValue] = .init()
) {
self.items = items
self.name = name
self.layout = layout
self.timeRangeOverride = timeRangeOverride
self.additionalProperties = additionalProperties
}

public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.items = try container.decodeIfPresent([CreateBoardDtoItemsItem].self, forKey: .items)
self.name = try container.decode(String.self, forKey: .name)
self.layout = try container.decode(BoardLayout.self, forKey: .layout)
self.timeRangeOverride = try container.decodeIfPresent(InsightTimeRangeWithStep.self, forKey: .timeRangeOverride)
self.additionalProperties = try decoder.decodeAdditionalProperties(using: CodingKeys.self)
}

public func encode(to encoder: Encoder) throws -> Void {
var container = encoder.container(keyedBy: CodingKeys.self)
try encoder.encodeAdditionalProperties(self.additionalProperties)
try container.encodeIfPresent(self.items, forKey: .items)
try container.encode(self.name, forKey: .name)
try container.encode(self.layout, forKey: .layout)
try container.encodeIfPresent(self.timeRangeOverride, forKey: .timeRangeOverride)
}

/// Keys for encoding/decoding struct properties.
enum CodingKeys: String, CodingKey, CaseIterable {
case items
case name
case layout
case timeRangeOverride
}
}
}
22 changes: 15 additions & 7 deletions Sources/Requests/Requests+CreateCallDto.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import Foundation

extension Requests {
public struct CreateCallDto: Codable, Hashable, Sendable {
/// This is the assistant version to use for this call. Supported only with
/// direct `assistantId`. Omit to follow the latest version.
public let assistantVersion: Nullable<String>?
/// This is the transport of the call.
public let transport: CreateCallDtoTransport?
/// This is used to issue batch calls to multiple customers.
///
/// Only relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead.
Expand All @@ -10,8 +15,6 @@ extension Requests {
public let name: String?
/// This is the schedule plan of the call.
public let schedulePlan: SchedulePlan?
/// This is the transport of the call.
public let transport: [String: JSONValue]?
/// This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead.
///
/// To start a call with:
Expand Down Expand Up @@ -81,10 +84,11 @@ extension Requests {
public let additionalProperties: [String: JSONValue]

public init(
assistantVersion: Nullable<String>? = nil,
transport: CreateCallDtoTransport? = nil,
customers: [CreateCustomerDto]? = nil,
name: String? = nil,
schedulePlan: SchedulePlan? = nil,
transport: [String: JSONValue]? = nil,
assistantId: String? = nil,
assistant: CreateAssistantDto? = nil,
assistantOverrides: AssistantOverrides? = nil,
Expand All @@ -100,10 +104,11 @@ extension Requests {
customer: CreateCustomerDto? = nil,
additionalProperties: [String: JSONValue] = .init()
) {
self.assistantVersion = assistantVersion
self.transport = transport
self.customers = customers
self.name = name
self.schedulePlan = schedulePlan
self.transport = transport
self.assistantId = assistantId
self.assistant = assistant
self.assistantOverrides = assistantOverrides
Expand All @@ -122,10 +127,11 @@ extension Requests {

public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.assistantVersion = try container.decodeNullableIfPresent(String.self, forKey: .assistantVersion)
self.transport = try container.decodeIfPresent(CreateCallDtoTransport.self, forKey: .transport)
self.customers = try container.decodeIfPresent([CreateCustomerDto].self, forKey: .customers)
self.name = try container.decodeIfPresent(String.self, forKey: .name)
self.schedulePlan = try container.decodeIfPresent(SchedulePlan.self, forKey: .schedulePlan)
self.transport = try container.decodeIfPresent([String: JSONValue].self, forKey: .transport)
self.assistantId = try container.decodeIfPresent(String.self, forKey: .assistantId)
self.assistant = try container.decodeIfPresent(CreateAssistantDto.self, forKey: .assistant)
self.assistantOverrides = try container.decodeIfPresent(AssistantOverrides.self, forKey: .assistantOverrides)
Expand All @@ -145,10 +151,11 @@ extension Requests {
public func encode(to encoder: Encoder) throws -> Void {
var container = encoder.container(keyedBy: CodingKeys.self)
try encoder.encodeAdditionalProperties(self.additionalProperties)
try container.encodeNullableIfPresent(self.assistantVersion, forKey: .assistantVersion)
try container.encodeIfPresent(self.transport, forKey: .transport)
try container.encodeIfPresent(self.customers, forKey: .customers)
try container.encodeIfPresent(self.name, forKey: .name)
try container.encodeIfPresent(self.schedulePlan, forKey: .schedulePlan)
try container.encodeIfPresent(self.transport, forKey: .transport)
try container.encodeIfPresent(self.assistantId, forKey: .assistantId)
try container.encodeIfPresent(self.assistant, forKey: .assistant)
try container.encodeIfPresent(self.assistantOverrides, forKey: .assistantOverrides)
Expand All @@ -166,10 +173,11 @@ extension Requests {

/// Keys for encoding/decoding struct properties.
enum CodingKeys: String, CodingKey, CaseIterable {
case assistantVersion
case transport
case customers
case name
case schedulePlan
case transport
case assistantId
case assistant
case assistantOverrides
Expand Down
84 changes: 0 additions & 84 deletions Sources/Requests/Requests+CreateCampaignDto.swift

This file was deleted.

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
9 changes: 9 additions & 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 All @@ -11,23 +12,29 @@ extension Requests {
/// step default - "day"
/// For Pie and Text Insights, step will be ignored even if provided.
public let timeRangeOverride: InsightTimeRangeWithStep?
/// Optional runtime assistant scope for dashboards.
/// This is applied to call-table queries without mutating the saved insight.
public let assistantId: String?
/// Additional properties that are not explicitly defined in the schema
public let additionalProperties: [String: JSONValue]

public init(
formatPlan: InsightRunFormatPlan? = nil,
timeRangeOverride: InsightTimeRangeWithStep? = nil,
assistantId: String? = nil,
additionalProperties: [String: JSONValue] = .init()
) {
self.formatPlan = formatPlan
self.timeRangeOverride = timeRangeOverride
self.assistantId = assistantId
self.additionalProperties = additionalProperties
}

public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.formatPlan = try container.decodeIfPresent(InsightRunFormatPlan.self, forKey: .formatPlan)
self.timeRangeOverride = try container.decodeIfPresent(InsightTimeRangeWithStep.self, forKey: .timeRangeOverride)
self.assistantId = try container.decodeIfPresent(String.self, forKey: .assistantId)
self.additionalProperties = try decoder.decodeAdditionalProperties(using: CodingKeys.self)
}

Expand All @@ -36,12 +43,14 @@ extension Requests {
try encoder.encodeAdditionalProperties(self.additionalProperties)
try container.encodeIfPresent(self.formatPlan, forKey: .formatPlan)
try container.encodeIfPresent(self.timeRangeOverride, forKey: .timeRangeOverride)
try container.encodeIfPresent(self.assistantId, forKey: .assistantId)
}

/// Keys for encoding/decoding struct properties.
enum CodingKeys: String, CodingKey, CaseIterable {
case formatPlan
case timeRangeOverride
case assistantId
}
}
}
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
Loading