summaryrefslogtreecommitdiff
path: root/platform/ios/vendor/mapbox-accounts-ios/MBXSKUToken.h
blob: 8a02d9641ccb7979f3ff73c898b0ec39f1d19dc8 (plain)
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
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef NSString *MBXAccountsSKUID NS_TYPED_ENUM;
FOUNDATION_EXTERN const MBXAccountsSKUID MBXAccountsSKUIDMaps;
FOUNDATION_EXTERN const MBXAccountsSKUID MBXAccountsSKUIDNavigation;

typedef NS_ENUM(NSInteger, MBXAccountsSKUType) {
    MBXAccountsSKUTypeUser,
    MBXAccountsSKUTypeSession
};

@interface MBXSKUToken : NSObject

/**
 Generates a token for the given identifier and type.
 
 @param skuId   The sku identifier, e.g. maps or navigation.
 @param type    The type of token, e.g. user or session.
 
 @return A SKU token for use with API requests.
 */
+ (NSString *)tokenForSKUID:(MBXAccountsSKUID)skuId type:(MBXAccountsSKUType)type NS_SWIFT_NAME(token(for:type:));

@end

NS_ASSUME_NONNULL_END