Yodlee exists as datomic entities!

This commit is contained in:
Bryce Covert
2020-12-22 13:12:22 -08:00
parent c28bd9635d
commit 6930a8c7c2
17 changed files with 883 additions and 478 deletions

View File

@@ -27,6 +27,16 @@
:print-as :invoice-reminder-schedule :code
[:address [:street1 :street2 :city :state :zip]]])
(defn client-query [token]
(cond-> [:id :name :signature-file :code :email :matches :week-a-debits :week-a-credits :week-b-debits :week-b-credits :locations
[:location-matches [:id :location :match]]
[:bank-accounts [:id :start-date :code :number :bank-name :bank-code :check-number :name :routing :type :sort-order :visible :yodlee-account-id
[:yodlee-account [:name :id :number]]
:locations :include-in-reports] ]
[:address [:street1 :street2 :city :state :zip]]
[:forecasted-transactions [:id :amount :identifier :day-of-month]]]
(= "admin" (or (get (jwt->data token) "role") (get (jwt->data token) "user/role")) ) (conj [:yodlee-provider-accounts [:id [:accounts [:id :name :number :available-balance]]]])))
(re-frame/reg-event-fx
::initialize-db
(fn [{:keys [db]} [_ token]]
@@ -56,9 +66,7 @@
:graphql {:token token
:query-obj {:venia/queries [[:client
[:id :name :signature-file :code :email :matches :week-a-debits :week-a-credits :week-b-debits :week-b-credits :locations [:location-matches [:id :location :match]] [:bank-accounts [:id :start-date :code :number :bank-name :bank-code :check-number :name :routing :type :sort-order :visible :yodlee-account-id :locations :include-in-reports] ]
[:address [:street1 :street2 :city :state :zip]]
[:forecasted-transactions [:id :amount :identifier :day-of-month]]]]
(client-query token)]
[:vendor
vendor-query]
[:accounts [:numeric-code :location :name :type :account_set :applicability :id [:client-overrides [:name :id [:client [:name :id]]]]]]]}
@@ -76,10 +84,7 @@
(fn [{:keys [db]} [_ token user]]
{:graphql {:token token
:query-obj {:venia/queries [[:client
[:id :name :code :matches :locations :week-a-debits :week-a-credits :week-b-debits :week-b-credits [:location-matches [:id :location :match]]
[:address [:street1 :street2 :city :state :zip]]
[:bank-accounts [:id :start-date :code :number :bank-name :bank-code :check-number :name :routing :type :sort-order :visible :yodlee-account-id :locations :include-in-reports] ]
[:forecasted-transactions [:id :amount :identifier :day-of-month]]]]
(client-query token)]
[:vendor
vendor-query]
[:accounts [:numeric-code :name :location :type :account_set :applicability :id [:client-overrides [:name [:client [:name :id]]]]]]]}