Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce startEngagementWithConfig method with queueIds array #819

Merged
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions GliaWidgets/Public/Glia/Glia.Deprecated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extension Glia {
}

/// Deprecated, use ``Glia.configure(with:uiConfig:assetsBuilder:completion)`` instead.
@available(*, deprecated, message: "Deprecated, use ``Glia.configure(with:uiConfig:assetsBuilder:completion`` instead.")
@available(*, deprecated, message: "Deprecated, use ``Glia.configure(with:uiConfig:assetsBuilder:completion:)`` instead.")
public func configure(
with configuration: Configuration,
queueId: String,
Expand Down Expand Up @@ -149,11 +149,11 @@ extension Glia {
)
}

/// Deprecated, use ``Deprecated, use ``Glia.configure(with:uiConfig:assetsBuilder:completion`` and ``Glia.startEngagement(engagementKind:in:theme:features:sceneProvider:)`` instead.`` instead.
/// Deprecated, use ``Glia.configure(with:uiConfig:assetsBuilder:completion:)`` and ``Glia.startEngagement(engagementKind:in:theme:features:sceneProvider:)`` instead.
@available(*,
deprecated,
message: """
Deprecated, use ``Glia.configure(with:uiConfig:assetsBuilder:completion`` and \
Deprecated, use ``Glia.configure(with:uiConfig:assetsBuilder:completion:)`` and \
``Glia.startEngagement(engagementKind:in:theme:features:sceneProvider:)`` instead.
"""
)
Expand Down Expand Up @@ -184,6 +184,30 @@ extension Glia {
try completion()
}
}

/// Deprecated, use ``Glia.startEngagementWithConfig(engagement:in:uiConfig:assetsBuilder:features:sceneProvider:)`` instead.
@available(*,
deprecated,
message: """
Deprecated, use ``Glia.startEngagementWithConfig(engagement:in:uiConfig:assetsBuilder:features:sceneProvider:)`` instead.
"""
)
public func startEngagementWithConfig(
engagement: EngagementKind,
uiConfig: RemoteConfiguration,
assetsBuilder: RemoteConfiguration.AssetsBuilder = .standard,
features: Features = .all,
sceneProvider: SceneProvider? = nil
) throws {
try startEngagementWithConfig(
engagement: engagement,
in: [],
uiConfig: uiConfig,
assetsBuilder: assetsBuilder,
features: features,
sceneProvider: sceneProvider
)
}
}

extension Glia.Authentication {
Expand Down
3 changes: 3 additions & 0 deletions GliaWidgets/Public/Glia/Glia.RemoteConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extension Glia {
///
/// - Parameters:
/// - engagementKind: Engagement media type.
/// - in: Queue identifiers
/// - uiConfig: Remote UI configuration.
/// - assetsBuilder: Provides assets for remote configuration.
/// - features: Set of features to be enabled in the SDK.
Expand All @@ -22,6 +23,7 @@ extension Glia {
///
public func startEngagementWithConfig(
engagement: EngagementKind,
in queueIds: [String],
uiConfig: RemoteConfiguration,
assetsBuilder: RemoteConfiguration.AssetsBuilder = .standard,
features: Features = .all,
Expand All @@ -46,6 +48,7 @@ extension Glia {

try startEngagement(
engagementKind: engagement,
in: queueIds,
theme: theme,
features: features,
sceneProvider: sceneProvider
Expand Down
1 change: 1 addition & 0 deletions TestingApp/ViewController/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ extension ViewController {

try? Glia.sharedInstance.startEngagementWithConfig(
engagement: kind,
in: [queueId],
uiConfig: config
)
}
Expand Down