New import approach to capture the batch.
This commit is contained in:
@@ -1,37 +1,40 @@
|
||||
(ns auto-ap.graphql
|
||||
(:require [auto-ap.datomic :refer [merge-query uri]]
|
||||
[auto-ap.datomic.checks :as d-checks]
|
||||
[auto-ap.datomic.sales-orders :as d-sales-orders]
|
||||
[auto-ap.datomic.users :as d-users]
|
||||
[auto-ap.graphql.accounts :as gq-accounts]
|
||||
[auto-ap.graphql.checks :as gq-checks]
|
||||
[auto-ap.graphql.clients :as gq-clients]
|
||||
[auto-ap.graphql.expected-deposit :as gq-expected-deposit]
|
||||
[auto-ap.graphql.invoices :as gq-invoices]
|
||||
[auto-ap.graphql.ledger :as gq-ledger]
|
||||
[auto-ap.graphql.sales-orders :as gq-sales-orders]
|
||||
[auto-ap.graphql.intuit-bank-accounts :as gq-intuit-bank-accounts]
|
||||
[auto-ap.graphql.transaction-rules :as gq-transaction-rules]
|
||||
[auto-ap.graphql.transactions :as gq-transactions]
|
||||
[auto-ap.graphql.users :as gq-users]
|
||||
[auto-ap.graphql.utils :refer [assert-admin assert-can-see-client]]
|
||||
[auto-ap.graphql.vendors :as gq-vendors]
|
||||
[auto-ap.graphql.yodlee-merchants :as ym]
|
||||
[auto-ap.graphql.yodlee2 :as gq-yodlee2]
|
||||
[auto-ap.logging :refer [error-event info-event warn-event]]
|
||||
[auto-ap.time :as time]
|
||||
[clj-time.coerce :as coerce]
|
||||
[clj-time.core :as t]
|
||||
[clojure.string :as str]
|
||||
[clojure.tools.logging :as log]
|
||||
[clojure.walk :as walk]
|
||||
[com.walmartlabs.lacinia :refer [execute]]
|
||||
[com.walmartlabs.lacinia.schema :as schema]
|
||||
[com.walmartlabs.lacinia.util :refer [attach-resolvers]]
|
||||
[datomic.api :as d]
|
||||
[unilog.context :as lc]
|
||||
[yang.time :refer [time-it]])
|
||||
(:import clojure.lang.IPersistentMap))
|
||||
(:require
|
||||
[auto-ap.datomic :refer [merge-query uri]]
|
||||
[auto-ap.datomic.checks :as d-checks]
|
||||
[auto-ap.datomic.sales-orders :as d-sales-orders]
|
||||
[auto-ap.datomic.users :as d-users]
|
||||
[auto-ap.graphql.accounts :as gq-accounts]
|
||||
[auto-ap.graphql.checks :as gq-checks]
|
||||
[auto-ap.graphql.clients :as gq-clients]
|
||||
[auto-ap.graphql.expected-deposit :as gq-expected-deposit]
|
||||
[auto-ap.graphql.import-batch :as gq-import-batches]
|
||||
[auto-ap.graphql.intuit-bank-accounts :as gq-intuit-bank-accounts]
|
||||
[auto-ap.graphql.invoices :as gq-invoices]
|
||||
[auto-ap.graphql.ledger :as gq-ledger]
|
||||
[auto-ap.graphql.sales-orders :as gq-sales-orders]
|
||||
[auto-ap.graphql.transaction-rules :as gq-transaction-rules]
|
||||
[auto-ap.graphql.transactions :as gq-transactions]
|
||||
[auto-ap.graphql.users :as gq-users]
|
||||
[auto-ap.graphql.utils :refer [assert-admin assert-can-see-client]]
|
||||
[auto-ap.graphql.vendors :as gq-vendors]
|
||||
[auto-ap.graphql.yodlee-merchants :as ym]
|
||||
[auto-ap.graphql.yodlee2 :as gq-yodlee2]
|
||||
[auto-ap.logging :refer [error-event info-event warn-event]]
|
||||
[auto-ap.time :as time]
|
||||
[clj-time.coerce :as coerce]
|
||||
[clj-time.core :as t]
|
||||
[clojure.string :as str]
|
||||
[clojure.tools.logging :as log]
|
||||
[clojure.walk :as walk]
|
||||
[com.walmartlabs.lacinia :refer [execute]]
|
||||
[com.walmartlabs.lacinia.schema :as schema]
|
||||
[com.walmartlabs.lacinia.util :refer [attach-resolvers]]
|
||||
[datomic.api :as d]
|
||||
[unilog.context :as lc]
|
||||
[yang.time :refer [time-it]])
|
||||
(:import
|
||||
(clojure.lang IPersistentMap)))
|
||||
|
||||
(def integreat-schema
|
||||
{
|
||||
@@ -452,6 +455,21 @@
|
||||
:start {:type 'Int}
|
||||
:end {:type 'Int}}}
|
||||
|
||||
:import_batch {:fields {:user_name {:type 'String}
|
||||
:id {:type :id}
|
||||
:date {:type :iso_date}
|
||||
:imported {:type 'Int}
|
||||
:extant {:type 'Int}
|
||||
:suppressed {:type 'Int}
|
||||
:status {:type :import_batch_status}
|
||||
:source {:type :import_batch_source}}}
|
||||
|
||||
:import_batch_page {:fields {:data {:type '(list :import_batch)}
|
||||
:count {:type 'Int}
|
||||
:total {:type 'Int}
|
||||
:start {:type 'Int}
|
||||
:end {:type 'Int}}}
|
||||
|
||||
:transaction_rule_page {:fields {:transaction_rules {:type '(list :transaction_rule)}
|
||||
:count {:type 'Int}
|
||||
:total {:type 'Int}
|
||||
@@ -633,6 +651,11 @@
|
||||
|
||||
:resolve :get-transaction-page}
|
||||
|
||||
:import_batch_page {:type :import_batch_page
|
||||
:args {:filters {:type :import_batch_filters}}
|
||||
|
||||
:resolve :get-import-batch-page}
|
||||
|
||||
:transaction_rule_page {:type :transaction_rule_page
|
||||
:args {:client_id {:type :id}
|
||||
:vendor_id {:type :id}
|
||||
@@ -706,6 +729,7 @@
|
||||
|
||||
:transaction_filters {:fields {:client_id {:type :id}
|
||||
:exact_match_id {:type :id}
|
||||
:import_batch_id {:type :id}
|
||||
|
||||
:vendor_id {:type :id}
|
||||
:bank_account_id {:type :id}
|
||||
@@ -720,6 +744,9 @@
|
||||
:sort {:type '(list :sort_item)}
|
||||
:approval_status {:type :transaction_approval_status}
|
||||
:unresolved {:type 'Boolean}}}
|
||||
:import_batch_filters {:fields {:start {:type 'Int}
|
||||
:per_page {:type 'Int}
|
||||
:sort {:type '(list :sort_item)}}}
|
||||
|
||||
:ledger_filters {:fields {:client_id {:type :id}
|
||||
:vendor_id {:type :id}
|
||||
@@ -935,6 +962,13 @@
|
||||
{:enum-value :cash}
|
||||
{:enum-value :debit}]}
|
||||
|
||||
:import_batch_source {:values [{:enum-value :intuit}
|
||||
{:enum-value :yodlee}
|
||||
{:enum-value :yodlee2}
|
||||
{:enum-value :manual}]}
|
||||
:import_batch_status {:values [{:enum-value :started}
|
||||
{:enum-value :completed}]}
|
||||
|
||||
:processor {:values [{:enum-value :na}
|
||||
{:enum-value :doordash}
|
||||
{:enum-value :uber_eats}
|
||||
@@ -1328,6 +1362,7 @@
|
||||
:get-potential-unpaid-invoices-matches gq-transactions/get-potential-unpaid-invoices-matches
|
||||
:get-accounts gq-accounts/get-accounts
|
||||
:get-transaction-page gq-transactions/get-transaction-page
|
||||
:get-import-batch-page gq-import-batches/get-import-batch-page
|
||||
:get-ledger-page gq-ledger/get-ledger-page
|
||||
:get-sales-order-page gq-sales-orders/get-sales-orders-page
|
||||
:get-balance-sheet gq-ledger/get-balance-sheet
|
||||
|
||||
Reference in New Issue
Block a user