-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathcustomerio-flutter.api
More file actions
314 lines (289 loc) · 9.52 KB
/
customerio-flutter.api
File metadata and controls
314 lines (289 loc) · 9.52 KB
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
public final class CioLogLevel {
static public val debug: CioLogLevel;
static public val error: CioLogLevel;
static public val info: CioLogLevel;
static public val none: CioLogLevel;
static public val values: List<CioLogLevel>;
}
public final class CustomerIO {
public fun clearIdentify();
static public fun createInstance(
CustomerIOPlatform? platform,
CustomerIOMessagingPushPlatform? pushMessaging,
CustomerIOMessagingInAppPlatform? inAppMessaging,
CustomerIOLocationPlatform? location
): CustomerIO;
public fun deleteDeviceToken();
public fun identify(
required String userId,
Map<String, dynamic> traits
);
static public fun initialize(required CustomerIOConfig config): Future<void> async;
public fun registerDeviceToken(required String deviceToken);
static public fun reset();
public fun screen(
required String title,
Map<String, dynamic> properties
);
public fun setDeviceAttributes(required Map<String, dynamic> attributes);
public fun setProfileAttributes(required Map<String, dynamic> attributes);
public fun track(
required String name,
Map<String, dynamic> properties
);
public fun trackMetric(
required String deliveryID,
required String deviceToken,
required MetricEvent event
);
static public val inAppMessaging: CustomerIOMessagingInAppPlatform;
static public val instance: CustomerIO;
static public val location: CustomerIOLocationPlatform;
static public val pushMessaging: CustomerIOMessagingPushPlatform;
}
public final class CustomerIOConfig {
public fun new(
required String cdpApiKey,
String? migrationSiteId,
Region? region,
CioLogLevel? logLevel,
bool? autoTrackDeviceAttributes,
bool? trackApplicationLifecycleEvents,
String? apiHost,
String? cdnHost,
int? flushAt,
int? flushInterval,
ScreenView? screenViewUse,
InAppConfig? inAppConfig,
PushConfig? pushConfig,
LocationConfig? locationConfig
): CustomerIOConfig;
public fun toMap(): Map<String, dynamic>;
public val apiHost: String?;
public val autoTrackDeviceAttributes: bool?;
public val cdnHost: String?;
public val cdpApiKey: String;
public val flushAt: int?;
public val flushInterval: int?;
public val inAppConfig: InAppConfig?;
public val locationConfig: LocationConfig?;
public val logLevel: CioLogLevel?;
public val migrationSiteId: String?;
public val pushConfig: PushConfig;
public val region: Region?;
public val screenViewUse: ScreenView?;
public val source: String;
public val trackApplicationLifecycleEvents: bool?;
public val version: String;
}
public final class CustomerIOLocationPlatform {
public fun new(): CustomerIOLocationPlatform;
public fun requestLocationUpdate();
public fun setLastKnownLocation(
required double latitude,
required double longitude
);
static public var instance: CustomerIOLocationPlatform;
}
public final class CustomerIOMessagingInAppPlatform {
public fun new(): CustomerIOMessagingInAppPlatform;
public fun dismissMessage();
public fun getMessages(String? topic): Future<List<InboxMessage>> async;
public fun markInboxMessageDeleted(required InboxMessage message);
public fun markInboxMessageOpened(required InboxMessage message);
public fun markInboxMessageUnopened(required InboxMessage message);
public fun messages(String? topic): Stream<List<InboxMessage>>;
public fun subscribeToEventsListener(void Function(InAppEvent) onEvent): StreamSubscription<dynamic>;
public fun trackInboxMessageClicked(
required InboxMessage message,
String? actionName
);
public val inbox: NotificationInbox;
static public var instance: CustomerIOMessagingInAppPlatform;
}
public final class CustomerIOMessagingPushPlatform {
public fun new(): CustomerIOMessagingPushPlatform;
public fun getRegisteredDeviceToken(): Future<String?> async;
public fun onBackgroundMessageReceived(Map<String, dynamic> message): Future<bool> async;
public fun onMessageReceived(
Map<String, dynamic> message,
bool handleNotificationTrigger
): Future<bool> async;
static public var instance: CustomerIOMessagingPushPlatform;
}
public final class CustomerIOPlatform {
public fun new(): CustomerIOPlatform;
public fun clearIdentify();
public fun deleteDeviceToken();
public fun identify(
required String userId,
Map<String, dynamic> traits
);
public fun initialize(required CustomerIOConfig config): Future<void> async;
public fun registerDeviceToken(required String deviceToken);
public fun screen(
required String title,
Map<String, dynamic> properties
);
public fun setDeviceAttributes(required Map<String, dynamic> attributes);
public fun setProfileAttributes(required Map<String, dynamic> attributes);
public fun track(
required String name,
Map<String, dynamic> properties
);
public fun trackMetric(
required String deliveryID,
required String deviceToken,
required MetricEvent event
);
static public var instance: CustomerIOPlatform;
}
public final class EventType {
static public val errorWithMessage: EventType;
static public val messageActionTaken: EventType;
static public val messageDismissed: EventType;
static public val messageShown: EventType;
static public val values: List<EventType>;
}
public final class InAppConfig {
public fun new(required String siteId): InAppConfig;
public fun toMap(): Map<String, dynamic>;
public val siteId: String;
}
public final class InAppEvent {
public fun fromMap(
EventType type,
Map<String?, dynamic> map
): InAppEvent;
public fun new(
required EventType eventType,
required InAppMessage message,
String? actionValue,
String? actionName
): InAppEvent;
public val actionName: String?;
public val actionValue: String?;
public val eventType: EventType;
public val message: InAppMessage;
}
public final class InAppEventListener {
public fun new(): InAppEventListener;
public fun errorWithMessage(InAppMessage message);
public fun messageActionTaken(
InAppMessage message,
String actionValue,
String actionName
);
public fun messageDismissed(InAppMessage message);
public fun messageShown(InAppMessage message);
}
public final class InAppMessage {
public fun new(
required String messageId,
String? deliveryId
): InAppMessage;
public val deliveryId: String?;
public val messageId: String;
}
public final class InAppMessage {
public fun new(
required String messageId,
String? deliveryId,
String? elementId
): InAppMessage;
public val deliveryId: String?;
public val elementId: String?;
public val hashCode: int;
public val messageId: String;
}
public final class InboxMessage {
public fun fromMap(Map<String, dynamic> map): InboxMessage;
public fun new(
required String queueId,
String? deliveryId,
DateTime? expiry,
required DateTime sentAt,
required List<String> topics,
required String type,
required bool opened,
int? priority,
required Map<String, dynamic> properties
): InboxMessage;
public fun toMap(): Map<String, dynamic>;
public val deliveryId: String?;
public val expiry: DateTime?;
public val hashCode: int;
public val opened: bool;
public val priority: int?;
public val properties: Map<String, dynamic>;
public val queueId: String;
public val sentAt: DateTime;
public val topics: List<String>;
public val type: String;
}
public final class InlineInAppMessageView {
public fun new(
Key? key,
required String elementId,
void Function(InAppMessage, String, String)? onActionClick
): InlineInAppMessageView;
public val elementId: String;
public val onActionClick: void Function(InAppMessage, String, String)?;
}
public final class LocationConfig {
public fun new(LocationTrackingMode trackingMode): LocationConfig;
public fun toMap(): Map<String, dynamic>;
public val trackingMode: LocationTrackingMode;
}
public final class LocationTrackingMode {
static public val manual: LocationTrackingMode;
static public val off: LocationTrackingMode;
static public val onAppStart: LocationTrackingMode;
public val rawValue: String;
static public val values: List<LocationTrackingMode>;
}
public final class MetricEvent {
static public val converted: MetricEvent;
static public val delivered: MetricEvent;
static public val opened: MetricEvent;
static public val values: List<MetricEvent>;
}
public final class NotificationInbox {
public fun new(CustomerIOMessagingInAppPlatform? platform): NotificationInbox;
public fun getMessages(String? topic): Future<List<InboxMessage>> async;
public fun markMessageDeleted(InboxMessage message);
public fun markMessageOpened(InboxMessage message);
public fun markMessageUnopened(InboxMessage message);
public fun messages(String? topic): Stream<List<InboxMessage>>;
public fun trackMessageClicked(
InboxMessage message,
String? actionName
);
}
public final class PushClickBehaviorAndroid {
static public val activityNoFlags: PushClickBehaviorAndroid;
static public val activityPreventRestart: PushClickBehaviorAndroid;
public val rawValue: String;
static public val resetTaskStack: PushClickBehaviorAndroid;
static public val values: List<PushClickBehaviorAndroid>;
}
public final class PushConfig {
public fun new(PushConfigAndroid? android): PushConfig;
public fun toMap(): Map<String, dynamic>;
public var pushConfigAndroid: PushConfigAndroid;
}
public final class PushConfigAndroid {
public fun new(PushClickBehaviorAndroid pushClickBehavior): PushConfigAndroid;
public fun toMap(): Map<String, dynamic>;
public var pushClickBehavior: PushClickBehaviorAndroid;
}
public final class Region {
static public val eu: Region;
static public val us: Region;
static public val values: List<Region>;
}
public final class ScreenView {
static public val all: ScreenView;
static public val inApp: ScreenView;
static public val values: List<ScreenView>;
}