-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathcustomerio-flutter.api
More file actions
486 lines (446 loc) · 14.7 KB
/
Copy pathcustomerio-flutter.api
File metadata and controls
486 lines (446 loc) · 14.7 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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
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 CountdownTimerLiveActivityPayload {
public fun new(
required String header,
required String title,
String? statusMessage,
int? endTime
): CountdownTimerLiveActivityPayload;
public fun toMap(): Map<String, dynamic>;
public val endTime: int?;
public val header: String;
public val statusMessage: String?;
public val title: String;
public val type: LiveActivityTemplate;
}
public final class CustomLiveActivityPayload {
public fun new(required Map<String, String> data): CustomLiveActivityPayload;
public fun toMap(): Map<String, dynamic>;
public val data: Map<String, String>;
public val type: LiveActivityTemplate;
}
public final class CustomerIO {
public fun clearIdentify();
static public fun createInstance(
CustomerIOPlatform? platform,
CustomerIOMessagingPushPlatform? pushMessaging,
CustomerIOMessagingInAppPlatform? inAppMessaging,
CustomerIOLocationPlatform? location,
CustomerIOGeofencePlatform? geofence,
CustomerIOLiveActivitiesPlatform? liveActivities
): 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 geofence: CustomerIOGeofencePlatform;
static public val inAppMessaging: CustomerIOMessagingInAppPlatform;
static public val instance: CustomerIO;
static public val liveActivities: CustomerIOLiveActivitiesPlatform;
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,
GeofenceConfig? geofenceConfig,
CustomerIOConfigIos? iosConfig,
LiveActivitiesConfig? liveNotificationsConfig
): 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 geofenceConfig: GeofenceConfig?;
public val inAppConfig: InAppConfig?;
public val iosConfig: CustomerIOConfigIos?;
public val liveNotificationsConfig: LiveActivitiesConfig?;
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 CustomerIOConfigIos {
public fun new(bool? allowBackgroundDelivery): CustomerIOConfigIos;
public fun toMap(): Map<String, dynamic>;
public val allowBackgroundDelivery: bool?;
}
public final class CustomerIOGeofencePlatform {
public fun new(): CustomerIOGeofencePlatform;
public fun refreshFromCurrentLocation();
static public var instance: CustomerIOGeofencePlatform;
}
public final class CustomerIOLiveActivitiesPlatform {
public fun new(): CustomerIOLiveActivitiesPlatform;
public fun end(
String activityId,
LiveActivityPayload? payload
): Future<void> async;
public fun start(LiveActivityPayload payload): Future<String> async;
public fun update(
String activityId,
LiveActivityPayload payload
): Future<void> async;
static public var instance: CustomerIOLiveActivitiesPlatform;
}
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 setInboxEventListener(InboxEventListener? listener);
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 GeofenceConfig {
public fun new(GeofenceLocationMode locationMode): GeofenceConfig;
public fun toMap(): Map<String, dynamic>;
public val locationMode: GeofenceLocationMode;
}
public final class GeofenceLocationMode {
static public val automatic: GeofenceLocationMode;
static public val manual: GeofenceLocationMode;
public val rawValue: String;
static public val values: List<GeofenceLocationMode>;
}
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 InboxEventListener {
public fun new(): InboxEventListener;
public fun messageActionTaken(
InboxMessage message,
String actionName,
String actionValue
);
public fun messageDismissed(InboxMessage message);
public fun messageOpened(InboxMessage message);
public fun messageShown(InboxMessage message);
}
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 LiveActivitiesBranding {
public fun new(
String? companyName,
String? accentColorHex,
String? logoResource,
String? logoUrl,
String? smallIconResource
): LiveActivitiesBranding;
public fun toMap(): Map<String, dynamic>;
public val accentColorHex: String?;
public val companyName: String?;
public val logoResource: String?;
public val logoUrl: String?;
public val smallIconResource: String?;
}
public final class LiveActivitiesConfig {
public fun new(
List<LiveActivityTemplate> types,
String? customType,
LiveActivitiesBranding? branding
): LiveActivitiesConfig;
public fun toMap(): Map<String, dynamic>;
public val branding: LiveActivitiesBranding?;
public val customType: String?;
public val types: List<LiveActivityTemplate>;
}
public final class LiveActivityPayload {
public fun countdownTimer(
required String header,
required String title,
String? statusMessage,
int? endTime
): LiveActivityPayload;
public fun custom(required Map<String, String> data): LiveActivityPayload;
public fun new(LiveActivityTemplate type): LiveActivityPayload;
public fun segments(
required String header,
required String status,
String? substatus,
required int segmentsTotal,
required int segmentsComplete,
String? trailingText
): LiveActivityPayload;
public fun toMap(): Map<String, dynamic>;
public val type: LiveActivityTemplate;
}
public final class LiveActivityTemplate {
static public val countdownTimer: LiveActivityTemplate;
static public val custom: LiveActivityTemplate;
public val rawValue: String;
static public val segments: LiveActivityTemplate;
static public val values: List<LiveActivityTemplate>;
}
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 NotificationInboxBell {
public fun new(
Key? key,
void Function()? onTap
): NotificationInboxBell;
public val onTap: void Function()?;
}
public final class NotificationInboxView {
public fun new(Key? key): NotificationInboxView;
}
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>;
}
public final class SegmentsLiveActivityPayload {
public fun new(
required String header,
required String status,
String? substatus,
required int segmentsTotal,
required int segmentsComplete,
String? trailingText
): SegmentsLiveActivityPayload;
public fun toMap(): Map<String, dynamic>;
public val header: String;
public val segmentsComplete: int;
public val segmentsTotal: int;
public val status: String;
public val substatus: String?;
public val trailingText: String?;
public val type: LiveActivityTemplate;
}