Skip to content

Commit

Permalink
Added Related Channels.
Browse files Browse the repository at this point in the history
* Added `relatedChannels` in `SBDSKTicket`.
    * Added `createTicketWithTitle:userName:relatedChannels:completionHandler:` and `createTicketWithTitle:userName:groupKey:customFields:priority:relatedChannels:completionHandler:`.
* Added `SBDSKRelatedChannel` type.
* Added `setRelatedChannels:completionHandler:` in `SBDSKTicket`.
  • Loading branch information
mininny committed Apr 28, 2020
1 parent 6ef9571 commit b632ee7
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

### v1.0.7 (Apr 28, 2020)
* Added `relatedChannels` in `SBDSKTicket`.
* Added `createTicketWithTitle:userName:relatedChannels:completionHandler:` and `createTicketWithTitle:userName:groupKey:customFields:priority:relatedChannels:completionHandler:`.
* Added `SBDSKRelatedChannel` type.
* Added `setRelatedChannels:completionHandler:` in `SBDSKTicket`.

### v1.0.6 (Jan 3, 2020)
* Added `setCustomFields:completionHandler:` in `SBDSKTicket` class.
* Added `priority` type in Ticket
Expand All @@ -26,4 +32,4 @@
* Minor bug fix.

### v0.9.9(Aug 1, 2017)
* First release.
* First release.
2 changes: 1 addition & 1 deletion SendBirdDesk.framework.dSYM/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0.6</string>
<string>1.0.7</string>
</dict>
</plist>
Binary file not shown.
35 changes: 35 additions & 0 deletions SendBirdDesk.framework/Headers/SBDSKRelatedChannel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// SBDSKRelatedChannel.h
// SendBirdDesk
//
// Created by Minhyuk Kim on 2020/04/22.
// Copyright © 2020 Sendbird. All rights reserved.
//

#ifndef SBDSKRelatedChannel_h
#define SBDSKRelatedChannel_h

/**
This class represents a channel that is related to a `SBDSKTicket`. It contains a string `name` and string `channelUrl` of the related channel.
@since 1.0.7
*/
@interface SBDSKRelatedChannel: NSObject

/**
The name of the related channel.
@since 1.0.7
*/
@property (strong, nonatomic, nonnull) NSString *name;

/**
The channel url of the related channel.
@since 1.0.7
*/
@property (strong, nonatomic, nonnull) NSString *channelUrl;

@end

#endif /* SBDSKRelatedChannel_h */
50 changes: 50 additions & 0 deletions SendBirdDesk.framework/Headers/SBDSKTicket.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#import <SendBirdSDK/SendBirdSDK.h>
#import "SBDSKAgent.h"
#import "SBDSKTypes.h"
#import "SBDSKRelatedChannel.h"

/**
This class represents a ticket that identifies a chat between an <span>agent</span> and a customer.
Expand Down Expand Up @@ -51,6 +52,8 @@
*/
@property (assign, nonatomic, readonly) SBDSKTicketPriority priority;

@property (strong, nonatomic, nonnull, readonly) NSArray<SBDSKRelatedChannel *> *relatedChannels;

/**
Refreshes this ticket. After invoking this method, this ticket is updated with the latest data.
Expand Down Expand Up @@ -131,6 +134,42 @@
priority:(SBDSKTicketPriority)priority
completionHandler:(nullable void (^)(SBDSKTicket * _Nullable ticket, SBDError * _Nullable error))completionHandler;

/**
Creates a new ticket with information.
@param title The <span>title</span> of a new ticket.
@param userName The customer's name.
@param relatedChannels List of Urls of the channels related with the ticket.
@param completionHandler The handler block to execute. If the method creates a ticket successfully, the `ticket` object will be valid and the `error` will be nil.
@since 1.0.7
*/
+ (void)createTicketWithTitle:(nullable NSString *)title
userName:(nullable NSString *)userName
relatedChannels:(nullable NSArray<NSString *> *)relatedChannels
completionHandler:(nullable void (^)(SBDSKTicket * _Nullable ticket, SBDError * _Nullable error))completionHandler;

/**
Creates a new ticket with information.
@param title The <span>title</span> of a new ticket.
@param userName The customer's name.
@param groupKey The agent group key.
@param customFields The custom fields that the admin already sets on dashboard.
@param priority The priority level of ticket.
@param relatedChannels List of Urls of the channels related with the ticket.
@param completionHandler The handler block to execute. If the method creates a ticket successfully, the `ticket` object will be valid and the `error` will be nil.
@since 1.0.7
*/
+ (void)createTicketWithTitle:(nullable NSString *)title
userName:(nullable NSString *)userName
groupKey:(nullable NSString *)groupKey
customFields:(nullable NSDictionary<NSString *, NSString *> *)customFields
priority:(SBDSKTicketPriority)priority
relatedChannels:(nullable NSArray<NSString *> *)relatedChannels
completionHandler:(nullable void (^)(SBDSKTicket * _Nullable ticket, SBDError * _Nullable error))completionHandler;

/**
Creates a new ticket with information.
Expand Down Expand Up @@ -258,4 +297,15 @@ Sets the specific ticket's priority. The priority has a string type key and a `S
- (void)setPriority:(SBDSKTicketPriority)priority
completionHandler:(nullable void (^)(SBDError * _Nullable error))completionHandler;

/**
Sets the specific ticket's related channels. The method accepts an array of string, and updates the `SBDSKRelatedChannel` array of the ticket.
@param relatedChannels The specific ticket's related channels.
@param completionHandler The handler block to execute. If the method sets successfully, the `error` will be nil.
@since 1.0.7
*/
- (void)setRelatedChannels:(NSArray<NSString *> * _Nonnull)relatedChannels
completionHandler:(nullable void (^)(SBDError * _Nullable error))completionHandler;

@end
Binary file modified SendBirdDesk.framework/Info.plist
Binary file not shown.
Binary file modified SendBirdDesk.framework/SendBirdDesk
Binary file not shown.
4 changes: 2 additions & 2 deletions SendBirdDesk.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = "SendBirdDesk"
s.version = "1.0.6"
s.version = "1.0.7"
s.summary = "SendBird Desk iOS Framework"
s.description = "SendBird Desk iOS Framework"
s.homepage = "https://desk.sendbird.com"
s.license = "Commercial"
s.author = { "Jed Gyeong" => "[email protected]", "Tez Park" => "[email protected]" }
s.author = { "Jed Gyeong" => "[email protected]", "Tez Park" => "[email protected]", "Minhyuk Kim" => "[email protected]" }
s.source = { :git => "https://github.com/sendbird/SendBird-Desk-iOS-Framework.git", :tag => "v#{s.version}" }
s.requires_arc = true
s.platform = :ios, "8.0"
Expand Down

0 comments on commit b632ee7

Please sign in to comment.