Skip to content

Commit

Permalink
Merge pull request novuhq#76 from mayorJAY/ktlint-upgrade
Browse files Browse the repository at this point in the history
Upgrade KtLint Plugin to the latest version
  • Loading branch information
Cliftonz authored Jun 17, 2024
2 parents fe1b33a + 391d4f7 commit 539fac1
Show file tree
Hide file tree
Showing 179 changed files with 4,372 additions and 3,899 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
.idea
*.iws
*.iml
*.ipr
Expand Down
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

17 changes: 0 additions & 17 deletions .idea/aws.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/codeStyles/Project.xml

This file was deleted.

5 changes: 0 additions & 5 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

19 changes: 0 additions & 19 deletions .idea/gradle.xml

This file was deleted.

Empty file.
6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/kotlinc.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/misc.xml

This file was deleted.

124 changes: 0 additions & 124 deletions .idea/uiDesigner.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
`java-library`
`maven-publish`
signing
id("org.jlleitschuh.gradle.ktlint") version "11.3.1"
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
id("io.codearte.nexus-staging") version "0.30.0"
id("java-library")
kotlin("jvm") version "1.8.0"
Expand Down
5 changes: 2 additions & 3 deletions src/main/kotlin/Novu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ data class NovuConfig(
var euBackendUrl: String = "https://eu.api.novu.co/v1/",
var enableEuVersion: Boolean = false,
var enableLogging: Boolean = true,
var apiLogLevel: HttpLoggingInterceptor.Level = HttpLoggingInterceptor.Level.BASIC
var apiLogLevel: HttpLoggingInterceptor.Level = HttpLoggingInterceptor.Level.BASIC,
)

class Novu(
val config: NovuConfig
val config: NovuConfig,
) {

constructor(apiKey: String) : this(NovuConfig(apiKey = apiKey))

private val retrofitInstance by lazy { RetrofitHelper(config).getInstance() }
Expand Down
5 changes: 3 additions & 2 deletions src/main/kotlin/api/BlueprintsApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import retrofit2.http.GET
import retrofit2.http.Path

interface BlueprintsApi {

companion object {
const val ENDPOINT = "blueprints"
}
Expand All @@ -17,5 +16,7 @@ interface BlueprintsApi {
suspend fun getBlueprintsByCategory(): Response<ResponseWrapper<BlueprintsResponse>>

@GET("$ENDPOINT/{templateId}")
suspend fun getBlueprint(@Path("templateId") templateId: String): Response<Blueprint>
suspend fun getBlueprint(
@Path("templateId") templateId: String,
): Response<Blueprint>
}
15 changes: 11 additions & 4 deletions src/main/kotlin/api/ChangesApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,27 @@ import retrofit2.http.Query
import java.math.BigInteger

interface ChangesApi {

companion object {
const val ENDPOINT = "changes"
}

@GET(ENDPOINT)
suspend fun getChanges(@Query("page") page: BigInteger? = null, @Query("limit") limit: BigInteger? = null, @Query("promoted") promoted: String? = null): Response<PaginatedResponseWrapper<ChangesResponse>>
suspend fun getChanges(
@Query("page") page: BigInteger? = null,
@Query("limit") limit: BigInteger? = null,
@Query("promoted") promoted: String? = null,
): Response<PaginatedResponseWrapper<ChangesResponse>>

@GET("$ENDPOINT/count")
suspend fun getChangesCount(): Response<ResponseWrapper<BigInteger>>

@POST("$ENDPOINT/bulk/apply")
suspend fun applyBulkChanges(@Body request: ChangesRequest): Response<ResponseWrapper<List<ChangesResponse>>>
suspend fun applyBulkChanges(
@Body request: ChangesRequest,
): Response<ResponseWrapper<List<ChangesResponse>>>

@POST("$ENDPOINT/{changedId}/apply")
suspend fun applyChange(@Path("changedId") changedId: String): Response<ResponseWrapper<List<ChangesResponse>>>
suspend fun applyChange(
@Path("changedId") changedId: String,
): Response<ResponseWrapper<List<ChangesResponse>>>
}
14 changes: 10 additions & 4 deletions src/main/kotlin/api/EnvironmentsApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import retrofit2.http.PUT
import retrofit2.http.Path

interface EnvironmentsApi {

companion object {
const val ENDPOINT = "environments"
}
Expand All @@ -23,13 +22,18 @@ interface EnvironmentsApi {
suspend fun getCurrentEnvironment(): Response<ResponseWrapper<GetEnvironmentResponse>>

@POST(ENDPOINT)
suspend fun createEnvironment(@Body request: CreateEnvironmentRequest): Response<ResponseWrapper<GetEnvironmentResponse>>
suspend fun createEnvironment(
@Body request: CreateEnvironmentRequest,
): Response<ResponseWrapper<GetEnvironmentResponse>>

@GET(ENDPOINT)
suspend fun getEnvironments(): Response<ResponseWrapper<List<GetEnvironmentResponse>>>

@PUT("$ENDPOINT/{environmentId}")
suspend fun updateEnvironment(@Path("environmentId") environmentId: String, @Body request: UpdateEnvironmentRequest): Response<ResponseWrapper<GetEnvironmentResponse>>
suspend fun updateEnvironment(
@Path("environmentId") environmentId: String,
@Body request: UpdateEnvironmentRequest,
): Response<ResponseWrapper<GetEnvironmentResponse>>

@GET("$ENDPOINT/api-keys")
suspend fun getApiKeys(): Response<ResponseWrapper<List<ApiKeys>>>
Expand All @@ -38,5 +42,7 @@ interface EnvironmentsApi {
suspend fun regenerateApiKey(): Response<ResponseWrapper<List<ApiKeys>>>

@PUT("$ENDPOINT/api-keys/widget/settings")
suspend fun updateWidgetSettings(@Body request: Widget): Response<ResponseWrapper<GetEnvironmentResponse>>
suspend fun updateWidgetSettings(
@Body request: Widget,
): Response<ResponseWrapper<GetEnvironmentResponse>>
}
17 changes: 12 additions & 5 deletions src/main/kotlin/api/EventsApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,27 @@ import retrofit2.http.POST
import retrofit2.http.Path

interface EventsApi {

companion object {
const val ENDPOINT = "events"
}

@POST("$ENDPOINT/trigger")
suspend fun triggerEvent(@Body body: TriggerEventRequest): Response<ResponseWrapper<TriggerResponse>>
suspend fun triggerEvent(
@Body body: TriggerEventRequest,
): Response<ResponseWrapper<TriggerResponse>>

@POST("$ENDPOINT/trigger/bulk")
suspend fun bulkTriggerEvent(@Body body: BulkTriggerEventRequest): Response<ResponseWrapper<List<TriggerResponse>>>
suspend fun bulkTriggerEvent(
@Body body: BulkTriggerEventRequest,
): Response<ResponseWrapper<List<TriggerResponse>>>

@POST("$ENDPOINT/trigger/broadcast")
suspend fun broadcastEvent(@Body body: BroadcastEventRequest): Response<ResponseWrapper<TriggerResponse>>
suspend fun broadcastEvent(
@Body body: BroadcastEventRequest,
): Response<ResponseWrapper<TriggerResponse>>

@DELETE("$ENDPOINT/trigger/{transactionId}")
suspend fun cancelTriggerEvent(@Path("transactionId") transactionId: String): Response<ResponseWrapper<Boolean>>
suspend fun cancelTriggerEvent(
@Path("transactionId") transactionId: String,
): Response<ResponseWrapper<Boolean>>
}
3 changes: 1 addition & 2 deletions src/main/kotlin/api/ExecutionDetailsApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ import retrofit2.http.GET
import retrofit2.http.Query

interface ExecutionDetailsApi {

companion object {
const val ENDPOINT = "execution-details"
}

@GET(ENDPOINT)
suspend fun getExecutionDetails(
@Query("notificationId") notificationId: String,
@Query("subscriberId") subscriberId: String
@Query("subscriberId") subscriberId: String,
): Response<ResponseWrapper<List<ExecutionDetails>>>
}
Loading

0 comments on commit 539fac1

Please sign in to comment.