diff --git a/.github/workflows/erlang-pr.yml b/.github/workflows/erlang-pr.yml index ba70b5c..5108e7f 100644 --- a/.github/workflows/erlang-pr.yml +++ b/.github/workflows/erlang-pr.yml @@ -10,7 +10,7 @@ jobs: uses: valitydev/erlang-workflows/.github/workflows/erlang-simple-build.yml@v1 with: otp-version: 24 - rebar-version: 3 + rebar-version: 3.23 use-thrift: true thrift-version: 0.14.2.3 run-eunit: false diff --git a/proto/limiter_config.thrift b/proto/limiter_config.thrift index 4ba796f..9aa20b5 100644 --- a/proto/limiter_config.thrift +++ b/proto/limiter_config.thrift @@ -149,10 +149,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 +} + union LimitContextType { 1: LimitContextTypePaymentProcessing payment_processing 2: LimitContextTypeWithdrawalProcessing withdrawal_processing