Skip to content

Commit 4e352ea

Browse files
authored
More ktlint formatting (#1302)
Mostly automated with `ktlint --format`. Not needed right now, probably because CI is running an older version of ktlint, but doesn't hurt either.
1 parent 4b53fa4 commit 4e352ea

File tree

14 files changed

+224
-100
lines changed

14 files changed

+224
-100
lines changed

kotlin/lib/src/main/kotlin/Application.kt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,21 @@ class Application internal constructor(token: String, options: SvixOptions) {
2525
}
2626
}
2727

28-
suspend fun create(applicationIn: ApplicationIn, options: PostOptions = PostOptions()): ApplicationOut {
28+
suspend fun create(
29+
applicationIn: ApplicationIn,
30+
options: PostOptions = PostOptions(),
31+
): ApplicationOut {
2932
try {
3033
return api.v1ApplicationCreate(applicationIn, null, options.idempotencyKey)
3134
} catch (e: Exception) {
3235
throw ApiException.wrap(e)
3336
}
3437
}
3538

36-
suspend fun getOrCreate(applicationIn: ApplicationIn, options: PostOptions = PostOptions()): ApplicationOut {
39+
suspend fun getOrCreate(
40+
applicationIn: ApplicationIn,
41+
options: PostOptions = PostOptions(),
42+
): ApplicationOut {
3743
try {
3844
return api.v1ApplicationCreate(applicationIn, true, options.idempotencyKey)
3945
} catch (e: Exception) {
@@ -49,15 +55,21 @@ class Application internal constructor(token: String, options: SvixOptions) {
4955
}
5056
}
5157

52-
suspend fun update(appId: String, applicationIn: ApplicationIn): ApplicationOut {
58+
suspend fun update(
59+
appId: String,
60+
applicationIn: ApplicationIn,
61+
): ApplicationOut {
5362
try {
5463
return api.v1ApplicationUpdate(appId, applicationIn)
5564
} catch (e: Exception) {
5665
throw ApiException.wrap(e)
5766
}
5867
}
5968

60-
suspend fun patch(appId: String, applicationPatch: ApplicationPatch): ApplicationOut {
69+
suspend fun patch(
70+
appId: String,
71+
applicationPatch: ApplicationPatch,
72+
): ApplicationOut {
6173
try {
6274
return api.v1ApplicationPatch(appId, applicationPatch)
6375
} catch (e: Exception) {

kotlin/lib/src/main/kotlin/Authentication.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Authentication internal constructor(token: String, options: SvixOptions) {
1919
suspend fun appPortalAccess(
2020
appId: String,
2121
appPortalAccessIn: AppPortalAccessIn,
22-
options: PostOptions = PostOptions()
22+
options: PostOptions = PostOptions(),
2323
): AppPortalAccessOut {
2424
try {
2525
return api.v1AuthenticationAppPortalAccess(appId, appPortalAccessIn, options.idempotencyKey)
@@ -28,7 +28,10 @@ class Authentication internal constructor(token: String, options: SvixOptions) {
2828
}
2929
}
3030

31-
suspend fun dashboardAccess(appId: String, options: PostOptions = PostOptions()): DashboardAccessOut {
31+
suspend fun dashboardAccess(
32+
appId: String,
33+
options: PostOptions = PostOptions(),
34+
): DashboardAccessOut {
3235
try {
3336
return api.v1AuthenticationDashboardAccess(appId, options.idempotencyKey)
3437
} catch (e: Exception) {

kotlin/lib/src/main/kotlin/Endpoint.kt

Lines changed: 56 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
3131

3232
suspend fun list(
3333
appId: String,
34-
options: EndpointListOptions = EndpointListOptions()
34+
options: EndpointListOptions = EndpointListOptions(),
3535
): ListResponseEndpointOut {
3636
try {
3737
return api.v1EndpointList(
3838
appId,
3939
options.limit,
4040
options.iterator,
41-
options.order
41+
options.order,
4242
)
4343
} catch (e: Exception) {
4444
throw ApiException.wrap(e)
@@ -48,20 +48,23 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
4848
suspend fun create(
4949
appId: String,
5050
endpointIn: EndpointIn,
51-
options: PostOptions = PostOptions()
51+
options: PostOptions = PostOptions(),
5252
): EndpointOut {
5353
try {
5454
return api.v1EndpointCreate(
5555
appId,
5656
endpointIn,
57-
options.idempotencyKey
57+
options.idempotencyKey,
5858
)
5959
} catch (e: Exception) {
6060
throw ApiException.wrap(e)
6161
}
6262
}
6363

64-
suspend fun get(appId: String, endpointId: String): EndpointOut {
64+
suspend fun get(
65+
appId: String,
66+
endpointId: String,
67+
): EndpointOut {
6568
try {
6669
return api.v1EndpointGet(endpointId, appId)
6770
} catch (e: Exception) {
@@ -72,13 +75,13 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
7275
suspend fun update(
7376
appId: String,
7477
endpointId: String,
75-
endpointUpdate: EndpointUpdate
78+
endpointUpdate: EndpointUpdate,
7679
): EndpointOut {
7780
try {
7881
return api.v1EndpointUpdate(
7982
appId,
8083
endpointId,
81-
endpointUpdate
84+
endpointUpdate,
8285
)
8386
} catch (e: Exception) {
8487
throw ApiException.wrap(e)
@@ -88,32 +91,38 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
8891
suspend fun patch(
8992
appId: String,
9093
endpointId: String,
91-
endpointPatch: EndpointPatch
94+
endpointPatch: EndpointPatch,
9295
): EndpointOut {
9396
try {
9497
return api.v1EndpointPatch(
9598
appId,
9699
endpointId,
97-
endpointPatch
100+
endpointPatch,
98101
)
99102
} catch (e: Exception) {
100103
throw ApiException.wrap(e)
101104
}
102105
}
103106

104-
suspend fun delete(appId: String, endpointId: String) {
107+
suspend fun delete(
108+
appId: String,
109+
endpointId: String,
110+
) {
105111
try {
106112
api.v1EndpointDelete(appId, endpointId)
107113
} catch (e: Exception) {
108114
throw ApiException.wrap(e)
109115
}
110116
}
111117

112-
suspend fun getSecret(appId: String, endpointId: String): EndpointSecretOut {
118+
suspend fun getSecret(
119+
appId: String,
120+
endpointId: String,
121+
): EndpointSecretOut {
113122
try {
114123
return api.v1EndpointGetSecret(
115124
appId,
116-
endpointId
125+
endpointId,
117126
)
118127
} catch (e: Exception) {
119128
throw ApiException.wrap(e)
@@ -124,14 +133,14 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
124133
appId: String,
125134
endpointId: String,
126135
endpointSecretRotateIn: EndpointSecretRotateIn,
127-
options: PostOptions = PostOptions()
136+
options: PostOptions = PostOptions(),
128137
) {
129138
try {
130139
api.v1EndpointRotateSecret(
131140
appId,
132141
endpointId,
133142
endpointSecretRotateIn,
134-
options.idempotencyKey
143+
options.idempotencyKey,
135144
)
136145
} catch (e: Exception) {
137146
throw ApiException.wrap(e)
@@ -142,25 +151,28 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
142151
appId: String,
143152
endpointId: String,
144153
recoverIn: RecoverIn,
145-
options: PostOptions = PostOptions()
154+
options: PostOptions = PostOptions(),
146155
) {
147156
try {
148157
api.v1EndpointRecover(
149158
appId,
150159
endpointId,
151160
recoverIn,
152-
options.idempotencyKey
161+
options.idempotencyKey,
153162
)
154163
} catch (e: Exception) {
155164
throw ApiException.wrap(e)
156165
}
157166
}
158167

159-
suspend fun getHeaders(appId: String, endpointId: String): EndpointHeadersOut {
168+
suspend fun getHeaders(
169+
appId: String,
170+
endpointId: String,
171+
): EndpointHeadersOut {
160172
try {
161173
return api.v1EndpointGetHeaders(
162174
appId,
163-
endpointId
175+
endpointId,
164176
)
165177
} catch (e: Exception) {
166178
throw ApiException.wrap(e)
@@ -170,13 +182,13 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
170182
suspend fun updateHeaders(
171183
appId: String,
172184
endpointId: String,
173-
endpointHeadersIn: EndpointHeadersIn
185+
endpointHeadersIn: EndpointHeadersIn,
174186
) {
175187
try {
176188
api.v1EndpointUpdateHeaders(
177189
appId,
178190
endpointId,
179-
endpointHeadersIn
191+
endpointHeadersIn,
180192
)
181193
} catch (e: Exception) {
182194
throw ApiException.wrap(e)
@@ -186,13 +198,13 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
186198
suspend fun patchHeaders(
187199
appId: String,
188200
endpointId: String,
189-
endpointHeadersIn: EndpointHeadersPatchIn
201+
endpointHeadersIn: EndpointHeadersPatchIn,
190202
) {
191203
try {
192204
api.v1EndpointPatchHeaders(
193205
appId,
194206
endpointId,
195-
endpointHeadersIn
207+
endpointHeadersIn,
196208
)
197209
} catch (e: Exception) {
198210
throw ApiException.wrap(e)
@@ -202,14 +214,14 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
202214
suspend fun getStats(
203215
appId: String,
204216
endpointId: String,
205-
options: EndpointStatsOptions = EndpointStatsOptions()
217+
options: EndpointStatsOptions = EndpointStatsOptions(),
206218
): EndpointStats {
207219
try {
208220
return api.v1EndpointGetStats(
209221
appId,
210222
endpointId,
211223
options.since,
212-
options.until
224+
options.until,
213225
)
214226
} catch (e: Exception) {
215227
throw ApiException.wrap(e)
@@ -220,50 +232,62 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
220232
appId: String,
221233
endpointId: String,
222234
replayIn: ReplayIn,
223-
options: PostOptions = PostOptions()
235+
options: PostOptions = PostOptions(),
224236
) {
225237
try {
226238
api.v1EndpointReplay(
227239
appId,
228240
endpointId,
229241
replayIn,
230-
options.idempotencyKey
242+
options.idempotencyKey,
231243
)
232244
} catch (e: Exception) {
233245
throw ApiException.wrap(e)
234246
}
235247
}
236248

237-
suspend fun transformationGet(appId: String, endpointId: String): EndpointTransformationOut {
249+
suspend fun transformationGet(
250+
appId: String,
251+
endpointId: String,
252+
): EndpointTransformationOut {
238253
try {
239254
return api.v1EndpointTransformationGet(
240255
appId,
241-
endpointId
256+
endpointId,
242257
)
243258
} catch (e: Exception) {
244259
throw ApiException.wrap(e)
245260
}
246261
}
247262

248-
suspend fun transformationPartialUpdate(appId: String, endpointId: String, endpointTransformationIn: EndpointTransformationIn) {
263+
suspend fun transformationPartialUpdate(
264+
appId: String,
265+
endpointId: String,
266+
endpointTransformationIn: EndpointTransformationIn,
267+
) {
249268
try {
250269
api.v1EndpointTransformationPartialUpdate(
251270
appId,
252271
endpointId,
253-
endpointTransformationIn
272+
endpointTransformationIn,
254273
)
255274
} catch (e: Exception) {
256275
throw ApiException.wrap(e)
257276
}
258277
}
259278

260-
suspend fun sendExample(appId: String, endpointId: String, eventExampleIn: EventExampleIn, options: PostOptions = PostOptions()) {
279+
suspend fun sendExample(
280+
appId: String,
281+
endpointId: String,
282+
eventExampleIn: EventExampleIn,
283+
options: PostOptions = PostOptions(),
284+
) {
261285
try {
262286
api.v1EndpointSendExample(
263287
appId,
264288
endpointId,
265289
eventExampleIn,
266-
options.idempotencyKey
290+
options.idempotencyKey,
267291
)
268292
} catch (e: Exception) {
269293
throw ApiException.wrap(e)

kotlin/lib/src/main/kotlin/EventType.kt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ class EventType internal constructor(token: String, options: SvixOptions) {
2828
}
2929
}
3030

31-
suspend fun create(eventTypeIn: EventTypeIn, options: PostOptions = PostOptions()): EventTypeOut {
31+
suspend fun create(
32+
eventTypeIn: EventTypeIn,
33+
options: PostOptions = PostOptions(),
34+
): EventTypeOut {
3235
try {
3336
return api.v1EventTypeCreate(eventTypeIn, options.idempotencyKey)
3437
} catch (e: Exception) {
@@ -44,15 +47,21 @@ class EventType internal constructor(token: String, options: SvixOptions) {
4447
}
4548
}
4649

47-
suspend fun update(eventTypeName: String, eventTypeUpdate: EventTypeUpdate): EventTypeOut {
50+
suspend fun update(
51+
eventTypeName: String,
52+
eventTypeUpdate: EventTypeUpdate,
53+
): EventTypeOut {
4854
try {
4955
return api.v1EventTypeUpdate(eventTypeName, eventTypeUpdate)
5056
} catch (e: Exception) {
5157
throw ApiException.wrap(e)
5258
}
5359
}
5460

55-
suspend fun patch(eventTypeName: String, eventTypePatch: EventTypePatch): EventTypeOut {
61+
suspend fun patch(
62+
eventTypeName: String,
63+
eventTypePatch: EventTypePatch,
64+
): EventTypeOut {
5665
try {
5766
return api.v1EventTypePatch(eventTypeName, eventTypePatch)
5867
} catch (e: Exception) {
@@ -68,7 +77,10 @@ class EventType internal constructor(token: String, options: SvixOptions) {
6877
}
6978
}
7079

71-
suspend fun importOpenApi(eventTypeImportOpenApiIn: EventTypeImportOpenApiIn, options: PostOptions = PostOptions()): EventTypeImportOpenApiOut {
80+
suspend fun importOpenApi(
81+
eventTypeImportOpenApiIn: EventTypeImportOpenApiIn,
82+
options: PostOptions = PostOptions(),
83+
): EventTypeImportOpenApiOut {
7284
try {
7385
return api.v1EventTypeImportOpenapi(eventTypeImportOpenApiIn, options.idempotencyKey)
7486
} catch (e: Exception) {

0 commit comments

Comments
 (0)