@@ -34,12 +34,7 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
34
34
options : EndpointListOptions = EndpointListOptions (),
35
35
): ListResponseEndpointOut {
36
36
try {
37
- return api.v1EndpointList(
38
- appId,
39
- options.limit,
40
- options.iterator,
41
- options.order,
42
- )
37
+ return api.v1EndpointList(appId, options.limit, options.iterator, options.order)
43
38
} catch (e: Exception ) {
44
39
throw ApiException .wrap(e)
45
40
}
@@ -51,20 +46,13 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
51
46
options : PostOptions = PostOptions (),
52
47
): EndpointOut {
53
48
try {
54
- return api.v1EndpointCreate(
55
- appId,
56
- endpointIn,
57
- options.idempotencyKey,
58
- )
49
+ return api.v1EndpointCreate(appId, endpointIn, options.idempotencyKey)
59
50
} catch (e: Exception ) {
60
51
throw ApiException .wrap(e)
61
52
}
62
53
}
63
54
64
- suspend fun get (
65
- appId : String ,
66
- endpointId : String ,
67
- ): EndpointOut {
55
+ suspend fun get (appId : String , endpointId : String ): EndpointOut {
68
56
try {
69
57
return api.v1EndpointGet(endpointId, appId)
70
58
} catch (e: Exception ) {
@@ -78,11 +66,7 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
78
66
endpointUpdate : EndpointUpdate ,
79
67
): EndpointOut {
80
68
try {
81
- return api.v1EndpointUpdate(
82
- appId,
83
- endpointId,
84
- endpointUpdate,
85
- )
69
+ return api.v1EndpointUpdate(appId, endpointId, endpointUpdate)
86
70
} catch (e: Exception ) {
87
71
throw ApiException .wrap(e)
88
72
}
@@ -94,36 +78,23 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
94
78
endpointPatch : EndpointPatch ,
95
79
): EndpointOut {
96
80
try {
97
- return api.v1EndpointPatch(
98
- appId,
99
- endpointId,
100
- endpointPatch,
101
- )
81
+ return api.v1EndpointPatch(appId, endpointId, endpointPatch)
102
82
} catch (e: Exception ) {
103
83
throw ApiException .wrap(e)
104
84
}
105
85
}
106
86
107
- suspend fun delete (
108
- appId : String ,
109
- endpointId : String ,
110
- ) {
87
+ suspend fun delete (appId : String , endpointId : String ) {
111
88
try {
112
89
api.v1EndpointDelete(appId, endpointId)
113
90
} catch (e: Exception ) {
114
91
throw ApiException .wrap(e)
115
92
}
116
93
}
117
94
118
- suspend fun getSecret (
119
- appId : String ,
120
- endpointId : String ,
121
- ): EndpointSecretOut {
95
+ suspend fun getSecret (appId : String , endpointId : String ): EndpointSecretOut {
122
96
try {
123
- return api.v1EndpointGetSecret(
124
- appId,
125
- endpointId,
126
- )
97
+ return api.v1EndpointGetSecret(appId, endpointId)
127
98
} catch (e: Exception ) {
128
99
throw ApiException .wrap(e)
129
100
}
@@ -154,26 +125,15 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
154
125
options : PostOptions = PostOptions (),
155
126
) {
156
127
try {
157
- api.v1EndpointRecover(
158
- appId,
159
- endpointId,
160
- recoverIn,
161
- options.idempotencyKey,
162
- )
128
+ api.v1EndpointRecover(appId, endpointId, recoverIn, options.idempotencyKey)
163
129
} catch (e: Exception ) {
164
130
throw ApiException .wrap(e)
165
131
}
166
132
}
167
133
168
- suspend fun getHeaders (
169
- appId : String ,
170
- endpointId : String ,
171
- ): EndpointHeadersOut {
134
+ suspend fun getHeaders (appId : String , endpointId : String ): EndpointHeadersOut {
172
135
try {
173
- return api.v1EndpointGetHeaders(
174
- appId,
175
- endpointId,
176
- )
136
+ return api.v1EndpointGetHeaders(appId, endpointId)
177
137
} catch (e: Exception ) {
178
138
throw ApiException .wrap(e)
179
139
}
@@ -185,11 +145,7 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
185
145
endpointHeadersIn : EndpointHeadersIn ,
186
146
) {
187
147
try {
188
- api.v1EndpointUpdateHeaders(
189
- appId,
190
- endpointId,
191
- endpointHeadersIn,
192
- )
148
+ api.v1EndpointUpdateHeaders(appId, endpointId, endpointHeadersIn)
193
149
} catch (e: Exception ) {
194
150
throw ApiException .wrap(e)
195
151
}
@@ -201,11 +157,7 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
201
157
endpointHeadersIn : EndpointHeadersPatchIn ,
202
158
) {
203
159
try {
204
- api.v1EndpointPatchHeaders(
205
- appId,
206
- endpointId,
207
- endpointHeadersIn,
208
- )
160
+ api.v1EndpointPatchHeaders(appId, endpointId, endpointHeadersIn)
209
161
} catch (e: Exception ) {
210
162
throw ApiException .wrap(e)
211
163
}
@@ -217,12 +169,7 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
217
169
options : EndpointStatsOptions = EndpointStatsOptions (),
218
170
): EndpointStats {
219
171
try {
220
- return api.v1EndpointGetStats(
221
- appId,
222
- endpointId,
223
- options.since,
224
- options.until,
225
- )
172
+ return api.v1EndpointGetStats(appId, endpointId, options.since, options.until)
226
173
} catch (e: Exception ) {
227
174
throw ApiException .wrap(e)
228
175
}
@@ -235,26 +182,15 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
235
182
options : PostOptions = PostOptions (),
236
183
) {
237
184
try {
238
- api.v1EndpointReplay(
239
- appId,
240
- endpointId,
241
- replayIn,
242
- options.idempotencyKey,
243
- )
185
+ api.v1EndpointReplay(appId, endpointId, replayIn, options.idempotencyKey)
244
186
} catch (e: Exception ) {
245
187
throw ApiException .wrap(e)
246
188
}
247
189
}
248
190
249
- suspend fun transformationGet (
250
- appId : String ,
251
- endpointId : String ,
252
- ): EndpointTransformationOut {
191
+ suspend fun transformationGet (appId : String , endpointId : String ): EndpointTransformationOut {
253
192
try {
254
- return api.v1EndpointTransformationGet(
255
- appId,
256
- endpointId,
257
- )
193
+ return api.v1EndpointTransformationGet(appId, endpointId)
258
194
} catch (e: Exception ) {
259
195
throw ApiException .wrap(e)
260
196
}
@@ -266,11 +202,7 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
266
202
endpointTransformationIn : EndpointTransformationIn ,
267
203
) {
268
204
try {
269
- api.v1EndpointTransformationPartialUpdate(
270
- appId,
271
- endpointId,
272
- endpointTransformationIn,
273
- )
205
+ api.v1EndpointTransformationPartialUpdate(appId, endpointId, endpointTransformationIn)
274
206
} catch (e: Exception ) {
275
207
throw ApiException .wrap(e)
276
208
}
@@ -283,12 +215,7 @@ class Endpoint internal constructor(token: String, options: SvixOptions) {
283
215
options : PostOptions = PostOptions (),
284
216
) {
285
217
try {
286
- api.v1EndpointSendExample(
287
- appId,
288
- endpointId,
289
- eventExampleIn,
290
- options.idempotencyKey,
291
- )
218
+ api.v1EndpointSendExample(appId, endpointId, eventExampleIn, options.idempotencyKey)
292
219
} catch (e: Exception ) {
293
220
throw ApiException .wrap(e)
294
221
}
0 commit comments