@@ -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)
0 commit comments