Adds ability for users to configure basic ezcater integration.

This commit is contained in:
2022-07-10 06:09:14 -07:00
parent a84993126b
commit 0606da9c49
12 changed files with 252 additions and 35 deletions

View File

@@ -38,6 +38,10 @@
:square-location/name
:square-location/client-location
:db/id]}
{:client/ezcater-locations [{:ezcater-location/caterer [:ezcater-caterer/name :db/id]}
:ezcater-location/location
:db/id]}
{:client/bank-accounts [* {:bank-account/type [*]
:bank-account/yodlee-account [:yodlee-account/name :yodlee-account/id :yodlee-account/number]
:bank-account/plaid-account [:plaid-account/name :db/id :plaid-account/number :plaid-account/balance]
@@ -60,11 +64,14 @@
(->>
(d/pull (d/db conn )
'[* {:client/bank-accounts [* {:bank-account/type [*]
:bank-account/yodlee-account [:yodlee-account/name :yodlee-account/id :yodlee-account/number]
'[* {:client/bank-accounts [* {:bank-account/type [*]
:bank-account/yodlee-account [:yodlee-account/name :yodlee-account/id :yodlee-account/number]
:bank-account/intuit-bank-account [:intuit-bank-account/name :intuit-bank-account/external-id :db/id]
:bank-account/plaid-account [:plaid-account/name :db/id :plaid-account/number :plaid-account/balance]}]
:client/emails [:db/id :email-contact/email :email-contact/description]}
:bank-account/plaid-account [:plaid-account/name :db/id :plaid-account/number :plaid-account/balance]}]
:client/emails [:db/id :email-contact/email :email-contact/description]}
{:client/ezcater-locations [{:ezcater-location/caterer [:ezcater-caterer/name :db/id]}
:ezcater-location/location
:db/id]}
{:yodlee-provider-account/_client [*]}
{:plaid-item/_client [*]}]
id)

View File

@@ -37,4 +37,66 @@
{:db/ident :integration-state/failed}
{:db/ident :integration-state/success}
{:db/ident :integration-state/unauthorized}]]}})
{:db/ident :integration-state/unauthorized}]]}
::add-ezcater-base7
{:txes [[{:db/ident :ezcater-integration/subscriber-uuid
:db/doc "The subscriber uuid"
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/unique :db.unique/identity}
{:db/ident :ezcater-integration/api-key
:db/doc "The API key that can be used for requests"
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/unique :db.unique/identity}
{:db/ident :ezcater-integration/subscriber-secret
:db/doc "Used to validate events"
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one}
{:db/ident :ezcater-integration/integration-status
:db/doc "The status for this integration"
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one
:db/isComponent true}
{:db/ident :ezcater-integration/caterers
:db/doc "All caterers for this integration"
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/many
:db/isComponent true}
{:db/ident :ezcater-caterer/uuid
:db/doc "Id of the caterer"
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/unique :db.unique/identity}
{:db/ident :ezcater-caterer/name
:db/doc "Name of the caterer"
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one}
{:db/ident :ezcater-caterer/search-terms
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/doc "a name search for caterer"
:db/fulltext true}
{:db/ident :client/ezcater-locations
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/many
:db/isComponent true}
{:db/ident :ezcater-location/location
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one}
{:db/ident :ezcater-location/caterer
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}]
[{:ezcater-integration/api-key "bmlrdHNpZ2FyaXNAZ21haWwuY29tOmQwMzQwMjYzOWI2ODQxNmVkMjdmZWYxMWFhZTk3YzU1MDlmNTcyNjYwMDAzOTA5MDE2OGMzODllNDBjNTVkZGE"
:ezcater-integration/subscriber-uuid "007d4353-fbb8-4725-9c0a-81bbd565dbe5"
:ezcater-integration/subscriber-secret "3dccc547f6c4d9b3cbed15ab81d3748d2a34be7fdb9b8edfdc9abd6c75a821fe"}]]
:requires [::add-integration-status3]}})