diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6977f1c..2f0ee6f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,12 @@ version: 2 updates: -- package-ecosystem: mix - directory: "/" - schedule: - interval: "daily" + - package-ecosystem: mix + directory: "/" + schedule: + interval: weekly + day: thursday + groups: + production-dependencies: + dependency-type: production + dev-dependencies: + dependency-type: development diff --git a/lib/transfer/transfer.ex b/lib/transfer/transfer.ex index a3227f0..75d672a 100644 --- a/lib/transfer/transfer.ex +++ b/lib/transfer/transfer.ex @@ -18,6 +18,10 @@ defmodule AshDoubleEntry.Transfer do balance_resource: [ type: {:spark, Ash.Resource}, doc: "The resource being used for balances" + ], + create_accept: [ + type: {:wrap_list, :atom}, + doc: "Additional attributes to accept when creating a transfer" ] ] } diff --git a/lib/transfer/transformers/add_structure.ex b/lib/transfer/transformers/add_structure.ex index 8638b94..cc88495 100644 --- a/lib/transfer/transformers/add_structure.ex +++ b/lib/transfer/transformers/add_structure.ex @@ -38,7 +38,9 @@ defmodule AshDoubleEntry.Transfer.Transformers.AddStructure do attribute_writable?: true ) |> Ash.Resource.Builder.add_action(:create, :transfer, - accept: [:amount, :timestamp, :from_account_id, :to_account_id] + accept: + [:amount, :timestamp, :from_account_id, :to_account_id] ++ + AshDoubleEntry.Transfer.Info.transfer_create_accept!(dsl) ) |> Ash.Resource.Builder.add_action(:read, :read_transfers, pagination: Ash.Resource.Builder.build_pagination(keyset?: true)