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

extension Requests {
public struct AttachKnowledgeBaseV2FileDto: Codable, Hashable, Sendable {
public let fileId: String
/// Additional properties that are not explicitly defined in the schema
public let additionalProperties: [String: JSONValue]

public init(
fileId: String,
additionalProperties: [String: JSONValue] = .init()
) {
self.fileId = fileId
self.additionalProperties = additionalProperties
}

public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.fileId = try container.decode(String.self, forKey: .fileId)
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.encode(self.fileId, forKey: .fileId)
}

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

17 changes: 14 additions & 3 deletions Sources/Requests/Requests+CreateFileDto.swift
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
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.
/// The file to upload.
public let file: FormFile
/// Optional product flow that owns the uploaded file.
public let purpose: CreateFilesRequestPurpose?
/// Optional JSON-encoded metadata for multipart uploads.
public let metadata: String?

public init(
file: FormFile
file: FormFile,
purpose: CreateFilesRequestPurpose? = nil,
metadata: String? = nil
) {
self.file = file
self.purpose = purpose
self.metadata = metadata
}
}
}

extension Requests.CreateFileDto: MultipartFormDataConvertible {
var multipartFormFields: [MultipartFormField] {
[
.file(file, fieldName: "file")
.file(file, fieldName: "file"),
.field(purpose, fieldName: "purpose"),
.field(metadata, fieldName: "metadata")
]
}
}
40 changes: 40 additions & 0 deletions Sources/Requests/Requests+CreateKnowledgeBaseV2Dto.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import Foundation

extension Requests {
public struct CreateKnowledgeBaseV2Dto: Codable, Hashable, Sendable {
public let name: String
public let description: Nullable<String>?
/// Additional properties that are not explicitly defined in the schema
public let additionalProperties: [String: JSONValue]

public init(
name: String,
description: Nullable<String>? = nil,
additionalProperties: [String: JSONValue] = .init()
) {
self.name = name
self.description = description
self.additionalProperties = additionalProperties
}

public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.name = try container.decode(String.self, forKey: .name)
self.description = try container.decodeNullableIfPresent(String.self, forKey: .description)
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.encode(self.name, forKey: .name)
try container.encodeNullableIfPresent(self.description, forKey: .description)
}

/// Keys for encoding/decoding struct properties.
enum CodingKeys: String, CodingKey, CaseIterable {
case name
case description
}
}
}
Loading