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