timingOut(after:callback:)
to complete the emit
-/// Example:
-/// \code
-/// socket.emitWithAck("myEvent").timingOut(after: 1) {data in
-/// ...
-/// }
-///
-/// \endcode
-SWIFT_CLASS("_TtC11SalemoveSDK13OnAckCallback")
-@interface OnAckCallback : NSObject
-- (nonnull instancetype)init SWIFT_UNAVAILABLE;
-+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
-@end
-
-
@class OperatorPicture;
/// An Operator for an Engagement
@@ -673,6 +581,7 @@ SWIFT_CLASS("_TtC11SalemoveSDK8Operator")
@end
+
/// SalemoveError
-/// MediaUpgradeError.requestError
/// SalemoveError
+///
- (void)requestMediaUpgradeWithOffer:(MediaUpgradeOffer * _Nonnull)offer completion:(void (^ _Nonnull)(BOOL, SalemoveError * _Nullable))completion;
@end
-@interface Salemove (SWIFT_EXTENSION(SalemoveSDK))
-/// Clear the use session of the client library
-- (void)clearSession;
-@end
@interface Salemove (SWIFT_EXTENSION(SalemoveSDK))
/// Request a VisitorCode for current Visitor
-/// A Visitor code can be displayed to the Visitor. The Visitor can then inform OmniBrowse Operators of their code. OmniBrowse Operators use the Visitor’s code to start an OmniBrowse Engagement with the Visitor.
-/// Each Visitor code is generated on demand and is unique for every Visitor on a particular site. Upon the first time this function is called for a Visitor the code is generated and returned. For each successive call thereafter the same code will be returned as long as the code has not expired. The expiration time for Visitor codes is 3 hours. During that time the code can be used to initiate an engagement. Once Operator uses the Visitor code to initiate an engagement, the code will expire immediately. When the Visitor Code expires this function will return a new Visitor code.
-/// The expiration time is important to take note of if you plan on retrieving the code only once during the Visitor’s session. A new code should be requested once the initial one has expired. When Visitor provides an expired code to Operator the Operator will not be able to connect with the Visitor.
-/// SalemoveError
-/// ConfigurationError.invalidApiToken
///
/// SalemoveError
+///
- (void)requestVisitorCodeWithCompletion:(void (^ _Nonnull)(NSString * _Nullable, SalemoveError * _Nullable))completion;
@end
+@interface Salemove (SWIFT_EXTENSION(SalemoveSDK))
+/// Clear the use session of the client library
+- (void)clearSession;
+@end
+
+
+
@interface Salemove (SWIFT_EXTENSION(SalemoveSDK))
@@ -930,6 +829,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Salemove * _
@end
+
@interface Salemove (SWIFT_EXTENSION(SalemoveSDK))
/// Uploads a file to an engagement. The uploaded file can be later sent as part of a chat message attachments.
/// If Glia’s servers require a security check for the uploaded file, then it will be triggered automatically. The completion
@@ -1006,15 +906,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Salemove * _
-@interface Salemove (SWIFT_EXTENSION(SalemoveSDK))
-/// Deprecated. Use fetchFile(engagementFile:progress:completion:)
instead
-- (void)fetchFile:(NSString * _Nonnull)id progress:(void (^ _Nullable)(EngagementFileProgress * _Nonnull))progress completion:(void (^ _Nonnull)(EngagementFileData * _Nullable, SalemoveError * _Nullable))completion SWIFT_DEPRECATED_MSG("Use fetchFile(engagementFile:progress:completion:) instead");
-/// Deprecated. Use send(selectedOptionValue:completion:)
instead
-- (void)sendWithSelectedOptionValue:(NSString * _Nonnull)selectedOptionValue messageId:(NSString * _Nonnull)messageId completion:(void (^ _Nonnull)(Message * _Nullable, SalemoveError * _Nullable))completion SWIFT_DEPRECATED_MSG("Use send(selectedOptionValue:completion:) instead");
-@end
-
-
-
@interface Salemove (SWIFT_EXTENSION(SalemoveSDK))
/// Send a chat message.
@@ -1047,21 +938,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Salemove * _
/// \param completion A callback that will return the Message
or SalemoveError
.
///
- (void)sendWithMessage:(NSString * _Nonnull)message attachment:(Attachment * _Nullable)attachment completion:(void (^ _Nonnull)(Message * _Nullable, SalemoveError * _Nullable))completion;
-/// Send a chat message
-/// Message
or SalemoveError
-/// ConfigurationError.invalidApiToken
///
/// Message
or SalemoveError
.
+///
- (void)sendWithMessage:(NSString * _Nonnull)message queueID:(NSString * _Nonnull)queueID completion:(void (^ _Nonnull)(Message * _Nullable, SalemoveError * _Nullable))completion;
/// Send a message preview to the Operator.
/// The latest preview message will always be visible to the Operator. This means that Operators can use the
/// preview messages as an indication of Visitor activity. The Operator could also use the preview messages to
/// start preparing a response before the Visitor finishes typing, ensuring a fast and seamless communication
/// experience.
-/// SalemoveError
-/// ConfigurationError.invalidApiToken
///
/// SalemoveError
.
+///
- (void)sendMessagePreviewWithMessage:(NSString * _Nonnull)message completion:(void (^ _Nonnull)(BOOL, SalemoveError * _Nullable))completion;
@end
+
@interface Salemove (SWIFT_EXTENSION(SalemoveSDK))
-/// Change the site used by the client library
-/// fetchFile(engagementFile:progress:completion:)
instead.
+- (void)fetchFile:(NSString * _Nonnull)id progress:(void (^ _Nullable)(EngagementFileProgress * _Nonnull))progress completion:(void (^ _Nonnull)(EngagementFileData * _Nullable, SalemoveError * _Nullable))completion SWIFT_DEPRECATED_MSG("Use fetchFile(engagementFile:progress:completion:) instead.");
+/// Deprecated. Use send(selectedOptionValue:completion:)
instead.
+- (void)sendWithSelectedOptionValue:(NSString * _Nonnull)selectedOptionValue messageId:(NSString * _Nonnull)messageId completion:(void (^ _Nonnull)(Message * _Nullable, SalemoveError * _Nullable))completion SWIFT_DEPRECATED_MSG("Use send(selectedOptionValue:completion:) instead.");
+/// Deprecated. Use Salemove.configure(with:)
instead.
+- (BOOL)configureWithAppToken:(NSString * _Nonnull)appToken error:(NSError * _Nullable * _Nullable)error SWIFT_DEPRECATED_MSG("Use `Salemove.configure(with:) throws` instead.");
+/// Change the site used by the client library.
+/// \param site The siteID that should be selected.
+///
///
/// throws:
/// ConfigurationError.invalidSite
-- (BOOL)configureWithSite:(NSString * _Nonnull)site error:(NSError * _Nullable * _Nullable)error;
-/// Change the environment used by the client library
-/// ConfigurationError.invalidEnvironment
-- (BOOL)configureWithEnvironment:(NSString * _Nonnull)environment error:(NSError * _Nullable * _Nullable)error;
-/// Change the appToken used by the client library
-/// ConfigurationError.invalidAppToken
-- (BOOL)configureWithAppToken:(NSString * _Nonnull)appToken error:(NSError * _Nullable * _Nullable)error;
+/// ConfigurationError.invalidEnvironment
+- (BOOL)configureWithEnvironment:(NSString * _Nonnull)environment error:(NSError * _Nullable * _Nullable)error SWIFT_DEPRECATED_MSG("Use `Salemove.configure(_ configuration: Configuration)` instead.");
/// Deprecated.
-/// Change the apiToken used by the client library
-/// ConfigurationError.invalidApiToken
-- (BOOL)configureWithApiToken:(NSString * _Nonnull)apiToken error:(NSError * _Nullable * _Nullable)error SWIFT_DEPRECATED_MSG("Api token is not supported");
+- (BOOL)configureWithApiToken:(NSString * _Nonnull)apiToken error:(NSError * _Nullable * _Nullable)error SWIFT_DEPRECATED_MSG("Api token is not supported.");
@end
@@ -1588,7 +1434,6 @@ SWIFT_CLASS("_TtC11SalemoveSDK13SalemoveError")
@end
-
/// List of available screen sharing statuses
typedef SWIFT_ENUM(NSInteger, ScreenSharingStatus, open) {
/// There is an ongoing screen sharing session
@@ -1598,60 +1443,6 @@ typedef SWIFT_ENUM(NSInteger, ScreenSharingStatus, open) {
};
-/// Class which implements the various URLSessionDelegate
methods to connect various Alamofire features.
-SWIFT_CLASS("_TtC11SalemoveSDK15SessionDelegate")
-@interface SessionDelegate : NSObject
-- (nonnull instancetype)init SWIFT_UNAVAILABLE;
-+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
-@end
-
-@class NSURLSession;
-
-@interface SessionDelegate (SWIFT_EXTENSION(SalemoveSDK)) SocketEnginePollable
and SocketEngineWebsocket
for transport specific methods.
-SWIFT_CLASS("_TtC11SalemoveSDK12SocketEngine")
-@interface SocketEngine : NSObject true
if this engine is closed.
-@property (nonatomic, readonly) BOOL closed;
-/// true
if this engine is connected. Connected means that the initial poll connect has succeeded.
-@property (nonatomic, readonly) BOOL connected;
-/// An array of HTTPCookies that are sent during the connection.
-@property (nonatomic, readonly, copy) NSArraytrue
if using the node.js version of socket.io. The node.js version of socket.io
-/// handles utf8 incorrectly.
-@property (nonatomic, readonly) BOOL doubleEncodeUTF8;
-/// A dictionary of extra http headers that will be set during connection.
-@property (nonatomic, readonly, copy) NSDictionarytrue
, the engine is in the process of switching to WebSockets.
-/// Do not touch this directly
-@property (nonatomic, readonly) BOOL fastUpgrade;
-/// When true
, the engine will only use HTTP long-polling as a transport.
-@property (nonatomic, readonly) BOOL forcePolling;
-/// When true
, the engine will only use WebSockets as a transport.
-@property (nonatomic, readonly) BOOL forceWebsockets;
-/// If true
, the engine is currently in HTTP long-polling mode.
-@property (nonatomic, readonly) BOOL polling;
-/// If true
, the engine is currently seeing whether it can upgrade to WebSockets.
-@property (nonatomic, readonly) BOOL probing;
-/// The session id for this engine.
-@property (nonatomic, readonly, copy) NSString * _Nonnull sid;
-/// The path to engine.io.
-@property (nonatomic, readonly, copy) NSString * _Nonnull socketPath;
-/// The url for polling.
-@property (nonatomic, readonly, copy) NSURL * _Nonnull urlPolling;
-/// The url for WebSockets.
-@property (nonatomic, readonly, copy) NSURL * _Nonnull urlWebSocket;
-/// If true
, then the engine is currently in WebSockets mode.
-@property (nonatomic, readonly) BOOL websocket;
-/// The SocketIOWebSocket for this engine.
-@property (nonatomic, readonly, strong) SocketIOWebSocket * _Nullable ws;
-/// The client for this engine.
-@property (nonatomic, weak) id true
we might have to fix utf8 encoding.
-///
-- (void)parseEngineMessage:(NSString * _Nonnull)message fromPolling:(BOOL)fromPolling;
-/// Writes a message to engine.io, independent of transport.
-/// \param msg The message to send.
-///
-/// \param withType The type of this message.
-///
-/// \param withData Any data that this message has.
-///
-- (void)write:(NSString * _Nonnull)msg withType:(enum SocketEnginePacketType)type withData:(NSArraytrue
if this engine is closed.
-@property (nonatomic, readonly) BOOL closed;
-/// true
if this engine is connected. Connected means that the initial poll connect has succeeded.
-@property (nonatomic, readonly) BOOL connected;
-/// The connect parameters sent during a connect.
-@property (nonatomic, copy) NSDictionarytrue
if using the node.js version of socket.io. The node.js version of socket.io
-/// handles utf8 incorrectly.
-@property (nonatomic, readonly) BOOL doubleEncodeUTF8;
-/// An array of HTTPCookies that are sent during the connection.
-@property (nonatomic, readonly, copy) NSArraytrue
, the engine is in the process of switching to WebSockets.
-@property (nonatomic, readonly) BOOL fastUpgrade;
-/// When true
, the engine will only use HTTP long-polling as a transport.
-@property (nonatomic, readonly) BOOL forcePolling;
-/// When true
, the engine will only use WebSockets as a transport.
-@property (nonatomic, readonly) BOOL forceWebsockets;
-/// If true
, the engine is currently in HTTP long-polling mode.
-@property (nonatomic, readonly) BOOL polling;
-/// If true
, the engine is currently seeing whether it can upgrade to WebSockets.
-@property (nonatomic, readonly) BOOL probing;
-/// The session id for this engine.
-@property (nonatomic, readonly, copy) NSString * _Nonnull sid;
-/// The path to engine.io.
-@property (nonatomic, readonly, copy) NSString * _Nonnull socketPath;
-/// The url for polling.
-@property (nonatomic, readonly, copy) NSURL * _Nonnull urlPolling;
-/// The url for WebSockets.
-@property (nonatomic, readonly, copy) NSURL * _Nonnull urlWebSocket;
-/// If true
, then the engine is currently in WebSockets mode.
-@property (nonatomic, readonly) BOOL websocket;
-/// The SocketIOWebSocket for this engine.
-@property (nonatomic, readonly, strong) SocketIOWebSocket * _Nullable ws;
-/// Creates a new engine.
-/// \param client The client for this engine.
-///
-/// \param url The url for this engine.
-///
-/// \param options The options for this engine.
-///
-- (nonnull instancetype)initWithClient:(id true
we might have to fix utf8 encoding.
-///
-- (void)parseEngineMessage:(NSString * _Nonnull)message fromPolling:(BOOL)fromPolling;
-/// Writes a message to engine.io, independent of transport.
-/// \param msg The message to send.
-///
-/// \param withType The type of this message.
-///
-/// \param withData Any data that this message has.
-///
-- (void)write:(NSString * _Nonnull)msg withType:(enum SocketEnginePacketType)type withData:(NSArray(while shouldThrottle: P, on scheduler: SalemoveSDK.Scheduler) -> SalemoveSDK.Signal(_ signals: S) -> SalemoveSDK.Signal<[Value], Error> where S : Swift.Sequence, S.Element == SalemoveSDK.Signal(_ signals: S) -> SalemoveSDK.Signal<[Value], Error> where S : Swift.Sequence, S.Element == SalemoveSDK.Signal