Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #374 from zendesk/killiansmith0/v2.0.2
Browse files Browse the repository at this point in the history
Update to v2.0.2
  • Loading branch information
Killian Smith authored Apr 26, 2018
2 parents e1d36c5 + dec5a8a commit 5dd0d59
Show file tree
Hide file tree
Showing 781 changed files with 11,861 additions and 371 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:warning: *Use of this software is subject to important terms and conditions as set forth in the License file* :warning:

# Zendesk Mobile SDK for iOS 2.0.0
# Zendesk Mobile SDK for iOS 2.0.2

Zendesk SDK for mobile is a quick, convenient way to get customer support into your mobile apps. With just a few lines of code, you can provide your end users with an easy way to get in touch from any mobile app.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, ZDKLogLevel, "LogLevel") {
SWIFT_CLASS_NAMED("User")
@interface ZDKUser : NSObject
/// The user’s id
@property (nonatomic, readonly) NSInteger id;
@property (nonatomic, readonly, copy) NSString * _Nonnull id;
/// The user’s name
@property (nonatomic, readonly, copy) NSString * _Nonnull name;
/// The users content url
Expand All @@ -256,7 +256,7 @@ SWIFT_CLASS_NAMED("User")
SWIFT_CLASS_NAMED("UserField")
@interface ZDKUserField : NSObject
/// User Field id
@property (nonatomic, readonly) NSInteger id;
@property (nonatomic, readonly, copy) NSString * _Nonnull id;
/// Url of user field
@property (nonatomic, readonly, copy) NSString * _Nonnull url;
/// key of the user field
Expand Down Expand Up @@ -294,7 +294,7 @@ SWIFT_CLASS_NAMED("UserField")
SWIFT_CLASS_NAMED("UserFieldOption")
@interface ZDKUserFieldOption : NSObject
/// id of option
@property (nonatomic, readonly) NSInteger id;
@property (nonatomic, readonly, copy) NSString * _Nonnull id;
/// name of option
@property (nonatomic, readonly, copy) NSString * _Nonnull name;
/// position of option
Expand All @@ -318,6 +318,7 @@ SWIFT_CLASS("_TtC14ZendeskCoreSDK16ZDKObjCAnonymous")
@interface ZDKObjCAnonymous : NSObject <ZDKObjCIdentity>
@property (nonatomic, readonly, copy) NSString * _Nullable name;
@property (nonatomic, readonly, copy) NSString * _Nullable email;
@property (nonatomic, readonly, copy) NSString * _Nullable guid;
- (nonnull instancetype)initWithName:(NSString * _Nullable)name email:(NSString * _Nullable)email OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,17 @@ typedef void (^ZDKHelpCenterGenericCallback)(id response, NSError *error);

@interface ZDKHelpCenterProvider : ZDKProvider


@property (nonatomic, copy, readonly) NSString *locale;

+ (instancetype) new NS_UNAVAILABLE;

- (instancetype)init NS_UNAVAILABLE;

- (instancetype)initWithZendesk:(Zendesk *)zendesk NS_UNAVAILABLE;

/**
* Creates a Help Center provider.
*
* @param locale The locale which all help center provider requests will contain.
* @since 1.7.0.1
*/
- (instancetype)initWithLocale:(NSString *)locale;

/**
* Fetches the data required to model the overview UI in Help Center.
*
* @param helpCenterModel content model to scope
* @param callback callback which provides an array of ZDKHelpCenterCategoryViewModel
*
* @since 1.7.0.1
* @since 2.0.2
*/
- (void) getHelpCenterOverviewWithHelpCenterOverviewModel:(ZDKHelpCenterOverviewContentModel *)helpCenterModel callback:(ZDKHelpCenterCategoriesCallback)callback;

Expand All @@ -85,38 +72,42 @@ typedef void (^ZDKHelpCenterGenericCallback)(id response, NSError *error);
/**
* Fetch a list of sections for a given categoryId from a Help Center instance
*
* @param categoryId NSInteger to specify what sections should be returned, only sections belonging to the category will be returned
* @param categoryId NSString to specify what sections should be returned, only sections belonging to the category will be returned
* @param callback Callback that will deliver a list of sections available on the instance of the Help Center for the provided locale and categoryId
*
* @since 2.0.2
*/
- (void) getSectionsForCategoryId:(NSInteger) categoryId withCallback:(ZDKHelpCenterCallback)callback;
- (void) getSectionsWithCategoryId:(NSString *) categoryId withCallback:(ZDKHelpCenterCallback)callback;

/**
* Fetch a list of articles for a given sectionId from a Help Center instance
*
* @param sectionId NSInteger to specify what articles should be returned, only articles belonging to the section will be returned
* @param sectionId NSString to specify what articles should be returned, only articles belonging to the section will be returned
* @param callback Callback that will deliver a list of articles available on the instance of the Help Center for the provided locale and sectionId
*
* @since 2.0.0
* @since 2.0.2
*/
- (void) getArticlesForSectionId:(NSInteger)sectionId withCallback:(ZDKHelpCenterCallback)callback;
- (void) getArticlesWithSectionId:(NSString *)sectionId withCallback:(ZDKHelpCenterCallback)callback;

/**
* Fetch a list of articles for a given sectionId from a Help Center instance
*
* @param sectionId NSInteger to specify what articles should be returned, only articles belonging to the section will be returned
* @param sectionId NSString to specify what articles should be returned, only articles belonging to the section will be returned
* @param labels an array of labels used to filter articles by
* @param callback Callback that will deliver a list of articles available on the instance of the Help Center for the provided locale and sectionId
*
* @since 2.0.0
* @since 2.0.2
*/
- (void) getArticlesForSectionId:(NSInteger)sectionId labels:(NSArray *)labels withCallback:(ZDKHelpCenterCallback)callback;
- (void) getArticlesWithSectionId:(NSString *)sectionId labels:(NSArray *)labels withCallback:(ZDKHelpCenterCallback)callback;

/**
* This method will search articles in your Help Center.
* This method will also sideload categories, sections and users.
*
* @param query The query text used to perform the search
* @param callback The callback which will be called upon a successful or an erroneous response.
*
* @since 2.0.2
*/
- (void) searchForArticlesUsingQuery:(NSString *)query withCallback:(ZDKHelpCenterCallback)callback;

Expand All @@ -126,6 +117,8 @@ typedef void (^ZDKHelpCenterGenericCallback)(id response, NSError *error);
* @param query The query text used to perform the search
* @param labels The array of labels used to filter the search results
* @param callback The callback which will be called upon a successful or an erroneous response.
*
* @since 2.0.2
*/
- (void) searchForArticlesUsingQuery:(NSString *)query andLabels:(NSArray <NSString*> *)labels withCallback:(ZDKHelpCenterCallback)callback;

Expand All @@ -135,6 +128,8 @@ typedef void (^ZDKHelpCenterGenericCallback)(id response, NSError *error);
* @param search The search to perform.
* @param callback The callback which will be called upon a successful or an erroneous response.
* @see <a href="https://developer.zendesk.com/rest_api/docs/help_center/search">Searching Help Center.</a>
*
* @since 2.0.2
*/
- (void) searchArticles:(ZDKHelpCenterSearch*) search withCallback:(ZDKHelpCenterCallback)callback;

Expand All @@ -144,9 +139,9 @@ typedef void (^ZDKHelpCenterGenericCallback)(id response, NSError *error);
* @param articleId the identifier to be used to retrieve an article from a Help Center instance
* @param callback the callback that is invoked when a request is either successful or has errors
*
* @since 2.0.0
* @since 2.0.2
*/
- (void) getAttachmentForArticleId:(NSInteger)articleId withCallback:(ZDKHelpCenterCallback)callback;
- (void) getAttachmentWithArticleId:(NSString *)articleId withCallback:(ZDKHelpCenterCallback)callback;

/**
* Fetch a list of articles for a given array of labels from a Help Center instance
Expand All @@ -162,9 +157,9 @@ typedef void (^ZDKHelpCenterGenericCallback)(id response, NSError *error);
* @param articleId The ID of the article to fetch.
* @param callback The callback that is invoked when a request is either successful or has error.
*
* @since 2.0.0
* @since 2.0.2
*/
- (void) getArticleById:(NSInteger)articleId withCallback:(ZDKHelpCenterCallback)callback;
- (void) getArticleWithId:(NSString *)articleId withCallback:(ZDKHelpCenterCallback)callback;


/**
Expand All @@ -189,22 +184,22 @@ typedef void (^ZDKHelpCenterGenericCallback)(id response, NSError *error);
/**
* Fetches a section object for a particular sectionId.
*
* @since 2.0.0
* @since 2.0.2
*
* @param sectionId The id of the section to fetch.
* @param callback The callback that is invoked when a request is either successful or has error.
*/
- (void) getSectionById:(NSInteger)sectionId withCallback:(ZDKHelpCenterCallback)callback;
- (void) getSectionWithId:(NSString *)sectionId withCallback:(ZDKHelpCenterCallback)callback;

/**
* Fetches a category object for a particular categoryId.
*
* @since 2.0.0
* @since 2.0.2
*
* @param categoryId The id of the section to fetch.
* @param callback The callback that is invoked when a request is either successful or has error.
*/
- (void) getCategoryById:(NSInteger)categoryId withCallback:(ZDKHelpCenterCallback)callback;
- (void) getCategoryWithId:(NSString *)categoryId withCallback:(ZDKHelpCenterCallback)callback;

/**
* Used for the purpose of reporting in Zendesk. This will record an article as being viewed by the client.
Expand All @@ -220,23 +215,23 @@ typedef void (^ZDKHelpCenterGenericCallback)(id response, NSError *error);
/**
* Post an upvote for a given article. If a vote already exists for the source object it is updated.
*
* @since 2.0.0
* @since 2.0.2
*
* @param articleId The id of the article to upvote.
* @param callback The callback that is invoked when a request is either successful or has error. Returns the vote object.
*/
- (void) upvoteArticleWithId:(NSInteger)articleId withCallback:(ZDKHelpCenterCallback)callback;
- (void) upVoteArticleWithId:(NSString *)articleId withCallback:(ZDKHelpCenterCallback)callback;


/**
* Post a downvote for a given article. If a vote already exists for the source object it is updated.
*
* @since 2.0.0
* @since 2.0.2
*
* @param articleId The id of the article to downvote.
* @param callback The callback that is invoked when a request is either successful or has error. Returns the vote object.
*/
- (void) downvoteArticleWithId:(NSInteger)articleId withCallback:(ZDKHelpCenterCallback)callback;
- (void) downVoteArticleWithId:(NSString *)articleId withCallback:(ZDKHelpCenterCallback)callback;


/**
Expand All @@ -247,6 +242,6 @@ typedef void (^ZDKHelpCenterGenericCallback)(id response, NSError *error);
* @param voteId The id of the vote to delete
* @param callback The callback that is invoked when a request is either successful or has error. Returns a status code
*/
- (void) deleteVoteWithId:(NSInteger)voteId withCallback:(ZDKHelpCenterGenericCallback)callback;
- (void) removeVoteWithId:(NSString *)voteId withCallback:(ZDKHelpCenterGenericCallback)callback;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
*/
@interface ZDKProvider : NSObject

@property (nonatomic, strong, readonly) ZDKZendesk *zendesk;

- (instancetype)initWithZendesk:(ZDKZendesk*)zendesk;
- (_Nonnull instancetype)init;


@end
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ SWIFT_CLASS("_TtC18ZendeskProviderSDK13HTMLSanitizer")
SWIFT_CLASS_NAMED("HelpCenterArticleViewModel")
@interface ZDKHelpCenterArticleViewModel : NSObject
@property (nonatomic, readonly, copy) NSString * _Nonnull name;
@property (nonatomic, readonly) NSInteger id;
@property (nonatomic, readonly) NSInteger section_id;
@property (nonatomic, readonly, copy) NSString * _Nonnull id;
@property (nonatomic, readonly, copy) NSString * _Nonnull section_id;
+ (NSArray<ZDKHelpCenterArticleViewModel *> * _Nonnull)convertWithArticles:(NSArray<ZDKHelpCenterArticle *> * _Nonnull)articles SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end
Expand Down Expand Up @@ -270,8 +270,8 @@ SWIFT_CLASS_NAMED("HelpCenterSectionViewModel")
@interface ZDKHelpCenterSectionViewModel : NSObject
@property (nonatomic, readonly, copy) NSString * _Nonnull name;
@property (nonatomic, readonly, copy) NSArray<ZDKHelpCenterArticleViewModel *> * _Nonnull articles;
@property (nonatomic, readonly) NSInteger id;
@property (nonatomic, readonly) NSInteger category_id;
@property (nonatomic, readonly, copy) NSString * _Nonnull id;
@property (nonatomic, readonly, copy) NSString * _Nonnull category_id;
@property (nonatomic, readonly) NSInteger article_count;
@property (nonatomic, readonly, copy) NSString * _Nonnull detailTitle;
- (ZDKHelpCenterSectionViewModel * _Nonnull)sectionByReplacingWithArticles:(NSArray<ZDKHelpCenterArticleViewModel *> * _Nonnull)articles SWIFT_WARN_UNUSED_RESULT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* ZendeskProviderSDK.h
* ZendeskProviderSDK
*
* Created by Zendesk on 03/22/2018
* Created by Zendesk on 03/25/2018
*
* Copyright (c) 2018 Zendesk. All rights reserved.
*
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 5dd0d59

Please sign in to comment.