@@ -266,139 +266,79 @@ public async Task<ListResponseMessageAttemptOut> ListAttemptsByMessageAsync(stri
266
266
267
267
// Deprecated
268
268
[ Obsolete ( "Use ListAttemptsByMessage instead, passing the endpoint ID through options" ) ]
269
- public ListResponseMessageAttemptEndpointOut ListAttemptsForEndpoint ( string appId , string messageId ,
269
+ public ListResponseMessageAttemptOut ListAttemptsForEndpoint ( string appId , string messageId ,
270
270
string endpointId , AttemptsByEndpointListOptions options = null , string idempotencyKey = default )
271
271
{
272
- try
273
- {
274
- var lResults = _messageAttemptApi . V1MessageAttemptListByEndpointDeprecated (
275
- appId ,
276
- messageId ,
277
- endpointId ,
278
- options ? . Limit ,
279
- options ? . Iterator ,
280
- options ? . Channel ,
281
- options ? . Tag ,
282
- ( Svix . Model . MessageStatus ? ) options ? . Status ,
283
- options ? . Before ,
284
- options ? . After ,
285
- options ? . EventTypes ) ;
286
-
287
- return lResults ;
288
- }
289
- catch ( ApiException e )
290
- {
291
- Logger ? . LogError ( e , $ "{ nameof ( ListAttemptsForEndpoint ) } failed") ;
292
-
293
- if ( Throw )
294
- throw ;
295
-
296
- return new ListResponseMessageAttemptEndpointOut ( ) ;
297
- }
272
+ var listByMessageOptions = new AttemptsByMessageListOptions ( ) ;
273
+ listByMessageOptions . Limit = options ? . Limit ;
274
+ listByMessageOptions . Iterator = options ? . Iterator ;
275
+ listByMessageOptions . Channel = options ? . Channel ;
276
+ listByMessageOptions . Tag = options ? . Tag ;
277
+ listByMessageOptions . Status = options ? . Status ;
278
+ listByMessageOptions . Before = options ? . Before ;
279
+ listByMessageOptions . After = options ? . After ;
280
+ listByMessageOptions . EventTypes = options ? . EventTypes ;
281
+ listByMessageOptions . EndpointId = endpointId ;
282
+
283
+ return ListAttemptsByMessage ( appId , messageId , listByMessageOptions , idempotencyKey ) ;
298
284
}
299
285
300
286
// Deprecated
301
287
[ Obsolete ( "Use ListAttemptsByMessageAsync instead, passing the endpoint ID through options" ) ]
302
- public async Task < ListResponseMessageAttemptEndpointOut > ListAttemptsForEndpointAsync ( string appId ,
288
+ public async Task < ListResponseMessageAttemptOut > ListAttemptsForEndpointAsync ( string appId ,
303
289
string messageId , string endpointId , AttemptsByEndpointListOptions options = null , string idempotencyKey = default ,
304
290
CancellationToken cancellationToken = default )
305
291
{
306
- try
307
- {
308
- var lResults = await _messageAttemptApi . V1MessageAttemptListByEndpointDeprecatedAsync (
309
- appId ,
310
- messageId ,
311
- endpointId ,
312
- options ? . Limit ,
313
- options ? . Iterator ,
314
- options ? . Channel ,
315
- options ? . Tag ,
316
- ( Svix . Model . MessageStatus ? ) options ? . Status ,
317
- options ? . Before ,
318
- options ? . After ,
319
- options ? . EventTypes ? . ToList ( ) ,
320
- cancellationToken ) ;
321
-
322
- return lResults ;
323
- }
324
- catch ( ApiException e )
325
- {
326
- Logger ? . LogError ( e , $ "{ nameof ( ListAttemptsForEndpointAsync ) } failed") ;
327
-
328
- if ( Throw )
329
- throw ;
330
-
331
- return new ListResponseMessageAttemptEndpointOut ( ) ;
332
- }
292
+ var listByMessageOptions = new AttemptsByMessageListOptions ( ) ;
293
+ listByMessageOptions . Limit = options ? . Limit ;
294
+ listByMessageOptions . Iterator = options ? . Iterator ;
295
+ listByMessageOptions . Channel = options ? . Channel ;
296
+ listByMessageOptions . Tag = options ? . Tag ;
297
+ listByMessageOptions . Status = options ? . Status ;
298
+ listByMessageOptions . Before = options ? . Before ;
299
+ listByMessageOptions . After = options ? . After ;
300
+ listByMessageOptions . EventTypes = options ? . EventTypes ;
301
+ listByMessageOptions . EndpointId = endpointId ;
302
+
303
+ return await ListAttemptsByMessageAsync ( appId , messageId , listByMessageOptions , idempotencyKey ) ;
333
304
}
334
305
335
306
// Deprecated
336
- [ Obsolete ( "Use ListAttemptsByEndpoint or ListAttemptsByMessage instead" ) ]
307
+ [ Obsolete ( "Use ListAttemptsByMessage instead" ) ]
337
308
public ListResponseMessageAttemptOut ListAttempts ( string appId , string messageId , MessageAttemptListOptions options = null ,
338
309
string idempotencyKey = default )
339
310
{
340
- try
341
- {
342
- var lResults = _messageAttemptApi . V1MessageAttemptListByMsgDeprecated (
343
- appId ,
344
- messageId ,
345
- options ? . Limit ,
346
- options ? . Iterator ,
347
- options ? . EndpointId ,
348
- options ? . Channel ,
349
- options ? . Tag ,
350
- ( Svix . Model . MessageStatus ? ) options ? . Status ,
351
- options ? . Before ,
352
- options ? . After ,
353
- null ,
354
- options ? . EventTypes ) ;
355
-
356
- return lResults ;
357
- }
358
- catch ( ApiException e )
359
- {
360
- Logger ? . LogError ( e , $ "{ nameof ( ListAttempts ) } failed") ;
361
-
362
- if ( Throw )
363
- throw ;
364
-
365
- return new ListResponseMessageAttemptOut ( ) ;
366
- }
311
+ var listByMessageOptions = new AttemptsByMessageListOptions ( ) ;
312
+ listByMessageOptions . Limit = options ? . Limit ;
313
+ listByMessageOptions . Iterator = options ? . Iterator ;
314
+ listByMessageOptions . EndpointId = options ? . EndpointId ;
315
+ listByMessageOptions . Channel = options ? . Channel ;
316
+ listByMessageOptions . Tag = options ? . Tag ;
317
+ listByMessageOptions . Status = options ? . Status ;
318
+ listByMessageOptions . Before = options ? . Before ;
319
+ listByMessageOptions . After = options ? . After ;
320
+ listByMessageOptions . EventTypes = options ? . EventType ;
321
+
322
+ return ListAttemptsByMessage ( appId , messageId , listByMessageOptions , idempotencyKey ) ;
367
323
}
368
324
369
325
// Deprecated
370
- [ Obsolete ( "Use ListAttemptsByEndpointAsync or ListAttemptsByMessageAsync instead" ) ]
326
+ [ Obsolete ( "Use ListAttemptsByMessageAsync instead" ) ]
371
327
public async Task < ListResponseMessageAttemptOut > ListAttemptsAsync ( string appId , string messageId , MessageAttemptListOptions options = null ,
372
328
string idempotencyKey = default , CancellationToken cancellationToken = default )
373
329
{
374
- try
375
- {
376
- var lResults = await _messageAttemptApi . V1MessageAttemptListByMsgDeprecatedAsync (
377
- appId ,
378
- messageId ,
379
- options ? . Limit ,
380
- options ? . Iterator ,
381
- options ? . EndpointId ,
382
- options ? . Channel ,
383
- options ? . Tag ,
384
- ( Svix . Model . MessageStatus ? ) options ? . Status ,
385
- options ? . Before ,
386
- options ? . After ,
387
- null ,
388
- options ? . EventTypes ,
389
- cancellationToken ) ;
390
-
391
- return lResults ;
392
- }
393
- catch ( ApiException e )
394
- {
395
- Logger ? . LogError ( e , $ "{ nameof ( ListAttemptsAsync ) } failed") ;
396
-
397
- if ( Throw )
398
- throw ;
399
-
400
- return new ListResponseMessageAttemptOut ( ) ;
401
- }
330
+ var listByMessageOptions = new AttemptsByMessageListOptions ( ) ;
331
+ listByMessageOptions . Limit = options ? . Limit ;
332
+ listByMessageOptions . Iterator = options ? . Iterator ;
333
+ listByMessageOptions . EndpointId = options ? . EndpointId ;
334
+ listByMessageOptions . Channel = options ? . Channel ;
335
+ listByMessageOptions . Tag = options ? . Tag ;
336
+ listByMessageOptions . Status = options ? . Status ;
337
+ listByMessageOptions . Before = options ? . Before ;
338
+ listByMessageOptions . After = options ? . After ;
339
+ listByMessageOptions . EventTypes = options ? . EventType ;
340
+
341
+ return await ListAttemptsByMessageAsync ( appId , messageId , listByMessageOptions , idempotencyKey ) ;
402
342
}
403
343
404
344
public ListResponseMessageEndpointOut ListAttemptedDestinations ( string appId , string messageId , ListOptions options = null ,
0 commit comments