lpw
2025-03-18 1d8bbd004596d25819f93bded305d555a2893b16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
//
//  AIHelpSupportSDK
//
//  Created by AIHelp.
//  Copyright © 2020 aihelp.net. All rights reserved.
//
 
#import <Foundation/Foundation.h>
#import <AIHelpSupportSDK/AIHelpSDKConfig.h>
#import <UIKit/UIKit.h>
 
@interface AIHelpSupportSDK : NSObject
 
/**
 * Initialize AIHelp sdk
 *
 * When initializing AIHelp you must pass these three tokens. You initialize AIHelp by adding the following lines in the implementation file for your app delegate, ideally at the top of application:didFinishLaunchingWithOptions
 * @param domainName This is your domain name without any http:// or forward slashes
 * @param appId  This is the unique ID assigned to your app
 */
+ (void)initializeWithDomainName:(NSString *)domainName appId:(NSString *)appId;
 
/**
 * Initialize AIHelp sdk
 *
 * When initializing AIHelp you must pass these three tokens. You initialize AIHelp by adding the following lines in the implementation file for your app delegate, ideally at the top of application:didFinishLaunchingWithOptions
 * @param domainName This is your domain name without any http:// or forward slashes
 * @param appId  This is the unique ID assigned to your app
 * @param language  This is your expected init language
 */
+ (void)initializeWithDomainName:(NSString *)domainName appId:(NSString *)appId language:(NSString *)language;
 
/**
 * Logs in a user using their user ID.
 * * @param userId the unique identifier of the user to log in
 */
+ (void)loginWithUserId:(NSString *)userId;
 
/**
 * Logs in a user using a LoginConfig object.
 * <p>
 * Checkout {@link LoginConfig} for more information.
 *
 * @param config the configuration object containing login details.
 * @see LoginConfig
 */
+ (void)login:(AIHelpLoginConfig *)config;
 
/**
 * Show the AIHelp conversation screen.
 *
 * If you want to custom your welcome message, please check next method for more information.
 */
+ (BOOL)showWithEntranceId:(NSString *)entranceId;
 
/**
 Show the AIHelp conversation screen.
 */
+ (BOOL)showWithApiConfig:(AIHelpApiConfig *)apiConfig;
 
+ (void)showSingleFAQ:(NSString *)faqId showConversationMoment:(AIHelpFAQShowConversationMoment)showConversationMoment;
 
/**
 * Update a user's profile via UserConfig.
 *
 * Please check ECServiceUserConfigfor more detail information.
 * @param config configs which contains all information about a user.
 */
+ (void)updateUserInfo:(AIHelpUserConfig *)config;
 
/**
 * Clear the values set to a user, reset the userId to deviceId, userName to 'anonymous'.
 */
+ (void)resetUserInfo;
 
/**
 * Change the SDK language. By default, the device's prefered language is used.
 *
 * The call will fail in the following cases :
 * 1. If a AIHelp session is already active at the time of invocation
 * 2. Language code is incorrect
 * 3. Corresponding localization file is not found
 * @param sdkLanguage the string representing the language code. For example, use 'fr' for French.
 */
+ (void)updateSDKLanguage:(NSString*)sdkLanguage;
 
/**
 * Set log path for uploading.
 *
 * In order to serve your customers well, you can upload customer-related-logs when tickets are created or
 * specific forms are submitted.
 * @param path the absolute path of log, which will be uploaded when needed
 */
+ (void)setUploadLogPath:(NSString*)path;
 
/**
 * set the pushToken and platform to enable push notifications.
 *
 * To enable push notifications in the Helpshift iOS SDK, set the Push Notifications’ deviceToken using this method inside your application:didRegisterForRemoteNotificationsWithDeviceToken application delegate.
 * NOTE: You must get the specific push sdk in your App BEFORE this invocation.
 *
 * @param pushToken    the pushToken received from the push notification servers.
 * @param pushPlatform the specific push platform, please check ElvaTokenPlatform  for more information.
 */
+ (void)setPushToken:(NSString*)pushToken pushPlatform:(AIHelpTokenPlatform)pushPlatform;
 
/**
 * Get current AIHelp SDK version
 * @return AIHelp SDK version
 */
+ (NSString*)getSDKVersion;
 
/**
 * Whether AIHelp session is visible to users
 * @return whether sdk is active
 */
+ (BOOL)isAIHelpShowing;
 
/**
 * Whether to print logs.
 *
 * It only works in Debug mode
 * @param enable YES/NO
 */
+ (void)enableLogging:(BOOL)enable;
 
/**
 * Unregisters an event listener for a specific event type.
 *
 * @param eventType The type of event to stop listening for.
 */
+ (void)registerAsyncListener:(AISupportAsyncEventListener)asyncEventListener
                    eventType:(AIHelpEventType)eventType;
 
+ (void)unregisterAsyncListenerWithEvent:(AIHelpEventType)eventType;
 
/**
 * Fetch unread message count proactively
 */
+ (void)fetchUnreadMessageCount;
 
+ (void)fetchUnreadTaskCount;
 
/**
 * AIHelp provide additional support for some country or regions.
 *
 * @param countryOrRegion ISO country code, please check https://www.iso.org/obp/ui/#search to learn more.
 */
+ (void)additionalSupportFor:(AIHelpPublishCountryOrRegion)countryOrRegion;
 
+ (void)showUrl:(NSString *)url;
 
+ (void)setKeyWindow:(UIWindow *)keyWin;
 
+ (void)close;
 
+ (void)logout;
 
@end