Skip to content

Commit

Permalink
fixing linting to able to push
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahroz16 committed Oct 11, 2023
1 parent b761817 commit c3ee83f
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 79 deletions.
38 changes: 15 additions & 23 deletions datapipeline/api/datapipeline.api
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,25 @@ public final class io/customer/datapipeline/BuildConfig {
public fun <init> ()V
}

public final class io/customer/datapipeline/DataPipelineModuleConfig : io/customer/sdk/module/CustomerIOModuleConfig {
public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getApiKey ()Ljava/lang/String;
public final class io/customer/datapipeline/DataPipelineModuleConfig {
public synthetic fun <init> (Ljava/lang/String;Landroid/app/Application;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getApplication ()Landroid/app/Application;
public final fun getConfiguration ()Lkotlin/jvm/functions/Function1;
public final fun getWriteKey ()Ljava/lang/String;
}

public final class io/customer/datapipeline/DataPipelineModuleConfig$Builder : io/customer/sdk/module/CustomerIOModuleConfig$Builder {
public fun <init> (Ljava/lang/String;)V
public fun build ()Lio/customer/datapipeline/DataPipelineModuleConfig;
public synthetic fun build ()Lio/customer/sdk/module/CustomerIOModuleConfig;
public final fun getApiKey ()Ljava/lang/String;
public final class io/customer/datapipeline/DataPipelineModuleConfig$Builder {
public fun <init> (Ljava/lang/String;Landroid/app/Application;Lkotlin/jvm/functions/Function1;)V
public synthetic fun <init> (Ljava/lang/String;Landroid/app/Application;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun build ()Lio/customer/datapipeline/DataPipelineModuleConfig;
public final fun getApplication ()Landroid/app/Application;
public final fun getConfiguration ()Lkotlin/jvm/functions/Function1;
}

public final class io/customer/datapipeline/ModuleDataPipeline : io/customer/sdk/module/CustomerIOModule {
public static final field Companion Lio/customer/datapipeline/ModuleDataPipeline$Companion;
public static final field moduleName Ljava/lang/String;
public final class io/customer/datapipeline/ModuleDataPipeline {
public fun <init> (Lio/customer/datapipeline/DataPipelineModuleConfig;)V
public fun <init> (Lio/customer/datapipeline/DataPipelineModuleConfig;Lio/customer/sdk/di/CustomerIOComponent;)V
public final fun alias (Ljava/lang/String;)V
public fun getModuleConfig ()Lio/customer/datapipeline/DataPipelineModuleConfig;
public synthetic fun getModuleConfig ()Lio/customer/sdk/module/CustomerIOModuleConfig;
public fun getModuleName ()Ljava/lang/String;
public final fun getConfig ()Lio/customer/datapipeline/DataPipelineModuleConfig;
public final fun group (Ljava/lang/String;)V
public final fun group (Ljava/lang/String;Ljava/lang/Object;Lkotlinx/serialization/SerializationStrategy;)V
public final fun group (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)V
Expand All @@ -38,7 +36,8 @@ public final class io/customer/datapipeline/ModuleDataPipeline : io/customer/sdk
public final fun identify (Lkotlinx/serialization/json/JsonObject;)V
public static synthetic fun identify$default (Lio/customer/datapipeline/ModuleDataPipeline;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)V
public static synthetic fun identify$default (Lio/customer/datapipeline/ModuleDataPipeline;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)V
public fun initialize ()V
public final fun initialize ()V
public final fun reset ()Lkotlin/Unit;
public final fun screen (Ljava/lang/String;)V
public final fun screen (Ljava/lang/String;Ljava/lang/Object;Lkotlinx/serialization/SerializationStrategy;Ljava/lang/String;)V
public final fun screen (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)V
Expand All @@ -51,10 +50,3 @@ public final class io/customer/datapipeline/ModuleDataPipeline : io/customer/sdk
public static synthetic fun track$default (Lio/customer/datapipeline/ModuleDataPipeline;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)V
}

public final class io/customer/datapipeline/ModuleDataPipeline$Companion {
}

public final class io/customer/datapipeline/di/DIGraphDataPipelineKt {
public static final fun dataPipeline (Lio/customer/sdk/CustomerIO;)Lio/customer/datapipeline/ModuleDataPipeline;
}

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class ModuleDataPipeline(
}
}


// Analytic event specific APIs

/**
Expand Down Expand Up @@ -55,7 +54,9 @@ class ModuleDataPipeline(
* @see <a href="https://segment.com/docs/spec/track/">Track Documentation</a>
*/
fun <T> track(
name: String, properties: T, serializationStrategy: SerializationStrategy<T>
name: String,
properties: T,
serializationStrategy: SerializationStrategy<T>
) {
analytics?.track(name, properties, serializationStrategy)
}
Expand All @@ -70,7 +71,8 @@ class ModuleDataPipeline(
* @see <a href="https://segment.com/docs/spec/track/">Track Documentation</a>
*/
inline fun <reified T> track(
name: String, properties: T
name: String,
properties: T
) {
track(name, properties, JsonAnySerializer.serializersModule.serializer())
}
Expand Down Expand Up @@ -114,7 +116,9 @@ class ModuleDataPipeline(
* @see <a href="https://segment.com/docs/spec/identify/">Identify Documentation</a>
*/
fun <T> identify(
userId: String, traits: T, serializationStrategy: SerializationStrategy<T>
userId: String,
traits: T,
serializationStrategy: SerializationStrategy<T>
) {
analytics?.identify(userId, traits, serializationStrategy)
}
Expand Down Expand Up @@ -176,7 +180,8 @@ class ModuleDataPipeline(
* @see <a href="https://segment.com/docs/spec/identify/">Identify Documentation</a>
*/
fun <T> identify(
traits: T, serializationStrategy: SerializationStrategy<T>
traits: T,
serializationStrategy: SerializationStrategy<T>
) {
identify(Json.encodeToJsonElement(serializationStrategy, traits).jsonObject)
}
Expand All @@ -198,7 +203,8 @@ class ModuleDataPipeline(
* @see <a href="https://segment.com/docs/spec/identify/">Identify Documentation</a>
*/
inline fun <reified T> identify(
userId: String, traits: T
userId: String,
traits: T
) {
identify(userId, traits, JsonAnySerializer.serializersModule.serializer())
}
Expand All @@ -215,7 +221,9 @@ class ModuleDataPipeline(
*/
@JvmOverloads
fun screen(
title: String, properties: JsonObject = emptyJsonObject, category: String = ""
title: String,
properties: JsonObject = emptyJsonObject,
category: String = ""
) {
analytics?.screen(title, properties, category)
}
Expand All @@ -238,7 +246,9 @@ class ModuleDataPipeline(
category: String = ""
) {
screen(
title, Json.encodeToJsonElement(serializationStrategy, properties).jsonObject, category
title,
Json.encodeToJsonElement(serializationStrategy, properties).jsonObject,
category
)
}

Expand All @@ -253,7 +263,9 @@ class ModuleDataPipeline(
* @see <a href="https://segment.com/docs/spec/screen/">Screen Documentation</a>
*/
inline fun <reified T> screen(
title: String, properties: T, category: String = ""
title: String,
properties: T,
category: String = ""
) {
screen(title, properties, JsonAnySerializer.serializersModule.serializer(), category)
}
Expand Down Expand Up @@ -287,7 +299,9 @@ class ModuleDataPipeline(
* @see <a href="https://segment.com/docs/spec/group/">Group Documentation</a>
*/
fun <T> group(
groupId: String, traits: T, serializationStrategy: SerializationStrategy<T>
groupId: String,
traits: T,
serializationStrategy: SerializationStrategy<T>
) {
group(groupId, Json.encodeToJsonElement(serializationStrategy, traits).jsonObject)
}
Expand All @@ -304,7 +318,8 @@ class ModuleDataPipeline(
* @see <a href="https://segment.com/docs/spec/group/">Group Documentation</a>
*/
inline fun <reified T> group(
groupId: String, traits: T
groupId: String,
traits: T
) {
group(groupId, traits, JsonAnySerializer.serializersModule.serializer())
}
Expand All @@ -323,5 +338,4 @@ class ModuleDataPipeline(
}

fun reset() = analytics?.reset()

}
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
package io.customer.datapipeline.di

import io.customer.datapipeline.ModuleDataPipeline
import io.customer.sdk.CustomerIO

fun CustomerIO.dataPipeline(): ModuleDataPipeline {
return diGraph.sdkConfig.modules[ModuleDataPipeline.moduleName] as? ModuleDataPipeline
?: throw IllegalStateException("ModuleDataPipeline not initialized")
}
37 changes: 20 additions & 17 deletions sdk/api/sdk.api
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ public final class io/customer/sdk/CustomerIO : io/customer/sdk/CustomerIOInstan
public static final field Companion Lio/customer/sdk/CustomerIO$Companion;
public fun clearIdentify ()V
public fun deleteDeviceToken ()V
public final fun getDataPipeline ()Lio/customer/datapipeline/ModuleDataPipeline;
public fun getDeviceAttributes ()Ljava/util/Map;
public final fun getDiGraph ()Lio/customer/sdk/di/CustomerIOComponent;
public fun getProfileAttributes ()Ljava/util/Map;
Expand All @@ -24,7 +25,9 @@ public final class io/customer/sdk/CustomerIO : io/customer/sdk/CustomerIOInstan
}

public final class io/customer/sdk/CustomerIO$Builder {
public fun <init> (Ljava/lang/String;Ljava/lang/String;Landroid/app/Application;)V
public fun <init> (Ljava/lang/String;Landroid/app/Application;)V
public fun <init> (Ljava/lang/String;Landroid/app/Application;Lkotlin/jvm/functions/Function1;)V
public synthetic fun <init> (Ljava/lang/String;Landroid/app/Application;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/String;Lio/customer/sdk/data/model/Region;Landroid/app/Application;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Lio/customer/sdk/data/model/Region;Landroid/app/Application;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Ljava/lang/String;Ljava/lang/String;Lio/customer/sdk/data/model/Region;Landroid/app/Application;Ljava/util/Map;)V
Expand All @@ -39,7 +42,6 @@ public final class io/customer/sdk/CustomerIO$Builder {
public final fun setClient (Lio/customer/sdk/data/store/Client;)Lio/customer/sdk/CustomerIO$Builder;
public final fun setLogLevel (Lio/customer/sdk/util/CioLogLevel;)Lio/customer/sdk/CustomerIO$Builder;
public final fun setOverrideDiGraph (Lio/customer/sdk/di/CustomerIOComponent;)V
public final fun setRegion (Lio/customer/sdk/data/model/Region;)Lio/customer/sdk/CustomerIO$Builder;
public final fun setRequestTimeout (J)Lio/customer/sdk/CustomerIO$Builder;
public final fun setTrackingApiURL (Ljava/lang/String;)Lio/customer/sdk/CustomerIO$Builder;
}
Expand All @@ -61,22 +63,23 @@ public final class io/customer/sdk/CustomerIOActivityLifecycleCallbacks : androi

public final class io/customer/sdk/CustomerIOConfig {
public static final field Companion Lio/customer/sdk/CustomerIOConfig$Companion;
public fun <init> (Lio/customer/sdk/data/store/Client;Ljava/lang/String;Ljava/lang/String;Lio/customer/sdk/data/model/Region;JZZIDDLio/customer/sdk/util/CioLogLevel;Ljava/lang/String;Ljava/util/Map;)V
public fun <init> (Lio/customer/sdk/data/store/Client;ZZIDDLio/customer/sdk/util/CioLogLevel;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/customer/sdk/data/model/Region;J)V
public synthetic fun <init> (Lio/customer/sdk/data/store/Client;ZZIDDLio/customer/sdk/util/CioLogLevel;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/customer/sdk/data/model/Region;JILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Lio/customer/sdk/data/store/Client;
public final fun component10 ()D
public final fun component11 ()Lio/customer/sdk/util/CioLogLevel;
public final fun component12 ()Ljava/lang/String;
public final fun component13 ()Ljava/util/Map;
public final fun component2 ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Lio/customer/sdk/data/model/Region;
public final fun component5 ()J
public final fun component6 ()Z
public final fun component7 ()Z
public final fun component8 ()I
public final fun component9 ()D
public final fun copy (Lio/customer/sdk/data/store/Client;Ljava/lang/String;Ljava/lang/String;Lio/customer/sdk/data/model/Region;JZZIDDLio/customer/sdk/util/CioLogLevel;Ljava/lang/String;Ljava/util/Map;)Lio/customer/sdk/CustomerIOConfig;
public static synthetic fun copy$default (Lio/customer/sdk/CustomerIOConfig;Lio/customer/sdk/data/store/Client;Ljava/lang/String;Ljava/lang/String;Lio/customer/sdk/data/model/Region;JZZIDDLio/customer/sdk/util/CioLogLevel;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lio/customer/sdk/CustomerIOConfig;
public final fun component10 ()Ljava/lang/String;
public final fun component11 ()Ljava/lang/String;
public final fun component12 ()Lio/customer/sdk/data/model/Region;
public final fun component13 ()J
public final fun component2 ()Z
public final fun component3 ()Z
public final fun component4 ()I
public final fun component5 ()D
public final fun component6 ()D
public final fun component7 ()Lio/customer/sdk/util/CioLogLevel;
public final fun component8 ()Ljava/util/Map;
public final fun component9 ()Ljava/lang/String;
public final fun copy (Lio/customer/sdk/data/store/Client;ZZIDDLio/customer/sdk/util/CioLogLevel;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/customer/sdk/data/model/Region;J)Lio/customer/sdk/CustomerIOConfig;
public static synthetic fun copy$default (Lio/customer/sdk/CustomerIOConfig;Lio/customer/sdk/data/store/Client;ZZIDDLio/customer/sdk/util/CioLogLevel;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/customer/sdk/data/model/Region;JILjava/lang/Object;)Lio/customer/sdk/CustomerIOConfig;
public fun equals (Ljava/lang/Object;)Z
public final fun getApiKey ()Ljava/lang/String;
public final fun getAutoTrackDeviceAttributes ()Z
Expand Down
Loading

0 comments on commit c3ee83f

Please sign in to comment.