Classes

The following classes are available globally.

  • ChatEngine is the access point for the UI of the Chat SDK. It is the ChatEngine.

    See more

    Declaration

    Swift

    @objc(ZDKChatEngine)
    public final class ChatEngine : NSObject, Engine, Loggable, NotificationCenterObserver
    extension ChatEngine: MessagingAPI.Observable
  • Configuration class to modify the behaviour of the Chat UI such as forms, and ChatMenuActions

    This can be passed into the Messaging.buildUI(engines:configs:) method.

    See more

    Declaration

    Swift

    @objc(ZDKChatConfiguration)
    public final class ChatConfiguration : NSObject, Configuration, ReflectedStringConvertible
  • Configuration object used to gather the desired requirements for a Chat form.

    See more

    Declaration

    Swift

    @objc(ZDKChatFormConfiguration)
    public final class ChatFormConfiguration : NSObject, ReflectedStringConvertible
  • Chat is a singleton class of the ChatProviderSDK.

    It needs to be intialized with an accountKey before using any of the Chat APIs. The accountKey can be retrieved from the Zendesk Chat dashboard.

    Chat.initialize(accountKey: accountKey)
    
    See more

    Declaration

    Swift

    @objc(ZDKChat)
    public final class Chat : NSObject, Loggable
  • A set of configurations that are associated with each chat session.

    Default values

    visitorPathOne = nil // "Direct Path"
    visitorPathTwo = "Zendesk Chat SDK v\(VersionNumber)"
    visitorPathTwoValue = nil
    tags = []
    department = nil
    visitorInfo = nil
    
    See more

    Declaration

    Swift

    @objc(ZDKChatAPIConfiguration)
    public final class ChatAPIConfiguration : NSObject
  • PushNotificationData can be used to gather information about Chat related push notifications

    See more

    Declaration

    Swift

    @objc(ZDKPushNotificationData)
    public final class PushNotificationData : NSObject
  • ZDKChatAccountProvider gives the ability to observe account updates.

    See more

    Declaration

    Swift

    @objc(ZDKChatAccountProvider)
    public final class AccountProvider : NSObject
  • The ZDKChatProvider provides APIs to interact and observe the current Chat session.

    It provides APIs to:

    • proactively request a chat
    • send messages
    • handle failed messages (retry/delete)
    • set the visitors’ typing indicator
    • end the chat
    See more

    Declaration

    Swift

    @objc(ZDKChatProvider)
    public final class ChatProvider : NSObject, Loggable
  • ZDKConnectionProvider gives the ability to observe connection updates.

    See more

    Declaration

    Swift

    @objc(ZDKConnectionProvider)
    public final class ConnectionProvider : NSObject
  • The ZDKProfileProvider contain APIs to update information about a visitor. Such as name, email, phone number, tags, and notes related to the visitor and their session.

    See more

    Declaration

    Swift

    @objc(ZDKProfileProvider)
    public final class ProfileProvider : NSObject
  • ZDKChatProviders is a grouping of all the providers that allow you to, setup for push notifications, handle session updates, handle connection state, and interact with the APIs in other ways.

    Declaration

    Swift

    @objc(ZDKChatProviders)
    public final class Providers : NSObject
  • The ZDKPushNoticiationProvider provides APIs to subscribe to, and handle Zendesk Chat’s Push Notifications.

    There are two types of chat notifications:

    • chat.msg - received when a new chat message was sent from an agent
    • chat.end - received when the current chat session ends.
    See more

    Declaration

    Swift

    @objc(ZDKPushNotificationsProvider)
    public final class PushNotificationsProvider : NSObject, HasStorage, Loggable, Publisher
  • ZDKSettingsProvider gives the ability to observe settings updates.

    See more

    Declaration

    Swift

    @objc(ZDKSettingsProvider)
    public final class SettingsProvider : NSObject
  • The ZDKChatAccount model stores information about the chat account, such as the current accountStatus and the list of Departments associated with the account

    See more

    Declaration

    Swift

    @objc(ZDKChatAccount)
    public final class Account : NSObject, InitialStateProtocol, ReflectedStringConvertible
  • The ZDKAgent model has information about an agent in a chat session, such as their backend id represented as nick, their display name, their avatar, and if they’re currently typing.

    See more

    Declaration

    Swift

    @objc(ZDKAgent)
    public final class Agent : NSObject, DataConvertible, ReflectedStringConvertible
  • The ZDKChatAttachment model, contains information about attachments that were sent or received by the visitor.

    See more

    Declaration

    Swift

    @objc(ZDKChatAttachment)
    public final class ChatAttachment : NSObject, DataConvertible, ReflectedStringConvertible
  • The ZDKChatSettings model stores information about the chat account’s settings, such as the fileSizeLimit, whether attachments are enabled, and the list of accepted file extensions.

    See more

    Declaration

    Swift

    @objc(ZDKChatSettings)
    public final class ChatSettings : NSObject, DataConvertible, ReflectedStringConvertible, InitialStateProtocol
  • ZDKChatState is a model representation of the current chat session.

    Can gather information about the agents in the session, the visitor’s queuePosition, what status the chat is in, and the list of logs in the session

    See more

    Declaration

    Swift

    @objc(ZDKChatState)
    public final class ChatState : NSObject, ReflectedStringConvertible, InitialStateProtocol

Equatable

  • ZDKQueuePosition is a model that represents the current queue position of the visitor.

    See more

    Declaration

    Swift

    @objc(ZDKQueuePosition)
    public final class QueuePosition : NSObject
  • Department model contains id associated with the department, the department name, and the current status of the department.

    See more

    Declaration

    Swift

    @objc(ZDKDepartment)
    public final class Department : NSObject, DataConvertible, ReflectedStringConvertible
  • Offline form is formed from the given fields: visitor info - name, email, phone department - department id message - visitor’s message

    See more

    Declaration

    Swift

    @objc(ZDKOfflineForm)
    public final class OfflineForm : NSObject, ChatForm, PathValueProtocol
  • The Chat Log attachment

    See more

    Declaration

    Swift

    @objc(ZDKChatAttachmentMessage)
    public final class ChatAttachmentMessage : ChatLog
  • Chat comment in relation to a Chat rating.

    See more

    Declaration

    Swift

    @objc(ZDKChatComment)
    public final class ChatComment : ChatLog
  • Base class for chat log events that may occur in a chat session

    Different LogTypes

    See more

    Declaration

    Swift

    @objc(ZDKChatLog)
    public class ChatLog : NSObject, ChatLogProtocol, ReflectedStringConvertible
  • Chat Member Join event

    See more

    Declaration

    Swift

    @objc(ZDKChatMemberJoin)
    public final class ChatMemberJoin : ChatLog
  • Chat Member Leave event

    See more

    Declaration

    Swift

    @objc(ZDKChatMemberLeave)
    public final class ChatMemberLeave : ChatLog
  • Chat message

    See more

    Declaration

    Swift

    @objc(ZDKChatMessage)
    public final class ChatMessage : ChatLog
  • Questions from agent with multiple options that a user can respond with

    See more

    Declaration

    Swift

    @objc(ZDKChatOptionsMessage)
    public final class ChatOptionsMessage : ChatLog
  • A Chat rating left by the user after an agent requested it. Can be none, good, or bad

    See more

    Declaration

    Swift

    @objc(ZDKChatRating)
    public final class ChatRating : ChatLog
  • Chat Rating Request (sent by the agent)

    See more

    Declaration

    Swift

    @objc(ZDKRatingRequest)
    public final class ChatRatingRequest : ChatLog
  • Visitor information that can be seen in the Chat dashboard Contains name, email, and phoneNumber

    Note

    email is parsed and should be in correct email format. phoneNumber is not parsed.
    See more

    Declaration

    Swift

    @objc(ZDKVisitorInfo)
    public final class VisitorInfo : NSObject, InitialStateProtocol, DataConvertible, ReflectedStringConvertible
  • A Custom Update Event that can be seen in the agent dashboard.

    The VisitorPath API is a way to know if visitors have performed certain events in your app. VisitorPath events can be queued before a chat has started, and they’ll be sent when the first message is sent.

    Note

    The url field is unparsed by the backend, so it can be any String. If subsequent urls are the same, only the initial VisitorPath update will be sent. If url parameter of VisitorPath is not specified, an ISO8601 timestamp will be sent.
    See more

    Declaration

    Swift

    @objc(ZDKVisitorPath)
    public final class VisitorPath : NSObject, DataConvertible, ReflectedStringConvertible
  • ZDKChatInfo contains information about the chat session, such as if there is a chat ongoing.

    See more

    Declaration

    Swift

    @objc(ZDKChatInfo)
    public final class ChatInfo : NSObject, DataConvertible, ReflectedStringConvertible

Root/Singleton Logger for obtaining log instances

  • Singleton access point for logging, inject a LoggerFactory to specify the Logger.

    Author

    Zendesk
    See more

    Declaration

    Swift

    @objc(ZDKChatLogger)
    public final class Logger : NSObject
  • A convenience wrapper for the ObservationToken, that can be used alongside the ObserveBehaviours class

    See more

    Declaration

    Swift

    public final class ObserveBehaviour : Equatable, Hashable
  • A convenience wrapper for a collection of ObserveBehaviours.

    See more

    Declaration

    Swift

    public final class ObserveBehaviours
  • Unsubscribe from observers

    See more

    Declaration

    Swift

    @objc(ZDKObservationToken)
    public final class ObservationToken : NSObject, Identifiable