1
wei
2021-01-21 62d098cb78296feaa6f786a20748921338db838c
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
//
// TuyaSmartHomeInvitation.h
// TuyaSmartDeviceKit
//
// Copyright (c) 2014-2021 Tuya Inc. (https://developer.tuya.com)
 
#import <Foundation/Foundation.h>
 
NS_ASSUME_NONNULL_BEGIN
 
@interface TuyaSmartHomeInvitation : NSObject
 
/// Invite new members by invitation code.
/// @param createRequestModel The request model.
/// @param success Called when the task finishes successfully. TuyaSmartHomeInvitationResultModel will be returned.
/// @param failure If error occurred while adding the task, this block will be called.
- (void)createInvitationWithCreateRequestModel:(TuyaSmartHomeInvitationCreateRequestModel *)createRequestModel
                                       success:(void(^)(TuyaSmartHomeInvitationResultModel *invitationResultModel))success
                                       failure:(TYFailureError)failure;
 
/// Cancel invitation.
/// @param invitationID invitation ID
/// @param success Called when the task finishes successfully.
/// @param failure If error occurred while adding the task, this block will be called.
- (void)cancelInvitationWithInvitationID:(NSNumber *)invitationID
                                 success:(TYSuccessBOOL)success
                                 failure:(TYFailureError)failure;
 
/// Re-invite members.
/// @param reinviteRequestModel The re-invite request model.
/// @param success Called when the task finishes successfully. TuyaSmartHomeInvitationResultModel will be returned.
/// @param failure If error occurred while adding the task, this block will be called.
- (void)reinviteInvitationWithReinviteRquestModel:(TuyaSmartHomeInvitationReinviteRequestModel *)reinviteRequestModel
                                          success:(void(^)(TuyaSmartHomeInvitationResultModel *invitationResultModel))success
                                          failure:(TYFailureError)failure;
 
/// Get invitation record list information.
/// @param homeID homeID
/// @param success Called when the task finishes successfully. A list of TuyaSmartHomeInvitationRecordModel will be returned.
/// @param failure If error occurred while adding the task, this block will be called.
- (void)fetchInvitationRecordListWithHomeID:(long long)homeID
                                    success:(void(^)(NSArray<TuyaSmartHomeInvitationRecordModel *> *invitationRecordList))success
                                    failure:(TYFailureError)failure;
 
/// Update invitation information.
/// @param invitationInfoRequestModel The invitation info request model.
/// @param success Called when the task finishes successfully.
/// @param failure If error occurred while adding the task, this block will be called.
- (void)updateInvitationInfoWithInvitationInfoRequestModel:(TuyaSmartHomeInvitationInfoRequestModel *)invitationInfoRequestModel
                                                   success:(TYSuccessBOOL)success
                                                   failure:(TYFailureError)failure;
 
 
/// Get family information of the invitee.
/// @param invitationCode The invitation code.
/// @param success Called when the task finishes successfully. TuyaSmartHomeModel will be returned.
/// @param failure If error occurred while adding the task, this block will be called.
- (void)fetchInvitationHomeInfoWithInvitationCode:(NSString *)invitationCode
                                          success:(void(^)(TuyaSmartHomeModel *homeModel))success
                                          failure:(TYFailureError)failure;
 
/// Join the family.
/// @param invitationCode The invitation code.
/// @param success Called when the task finishes successfully.
/// @param failure If error occurred while adding the task, this block will be called.
- (void)joinHomeWithInvitationCode:(NSString *)invitationCode
                           success:(TYSuccessBOOL)success
                           failure:(TYFailureError)failure;
@end
 
NS_ASSUME_NONNULL_END