From 7ed2112a6503abe9f65142e43dca6675e939d164 Mon Sep 17 00:00:00 2001 From: Aleksey Kashapov Date: Tue, 29 Oct 2024 13:56:45 +0300 Subject: [PATCH] EMP-74: Introduces `destination_field` scope (#154) --- proto/limiter_config.thrift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/proto/limiter_config.thrift b/proto/limiter_config.thrift index 7e32dac..fe6ba8b 100644 --- a/proto/limiter_config.thrift +++ b/proto/limiter_config.thrift @@ -118,10 +118,24 @@ union LimitScopeType { */ 9: LimitScopeEmptyDetails sender 10: LimitScopeEmptyDetails receiver + + /** + * Scope for operations with destination's generic resource fields. + * See damsel's "base.Content" https://github.com/valitydev/damsel/blob/ad715bd647bc5cfa822e2b09b1329dab6a2bf295/proto/base.thrift#L20-L25 + * and it's example with generic payment tool https://github.com/valitydev/damsel/blob/ad715bd647bc5cfa822e2b09b1329dab6a2bf295/proto/domain.thrift#L1816-L1836 + */ + 11: LimitScopeDestinationFieldDetails destination_field } struct LimitScopeEmptyDetails {} +/** + * TODO Support universal context-based field selector + */ +struct LimitScopeDestinationFieldDetails { + 1: required list field_path +} + struct OperationLimitBehaviour { 1: optional OperationBehaviour invoice_payment_refund }