diff --git a/hasura/backups/dump-db62dpegj5roh3-202009221434.sql b/hasura/backups/dump-db62dpegj5roh3-202009221434.sql new file mode 100644 index 000000000..6c89df762 Binary files /dev/null and b/hasura/backups/dump-db62dpegj5roh3-202009221434.sql differ diff --git a/hasura/hasura_metadata_2020_09_22_14_25_15_367.json b/hasura/hasura_metadata_2020_09_22_14_25_15_367.json new file mode 100644 index 000000000..11d1a73c6 --- /dev/null +++ b/hasura/hasura_metadata_2020_09_22_14_25_15_367.json @@ -0,0 +1,6540 @@ +{ + "version": 2, + "tables": [ + { + "table": { + "schema": "public", + "name": "allocations" + }, + "object_relationships": [ + { + "name": "employee", + "using": { + "foreign_key_constraint_on": "employeeid" + } + }, + { + "name": "jobline", + "using": { + "foreign_key_constraint_on": "joblineid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "jobline": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + }, + "columns": [ + "hours", + "created_at", + "updated_at", + "employeeid", + "id", + "joblineid" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "hours", + "created_at", + "updated_at", + "employeeid", + "id", + "joblineid" + ], + "filter": { + "jobline": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [], + "filter": { + "jobline": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "jobline": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "appointments" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "bodyshopid" + } + }, + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "columns": [ + "arrived", + "block", + "bodyshopid", + "canceled", + "created_at", + "end", + "id", + "isintake", + "jobid", + "start", + "title", + "updated_at" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "arrived", + "block", + "bodyshopid", + "canceled", + "created_at", + "end", + "id", + "isintake", + "jobid", + "start", + "title", + "updated_at" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "allow_aggregations": true + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "arrived", + "block", + "bodyshopid", + "canceled", + "created_at", + "end", + "id", + "isintake", + "jobid", + "start", + "title", + "updated_at" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "associations" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "shopid" + } + }, + { + "name": "user", + "using": { + "foreign_key_constraint_on": "useremail" + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "active", + "authlevel", + "id", + "shopid", + "useremail" + ], + "filter": { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "active" + ], + "filter": { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + "check": null + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "audit_trail" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "bodyshopid" + } + }, + { + "name": "user", + "using": { + "foreign_key_constraint_on": "useremail" + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "id", + "new_val", + "old_val", + "operation", + "schemaname", + "tabname", + "useremail", + "created", + "bodyshopid", + "recordid" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "available_jobs" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "bodyshopid" + } + }, + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "columns": [ + "id", + "created_at", + "updated_at", + "uploaded_by", + "cieca_id", + "bodyshopid", + "est_data", + "issupplement", + "jobid", + "supplement_number", + "ownr_name", + "vehicle_info", + "clm_amt", + "clm_no", + "source_system" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "issupplement", + "supplement_number", + "est_data", + "clm_amt", + "cieca_id", + "clm_no", + "ownr_name", + "source_system", + "uploaded_by", + "vehicle_info", + "created_at", + "updated_at", + "bodyshopid", + "id", + "jobid" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "cieca_id", + "clm_amt", + "est_data", + "issupplement", + "ownr_name", + "source_system", + "supplement_number", + "uploaded_by", + "vehicle_info" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "bodyshops" + }, + "array_relationships": [ + { + "name": "appointments", + "using": { + "foreign_key_constraint_on": { + "column": "bodyshopid", + "table": { + "schema": "public", + "name": "appointments" + } + } + } + }, + { + "name": "associations", + "using": { + "foreign_key_constraint_on": { + "column": "shopid", + "table": { + "schema": "public", + "name": "associations" + } + } + } + }, + { + "name": "audit_trails", + "using": { + "foreign_key_constraint_on": { + "column": "bodyshopid", + "table": { + "schema": "public", + "name": "audit_trail" + } + } + } + }, + { + "name": "available_jobs", + "using": { + "foreign_key_constraint_on": { + "column": "bodyshopid", + "table": { + "schema": "public", + "name": "available_jobs" + } + } + } + }, + { + "name": "conversations", + "using": { + "foreign_key_constraint_on": { + "column": "bodyshopid", + "table": { + "schema": "public", + "name": "conversations" + } + } + } + }, + { + "name": "counters", + "using": { + "foreign_key_constraint_on": { + "column": "shopid", + "table": { + "schema": "public", + "name": "counters" + } + } + } + }, + { + "name": "courtesycars", + "using": { + "foreign_key_constraint_on": { + "column": "bodyshopid", + "table": { + "schema": "public", + "name": "courtesycars" + } + } + } + }, + { + "name": "csiinvites", + "using": { + "foreign_key_constraint_on": { + "column": "bodyshopid", + "table": { + "schema": "public", + "name": "csi" + } + } + } + }, + { + "name": "csiquestions", + "using": { + "foreign_key_constraint_on": { + "column": "bodyshopid", + "table": { + "schema": "public", + "name": "csiquestions" + } + } + } + }, + { + "name": "employees", + "using": { + "foreign_key_constraint_on": { + "column": "shopid", + "table": { + "schema": "public", + "name": "employees" + } + } + } + }, + { + "name": "jobs", + "using": { + "foreign_key_constraint_on": { + "column": "shopid", + "table": { + "schema": "public", + "name": "jobs" + } + } + } + }, + { + "name": "owners", + "using": { + "foreign_key_constraint_on": { + "column": "shopid", + "table": { + "schema": "public", + "name": "owners" + } + } + } + }, + { + "name": "templates", + "using": { + "foreign_key_constraint_on": { + "column": "bodyshopid", + "table": { + "schema": "public", + "name": "templates" + } + } + } + }, + { + "name": "timetickets", + "using": { + "foreign_key_constraint_on": { + "column": "bodyshopid", + "table": { + "schema": "public", + "name": "timetickets" + } + } + } + }, + { + "name": "vehicles", + "using": { + "foreign_key_constraint_on": { + "column": "shopid", + "table": { + "schema": "public", + "name": "vehicles" + } + } + } + }, + { + "name": "vendors", + "using": { + "foreign_key_constraint_on": { + "column": "bodyshopid", + "table": { + "schema": "public", + "name": "vendors" + } + } + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "accountingconfig", + "address1", + "address2", + "appt_length", + "city", + "country", + "created_at", + "deliverchecklist", + "email", + "enforce_class", + "federal_tax_id", + "id", + "inhousevendorid", + "insurance_vendor_id", + "intakechecklist", + "invoice_tax_rates", + "logo_img_path", + "md_categories", + "md_classes", + "md_ins_cos", + "md_labor_rates", + "md_messaging_presets", + "md_notes_presets", + "md_order_statuses", + "md_parts_locations", + "md_rbac", + "md_referral_sources", + "md_responsibility_centers", + "md_ro_statuses", + "messagingservicesid", + "phone", + "prodtargethrs", + "production_config", + "region_config", + "scoreboard_target", + "shopname", + "shoprates", + "speedprint", + "ssbuckets", + "state", + "state_tax_id", + "stripe_acct_id", + "target_touchtime", + "template_header", + "textid", + "updated_at", + "zip_post" + ], + "filter": { + "associations": { + "bodyshop": { + "associations": { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + } + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "accountingconfig", + "address1", + "address2", + "appt_length", + "city", + "country", + "created_at", + "deliverchecklist", + "email", + "enforce_class", + "federal_tax_id", + "id", + "inhousevendorid", + "insurance_vendor_id", + "intakechecklist", + "invoice_tax_rates", + "logo_img_path", + "md_categories", + "md_classes", + "md_ins_cos", + "md_labor_rates", + "md_messaging_presets", + "md_notes_presets", + "md_order_statuses", + "md_parts_locations", + "md_rbac", + "md_referral_sources", + "md_responsibility_centers", + "md_ro_statuses", + "phone", + "prodtargethrs", + "production_config", + "scoreboard_target", + "shopname", + "shoprates", + "speedprint", + "ssbuckets", + "state", + "state_tax_id", + "target_touchtime", + "updated_at", + "zip_post" + ], + "filter": { + "associations": { + "bodyshop": { + "associations": { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + } + } + } + }, + "check": null + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "cccontracts" + }, + "object_relationships": [ + { + "name": "courtesycar", + "using": { + "foreign_key_constraint_on": "courtesycarid" + } + }, + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "courtesycar": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "columns": [ + "id", + "created_at", + "updated_at", + "agreementnumber", + "courtesycarid", + "jobid", + "status", + "start", + "scheduledreturn", + "actualreturn", + "kmstart", + "kmend", + "driver_dlnumber", + "driver_dlexpiry", + "driver_dlst", + "driver_fn", + "driver_ln", + "driver_addr1", + "driver_addr2", + "driver_city", + "driver_state", + "driver_zip", + "driver_ph1", + "driver_dob", + "cc_num", + "cc_expiry", + "cc_cardholder", + "contract_date", + "dailyrate", + "actax", + "dailyfreekm", + "refuelcharge", + "excesskmrate", + "cleanupcharge", + "damagewaiver", + "federaltax", + "statetax", + "localtax", + "coverage" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "contract_date", + "driver_dlexpiry", + "driver_dob", + "agreementnumber", + "dailyfreekm", + "actax", + "cleanupcharge", + "coverage", + "dailyrate", + "damagewaiver", + "excesskmrate", + "federaltax", + "kmend", + "kmstart", + "localtax", + "refuelcharge", + "statetax", + "cc_cardholder", + "cc_expiry", + "cc_num", + "driver_addr1", + "driver_addr2", + "driver_city", + "driver_dlnumber", + "driver_dlst", + "driver_fn", + "driver_ln", + "driver_ph1", + "driver_state", + "driver_zip", + "status", + "actualreturn", + "created_at", + "scheduledreturn", + "start", + "updated_at", + "courtesycarid", + "id", + "jobid" + ], + "filter": { + "courtesycar": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "allow_aggregations": true + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "contract_date", + "driver_dlexpiry", + "driver_dob", + "agreementnumber", + "dailyfreekm", + "actax", + "cleanupcharge", + "coverage", + "dailyrate", + "damagewaiver", + "excesskmrate", + "federaltax", + "kmend", + "kmstart", + "localtax", + "refuelcharge", + "statetax", + "cc_cardholder", + "cc_expiry", + "cc_num", + "driver_addr1", + "driver_addr2", + "driver_city", + "driver_dlnumber", + "driver_dlst", + "driver_fn", + "driver_ln", + "driver_ph1", + "driver_state", + "driver_zip", + "status", + "actualreturn", + "created_at", + "scheduledreturn", + "start", + "updated_at", + "courtesycarid", + "id", + "jobid" + ], + "filter": { + "courtesycar": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "courtesycar": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "conversations" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "bodyshopid" + } + } + ], + "array_relationships": [ + { + "name": "job_conversations", + "using": { + "foreign_key_constraint_on": { + "column": "conversationid", + "table": { + "schema": "public", + "name": "job_conversations" + } + } + } + }, + { + "name": "messages", + "using": { + "foreign_key_constraint_on": { + "column": "conversationid", + "table": { + "schema": "public", + "name": "messages" + } + } + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "columns": [ + "id", + "created_at", + "updated_at", + "bodyshopid", + "phone_num" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "phone_num", + "created_at", + "updated_at", + "bodyshopid", + "id" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "allow_aggregations": true + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "phone_num", + "created_at", + "updated_at", + "bodyshopid", + "id" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "check": null + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "counters" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "shopid" + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "courtesycars" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "bodyshopid" + } + } + ], + "array_relationships": [ + { + "name": "cccontracts", + "using": { + "foreign_key_constraint_on": { + "column": "courtesycarid", + "table": { + "schema": "public", + "name": "cccontracts" + } + } + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "columns": [ + "id", + "created_at", + "updated_at", + "bodyshopid", + "make", + "model", + "year", + "plate", + "color", + "vin", + "fleetnumber", + "purchasedate", + "servicestartdate", + "serviceenddate", + "leaseenddate", + "status", + "nextservicekm", + "nextservicedate", + "damage", + "notes", + "fuel", + "registrationexpires", + "insuranceexpires", + "dailycost", + "mileage" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "insuranceexpires", + "leaseenddate", + "nextservicedate", + "purchasedate", + "registrationexpires", + "serviceenddate", + "servicestartdate", + "dailycost", + "fuel", + "mileage", + "nextservicekm", + "color", + "damage", + "fleetnumber", + "make", + "model", + "notes", + "plate", + "status", + "vin", + "year", + "created_at", + "updated_at", + "bodyshopid", + "id" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "insuranceexpires", + "leaseenddate", + "nextservicedate", + "purchasedate", + "registrationexpires", + "serviceenddate", + "servicestartdate", + "dailycost", + "fuel", + "mileage", + "nextservicekm", + "color", + "damage", + "fleetnumber", + "make", + "model", + "notes", + "plate", + "status", + "vin", + "year", + "created_at", + "updated_at", + "bodyshopid", + "id" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "csi" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "bodyshopid" + } + }, + { + "name": "csiquestion", + "using": { + "foreign_key_constraint_on": "questionset" + } + }, + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "columns": [ + "bodyshopid", + "created_at", + "id", + "jobid", + "questionset", + "relateddata", + "updated_at", + "valid", + "validuntil" + ] + } + } + ], + "select_permissions": [ + { + "role": "anonymous", + "permission": { + "columns": [ + "id", + "relateddata", + "valid", + "validuntil" + ], + "filter": { + "valid": { + "_eq": true + } + }, + "limit": 1 + } + }, + { + "role": "user", + "permission": { + "columns": [ + "bodyshopid", + "completedon", + "created_at", + "id", + "jobid", + "questionset", + "relateddata", + "response", + "updated_at", + "valid", + "validuntil" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "allow_aggregations": true + } + } + ], + "update_permissions": [ + { + "role": "anonymous", + "permission": { + "columns": [ + "completedon", + "response", + "valid" + ], + "filter": { + "valid": { + "_eq": true + } + }, + "check": null + } + }, + { + "role": "user", + "permission": { + "columns": [ + "bodyshopid", + "completedon", + "created_at", + "id", + "jobid", + "relateddata", + "updated_at", + "valid", + "validuntil" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "check": null + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "csiquestions" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "bodyshopid" + } + } + ], + "array_relationships": [ + { + "name": "csis", + "using": { + "foreign_key_constraint_on": { + "column": "questionset", + "table": { + "schema": "public", + "name": "csi" + } + } + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "columns": [ + "current", + "config", + "created_at", + "updated_at", + "bodyshopid", + "id" + ] + } + } + ], + "select_permissions": [ + { + "role": "anonymous", + "permission": { + "columns": [ + "config", + "id" + ], + "filter": {}, + "limit": 1 + } + }, + { + "role": "user", + "permission": { + "columns": [ + "current", + "config", + "created_at", + "updated_at", + "bodyshopid", + "id" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "current" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "check": null + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "documents" + }, + "object_relationships": [ + { + "name": "invoice", + "using": { + "foreign_key_constraint_on": "invoiceid" + } + }, + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "columns": [ + "id", + "created_at", + "updated_at", + "uploaded_by", + "jobid", + "name", + "key", + "invoiceid", + "type" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "key", + "name", + "type", + "uploaded_by", + "created_at", + "updated_at", + "id", + "invoiceid", + "jobid" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "employees" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "shopid" + } + }, + { + "name": "user", + "using": { + "foreign_key_constraint_on": "user_email" + } + } + ], + "array_relationships": [ + { + "name": "allocations", + "using": { + "foreign_key_constraint_on": { + "column": "employeeid", + "table": { + "schema": "public", + "name": "allocations" + } + } + } + }, + { + "name": "jobs", + "using": { + "foreign_key_constraint_on": { + "column": "employee_body", + "table": { + "schema": "public", + "name": "jobs" + } + } + } + }, + { + "name": "jobsByEmployeePrep", + "using": { + "foreign_key_constraint_on": { + "column": "employee_prep", + "table": { + "schema": "public", + "name": "jobs" + } + } + } + }, + { + "name": "jobsByEmployeeRefinish", + "using": { + "foreign_key_constraint_on": { + "column": "employee_refinish", + "table": { + "schema": "public", + "name": "jobs" + } + } + } + }, + { + "name": "timetickets", + "using": { + "foreign_key_constraint_on": { + "column": "employeeid", + "table": { + "schema": "public", + "name": "timetickets" + } + } + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "columns": [ + "active", + "base_rate", + "cost_center", + "created_at", + "employee_number", + "first_name", + "flat_rate", + "hire_date", + "id", + "last_name", + "pin", + "shopid", + "termination_date", + "updated_at", + "user_email" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "active", + "base_rate", + "cost_center", + "created_at", + "employee_number", + "first_name", + "flat_rate", + "hire_date", + "id", + "last_name", + "pin", + "shopid", + "termination_date", + "updated_at", + "user_email" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "active", + "base_rate", + "cost_center", + "created_at", + "employee_number", + "first_name", + "flat_rate", + "hire_date", + "id", + "last_name", + "pin", + "shopid", + "termination_date", + "updated_at", + "user_email" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "invoicelines" + }, + "object_relationships": [ + { + "name": "invoice", + "using": { + "foreign_key_constraint_on": "invoiceid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "invoice": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + }, + "columns": [ + "actual_cost", + "actual_price", + "applicable_taxes", + "cost_center", + "created_at", + "id", + "invoiceid", + "joblineid", + "line_desc", + "quantity", + "updated_at" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "actual_cost", + "actual_price", + "applicable_taxes", + "cost_center", + "created_at", + "id", + "invoiceid", + "joblineid", + "line_desc", + "quantity", + "updated_at" + ], + "filter": { + "invoice": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "actual_cost", + "actual_price", + "applicable_taxes", + "cost_center", + "created_at", + "id", + "invoiceid", + "joblineid", + "line_desc", + "quantity", + "updated_at" + ], + "filter": { + "invoice": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "invoice": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "invoices" + }, + "object_relationships": [ + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + }, + { + "name": "vendor", + "using": { + "foreign_key_constraint_on": "vendorid" + } + } + ], + "array_relationships": [ + { + "name": "documents", + "using": { + "foreign_key_constraint_on": { + "column": "invoiceid", + "table": { + "schema": "public", + "name": "documents" + } + } + } + }, + { + "name": "invoicelines", + "using": { + "foreign_key_constraint_on": { + "column": "invoiceid", + "table": { + "schema": "public", + "name": "invoicelines" + } + } + } + }, + { + "name": "parts_orders", + "using": { + "foreign_key_constraint_on": { + "column": "returnfrominvoice", + "table": { + "schema": "public", + "name": "parts_orders" + } + } + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "columns": [ + "created_at", + "date", + "due_date", + "exported", + "exported_at", + "federal_tax_rate", + "id", + "invoice_number", + "is_credit_memo", + "jobid", + "local_tax_rate", + "state_tax_rate", + "total", + "updated_at", + "vendorid" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "created_at", + "date", + "due_date", + "exported", + "exported_at", + "federal_tax_rate", + "id", + "invoice_number", + "is_credit_memo", + "jobid", + "local_tax_rate", + "state_tax_rate", + "total", + "updated_at", + "vendorid" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "allow_aggregations": true + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "created_at", + "date", + "due_date", + "exported", + "exported_at", + "federal_tax_rate", + "id", + "invoice_number", + "is_credit_memo", + "jobid", + "local_tax_rate", + "state_tax_rate", + "total", + "updated_at", + "vendorid" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "check": null + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "job_conversations" + }, + "object_relationships": [ + { + "name": "conversation", + "using": { + "foreign_key_constraint_on": "conversationid" + } + }, + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "conversation": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "columns": [ + "jobid", + "conversationid" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "conversationid", + "jobid" + ], + "filter": { + "conversation": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "conversationid", + "jobid" + ], + "filter": { + "conversation": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "conversation": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "joblines" + }, + "object_relationships": [ + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + } + ], + "array_relationships": [ + { + "name": "allocations", + "using": { + "foreign_key_constraint_on": { + "column": "joblineid", + "table": { + "schema": "public", + "name": "allocations" + } + } + } + }, + { + "name": "parts_order_lines", + "using": { + "foreign_key_constraint_on": { + "column": "job_line_id", + "table": { + "schema": "public", + "name": "parts_order_lines" + } + } + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "columns": [ + "act_price", + "alt_co_id", + "alt_overrd", + "alt_part_i", + "alt_partm", + "alt_partno", + "bett_amt", + "bett_pctg", + "bett_tax", + "bett_type", + "cert_part", + "created_at", + "db_hrs", + "db_price", + "db_ref", + "est_seq", + "glass_flag", + "id", + "jobid", + "lbr_amt", + "lbr_hrs_j", + "lbr_inc", + "lbr_op", + "lbr_op_j", + "lbr_tax", + "lbr_typ_j", + "line_desc", + "line_ind", + "line_no", + "line_ref", + "location", + "misc_amt", + "misc_sublt", + "misc_tax", + "mod_lb_hrs", + "mod_lbr_ty", + "notes", + "oem_partno", + "op_code_desc", + "paint_stg", + "paint_tone", + "part_qty", + "part_type", + "price_inc", + "price_j", + "profitcenter_labor", + "profitcenter_part", + "prt_dsmk_m", + "prt_dsmk_p", + "removed", + "status", + "tax_part", + "unq_seq", + "updated_at" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "act_price", + "alt_co_id", + "alt_overrd", + "alt_part_i", + "alt_partm", + "alt_partno", + "bett_amt", + "bett_pctg", + "bett_tax", + "bett_type", + "cert_part", + "created_at", + "db_hrs", + "db_price", + "db_ref", + "est_seq", + "glass_flag", + "id", + "jobid", + "lbr_amt", + "lbr_hrs_j", + "lbr_inc", + "lbr_op", + "lbr_op_j", + "lbr_tax", + "lbr_typ_j", + "line_desc", + "line_ind", + "line_no", + "line_ref", + "location", + "misc_amt", + "misc_sublt", + "misc_tax", + "mod_lb_hrs", + "mod_lbr_ty", + "notes", + "oem_partno", + "op_code_desc", + "paint_stg", + "paint_tone", + "part_qty", + "part_type", + "price_inc", + "price_j", + "profitcenter_labor", + "profitcenter_part", + "prt_dsmk_m", + "prt_dsmk_p", + "removed", + "status", + "tax_part", + "unq_seq", + "updated_at" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "allow_aggregations": true + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "act_price", + "alt_co_id", + "alt_overrd", + "alt_part_i", + "alt_partm", + "alt_partno", + "bett_amt", + "bett_pctg", + "bett_tax", + "bett_type", + "cert_part", + "created_at", + "db_hrs", + "db_price", + "db_ref", + "est_seq", + "glass_flag", + "id", + "jobid", + "lbr_amt", + "lbr_hrs_j", + "lbr_inc", + "lbr_op", + "lbr_op_j", + "lbr_tax", + "lbr_typ_j", + "line_desc", + "line_ind", + "line_no", + "line_ref", + "location", + "misc_amt", + "misc_sublt", + "misc_tax", + "mod_lb_hrs", + "mod_lbr_ty", + "notes", + "oem_partno", + "op_code_desc", + "paint_stg", + "paint_tone", + "part_qty", + "part_type", + "price_inc", + "price_j", + "profitcenter_labor", + "profitcenter_part", + "prt_dsmk_m", + "prt_dsmk_p", + "removed", + "status", + "tax_part", + "unq_seq", + "updated_at" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "joblines_status" + }, + "object_relationships": [ + { + "name": "job", + "using": { + "manual_configuration": { + "remote_table": { + "schema": "public", + "name": "jobs" + }, + "column_mapping": { + "jobid": "id" + } + } + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "jobid", + "status", + "count", + "part_type" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "jobs" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "shopid" + } + }, + { + "name": "employee_body_rel", + "using": { + "foreign_key_constraint_on": "employee_body" + } + }, + { + "name": "employee_prep_rel", + "using": { + "foreign_key_constraint_on": "employee_prep" + } + }, + { + "name": "employee_refinish_rel", + "using": { + "foreign_key_constraint_on": "employee_refinish" + } + }, + { + "name": "invoice", + "using": { + "manual_configuration": { + "remote_table": { + "schema": "public", + "name": "invoices" + }, + "column_mapping": { + "id": "jobid" + } + } + } + }, + { + "name": "owner", + "using": { + "foreign_key_constraint_on": "ownerid" + } + }, + { + "name": "vehicle", + "using": { + "foreign_key_constraint_on": "vehicleid" + } + } + ], + "array_relationships": [ + { + "name": "appointments", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "appointments" + } + } + } + }, + { + "name": "available_jobs", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "available_jobs" + } + } + } + }, + { + "name": "cccontracts", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "cccontracts" + } + } + } + }, + { + "name": "csiinvites", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "csi" + } + } + } + }, + { + "name": "documents", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "documents" + } + } + } + }, + { + "name": "invoices", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "invoices" + } + } + } + }, + { + "name": "job_conversations", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "job_conversations" + } + } + } + }, + { + "name": "joblines", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "joblines" + } + } + } + }, + { + "name": "joblines_status", + "using": { + "manual_configuration": { + "remote_table": { + "schema": "public", + "name": "joblines_status" + }, + "column_mapping": { + "id": "jobid" + } + } + } + }, + { + "name": "notes", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "notes" + } + } + } + }, + { + "name": "parts_orders", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "parts_orders" + } + } + } + }, + { + "name": "payments", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "payments" + } + } + } + }, + { + "name": "scoreboards", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "scoreboard" + } + } + } + }, + { + "name": "timetickets", + "using": { + "foreign_key_constraint_on": { + "column": "jobid", + "table": { + "schema": "public", + "name": "timetickets" + } + } + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "columns": [ + "actual_completion", + "actual_delivery", + "actual_in", + "adj_g_disc", + "adj_strdis", + "adj_towdis", + "adjustment_bottom_line", + "agt_addr1", + "agt_addr2", + "agt_city", + "agt_co_id", + "agt_co_nm", + "agt_ct_fn", + "agt_ct_ln", + "agt_ct_ph", + "agt_ct_phx", + "agt_ctry", + "agt_ea", + "agt_fax", + "agt_faxx", + "agt_lic_no", + "agt_ph1", + "agt_ph1x", + "agt_ph2", + "agt_ph2x", + "agt_st", + "agt_zip", + "area_of_damage", + "asgn_date", + "asgn_no", + "asgn_type", + "cat_no", + "category", + "cieca_stl", + "cieca_ttl", + "ciecaid", + "class", + "clm_addr1", + "clm_addr2", + "clm_city", + "clm_ct_fn", + "clm_ct_ln", + "clm_ct_ph", + "clm_ct_phx", + "clm_ctry", + "clm_ea", + "clm_fax", + "clm_faxx", + "clm_no", + "clm_ofc_id", + "clm_ofc_nm", + "clm_ph1", + "clm_ph1x", + "clm_ph2", + "clm_ph2x", + "clm_st", + "clm_title", + "clm_total", + "clm_zip", + "converted", + "created_at", + "csr", + "cust_pr", + "date_closed", + "date_estimated", + "date_exported", + "date_invoiced", + "date_open", + "date_scheduled", + "ded_amt", + "ded_status", + "deliverchecklist", + "depreciation_taxes", + "employee_body", + "employee_prep", + "employee_refinish", + "est_addr1", + "est_addr2", + "est_city", + "est_co_nm", + "est_ct_fn", + "est_ct_ln", + "est_ctry", + "est_ea", + "est_number", + "est_ph1", + "est_st", + "est_zip", + "federal_tax_payable", + "federal_tax_rate", + "g_bett_amt", + "id", + "inproduction", + "ins_addr1", + "ins_addr2", + "ins_city", + "ins_co_id", + "ins_co_nm", + "ins_ct_fn", + "ins_ct_ln", + "ins_ct_ph", + "ins_ct_phx", + "ins_ctry", + "ins_ea", + "ins_fax", + "ins_faxx", + "ins_memo", + "ins_ph1", + "ins_ph1x", + "ins_ph2", + "ins_ph2x", + "ins_st", + "ins_title", + "ins_zip", + "insd_addr1", + "insd_addr2", + "insd_city", + "insd_co_nm", + "insd_ctry", + "insd_ea", + "insd_fax", + "insd_faxx", + "insd_fn", + "insd_ln", + "insd_ph1", + "insd_ph1x", + "insd_ph2", + "insd_ph2x", + "insd_st", + "insd_title", + "insd_zip", + "intakechecklist", + "invoice_allocation", + "invoice_date", + "job_totals", + "kanbanparent", + "kmin", + "kmout", + "labor_rate_desc", + "labor_rate_id", + "local_tax_rate", + "loss_cat", + "loss_date", + "loss_desc", + "loss_type", + "other_amount_payable", + "owner_owing", + "ownerid", + "ownr_addr1", + "ownr_addr2", + "ownr_city", + "ownr_co_nm", + "ownr_ctry", + "ownr_ea", + "ownr_fax", + "ownr_faxx", + "ownr_fn", + "ownr_ln", + "ownr_ph1", + "ownr_ph1x", + "ownr_ph2", + "ownr_ph2x", + "ownr_st", + "ownr_title", + "ownr_zip", + "parts_tax_rates", + "pay_amt", + "pay_chknm", + "pay_date", + "pay_type", + "payee_nms", + "plate_no", + "plate_st", + "po_number", + "policy_no", + "production_vars", + "rate_la1", + "rate_la2", + "rate_la3", + "rate_la4", + "rate_laa", + "rate_lab", + "rate_lad", + "rate_lae", + "rate_laf", + "rate_lag", + "rate_lam", + "rate_lar", + "rate_las", + "rate_lau", + "rate_ma2s", + "rate_ma2t", + "rate_ma3s", + "rate_mabl", + "rate_macs", + "rate_mahw", + "rate_mapa", + "rate_mash", + "rate_matd", + "referral_source", + "regie_number", + "ro_number", + "scheduled_completion", + "scheduled_delivery", + "scheduled_in", + "selling_dealer", + "selling_dealer_contact", + "servicing_dealer", + "servicing_dealer_contact", + "shopid", + "special_coverage_policy", + "state_tax_rate", + "status", + "storage_payable", + "tax_lbr_rt", + "tax_levies_rt", + "tax_paint_mat_rt", + "tax_predis", + "tax_prethr", + "tax_pstthr", + "tax_registration_number", + "tax_shop_mat_rt", + "tax_str_rt", + "tax_sub_rt", + "tax_thramt", + "tax_tow_rt", + "theft_ind", + "tlos_ind", + "towing_payable", + "unit_number", + "updated_at", + "v_color", + "v_make_desc", + "v_model_desc", + "v_model_yr", + "v_vin", + "vehicleid" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "actual_completion", + "actual_delivery", + "actual_in", + "adj_g_disc", + "adj_strdis", + "adj_towdis", + "adjustment_bottom_line", + "agt_addr1", + "agt_addr2", + "agt_city", + "agt_co_id", + "agt_co_nm", + "agt_ct_fn", + "agt_ct_ln", + "agt_ct_ph", + "agt_ct_phx", + "agt_ctry", + "agt_ea", + "agt_fax", + "agt_faxx", + "agt_lic_no", + "agt_ph1", + "agt_ph1x", + "agt_ph2", + "agt_ph2x", + "agt_st", + "agt_zip", + "area_of_damage", + "asgn_date", + "asgn_no", + "asgn_type", + "cat_no", + "category", + "cieca_stl", + "cieca_ttl", + "ciecaid", + "class", + "clm_addr1", + "clm_addr2", + "clm_city", + "clm_ct_fn", + "clm_ct_ln", + "clm_ct_ph", + "clm_ct_phx", + "clm_ctry", + "clm_ea", + "clm_fax", + "clm_faxx", + "clm_no", + "clm_ofc_id", + "clm_ofc_nm", + "clm_ph1", + "clm_ph1x", + "clm_ph2", + "clm_ph2x", + "clm_st", + "clm_title", + "clm_total", + "clm_zip", + "converted", + "created_at", + "csr", + "cust_pr", + "date_closed", + "date_estimated", + "date_exported", + "date_invoiced", + "date_open", + "date_scheduled", + "ded_amt", + "ded_status", + "deliverchecklist", + "depreciation_taxes", + "employee_body", + "employee_prep", + "employee_refinish", + "est_addr1", + "est_addr2", + "est_city", + "est_co_nm", + "est_ct_fn", + "est_ct_ln", + "est_ctry", + "est_ea", + "est_number", + "est_ph1", + "est_st", + "est_zip", + "federal_tax_payable", + "federal_tax_rate", + "g_bett_amt", + "id", + "inproduction", + "ins_addr1", + "ins_addr2", + "ins_city", + "ins_co_id", + "ins_co_nm", + "ins_ct_fn", + "ins_ct_ln", + "ins_ct_ph", + "ins_ct_phx", + "ins_ctry", + "ins_ea", + "ins_fax", + "ins_faxx", + "ins_memo", + "ins_ph1", + "ins_ph1x", + "ins_ph2", + "ins_ph2x", + "ins_st", + "ins_title", + "ins_zip", + "insd_addr1", + "insd_addr2", + "insd_city", + "insd_co_nm", + "insd_ctry", + "insd_ea", + "insd_fax", + "insd_faxx", + "insd_fn", + "insd_ln", + "insd_ph1", + "insd_ph1x", + "insd_ph2", + "insd_ph2x", + "insd_st", + "insd_title", + "insd_zip", + "intakechecklist", + "invoice_allocation", + "invoice_date", + "job_totals", + "kanbanparent", + "kmin", + "kmout", + "labor_rate_desc", + "labor_rate_id", + "local_tax_rate", + "loss_cat", + "loss_date", + "loss_desc", + "loss_type", + "other_amount_payable", + "owner_owing", + "ownerid", + "ownr_addr1", + "ownr_addr2", + "ownr_city", + "ownr_co_nm", + "ownr_ctry", + "ownr_ea", + "ownr_fax", + "ownr_faxx", + "ownr_fn", + "ownr_ln", + "ownr_ph1", + "ownr_ph1x", + "ownr_ph2", + "ownr_ph2x", + "ownr_st", + "ownr_title", + "ownr_zip", + "parts_tax_rates", + "pay_amt", + "pay_chknm", + "pay_date", + "pay_type", + "payee_nms", + "plate_no", + "plate_st", + "po_number", + "policy_no", + "production_vars", + "rate_la1", + "rate_la2", + "rate_la3", + "rate_la4", + "rate_laa", + "rate_lab", + "rate_lad", + "rate_lae", + "rate_laf", + "rate_lag", + "rate_lam", + "rate_lar", + "rate_las", + "rate_lau", + "rate_ma2s", + "rate_ma2t", + "rate_ma3s", + "rate_mabl", + "rate_macs", + "rate_mahw", + "rate_mapa", + "rate_mash", + "rate_matd", + "referral_source", + "regie_number", + "ro_number", + "scheduled_completion", + "scheduled_delivery", + "scheduled_in", + "selling_dealer", + "selling_dealer_contact", + "servicing_dealer", + "servicing_dealer_contact", + "shopid", + "special_coverage_policy", + "state_tax_rate", + "status", + "storage_payable", + "tax_lbr_rt", + "tax_levies_rt", + "tax_paint_mat_rt", + "tax_predis", + "tax_prethr", + "tax_pstthr", + "tax_registration_number", + "tax_shop_mat_rt", + "tax_str_rt", + "tax_sub_rt", + "tax_thramt", + "tax_tow_rt", + "theft_ind", + "tlos_ind", + "towing_payable", + "unit_number", + "updated_at", + "v_color", + "v_make_desc", + "v_model_desc", + "v_model_yr", + "v_vin", + "vehicleid" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "allow_aggregations": true + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "actual_completion", + "actual_delivery", + "actual_in", + "adj_g_disc", + "adj_strdis", + "adj_towdis", + "adjustment_bottom_line", + "agt_addr1", + "agt_addr2", + "agt_city", + "agt_co_id", + "agt_co_nm", + "agt_ct_fn", + "agt_ct_ln", + "agt_ct_ph", + "agt_ct_phx", + "agt_ctry", + "agt_ea", + "agt_fax", + "agt_faxx", + "agt_lic_no", + "agt_ph1", + "agt_ph1x", + "agt_ph2", + "agt_ph2x", + "agt_st", + "agt_zip", + "area_of_damage", + "asgn_date", + "asgn_no", + "asgn_type", + "cat_no", + "category", + "cieca_stl", + "cieca_ttl", + "ciecaid", + "class", + "clm_addr1", + "clm_addr2", + "clm_city", + "clm_ct_fn", + "clm_ct_ln", + "clm_ct_ph", + "clm_ct_phx", + "clm_ctry", + "clm_ea", + "clm_fax", + "clm_faxx", + "clm_no", + "clm_ofc_id", + "clm_ofc_nm", + "clm_ph1", + "clm_ph1x", + "clm_ph2", + "clm_ph2x", + "clm_st", + "clm_title", + "clm_total", + "clm_zip", + "converted", + "created_at", + "csr", + "cust_pr", + "date_closed", + "date_estimated", + "date_exported", + "date_invoiced", + "date_open", + "date_scheduled", + "ded_amt", + "ded_status", + "deliverchecklist", + "depreciation_taxes", + "employee_body", + "employee_prep", + "employee_refinish", + "est_addr1", + "est_addr2", + "est_city", + "est_co_nm", + "est_ct_fn", + "est_ct_ln", + "est_ctry", + "est_ea", + "est_number", + "est_ph1", + "est_st", + "est_zip", + "federal_tax_payable", + "federal_tax_rate", + "g_bett_amt", + "id", + "inproduction", + "ins_addr1", + "ins_addr2", + "ins_city", + "ins_co_id", + "ins_co_nm", + "ins_ct_fn", + "ins_ct_ln", + "ins_ct_ph", + "ins_ct_phx", + "ins_ctry", + "ins_ea", + "ins_fax", + "ins_faxx", + "ins_memo", + "ins_ph1", + "ins_ph1x", + "ins_ph2", + "ins_ph2x", + "ins_st", + "ins_title", + "ins_zip", + "insd_addr1", + "insd_addr2", + "insd_city", + "insd_co_nm", + "insd_ctry", + "insd_ea", + "insd_fax", + "insd_faxx", + "insd_fn", + "insd_ln", + "insd_ph1", + "insd_ph1x", + "insd_ph2", + "insd_ph2x", + "insd_st", + "insd_title", + "insd_zip", + "intakechecklist", + "invoice_allocation", + "invoice_date", + "job_totals", + "kanbanparent", + "kmin", + "kmout", + "labor_rate_desc", + "labor_rate_id", + "local_tax_rate", + "loss_cat", + "loss_date", + "loss_desc", + "loss_type", + "other_amount_payable", + "owner_owing", + "ownerid", + "ownr_addr1", + "ownr_addr2", + "ownr_city", + "ownr_co_nm", + "ownr_ctry", + "ownr_ea", + "ownr_fax", + "ownr_faxx", + "ownr_fn", + "ownr_ln", + "ownr_ph1", + "ownr_ph1x", + "ownr_ph2", + "ownr_ph2x", + "ownr_st", + "ownr_title", + "ownr_zip", + "parts_tax_rates", + "pay_amt", + "pay_chknm", + "pay_date", + "pay_type", + "payee_nms", + "plate_no", + "plate_st", + "po_number", + "policy_no", + "production_vars", + "rate_la1", + "rate_la2", + "rate_la3", + "rate_la4", + "rate_laa", + "rate_lab", + "rate_lad", + "rate_lae", + "rate_laf", + "rate_lag", + "rate_lam", + "rate_lar", + "rate_las", + "rate_lau", + "rate_ma2s", + "rate_ma2t", + "rate_ma3s", + "rate_mabl", + "rate_macs", + "rate_mahw", + "rate_mapa", + "rate_mash", + "rate_matd", + "referral_source", + "regie_number", + "ro_number", + "scheduled_completion", + "scheduled_delivery", + "scheduled_in", + "selling_dealer", + "selling_dealer_contact", + "servicing_dealer", + "servicing_dealer_contact", + "shopid", + "special_coverage_policy", + "state_tax_rate", + "status", + "storage_payable", + "tax_lbr_rt", + "tax_levies_rt", + "tax_paint_mat_rt", + "tax_predis", + "tax_prethr", + "tax_pstthr", + "tax_registration_number", + "tax_shop_mat_rt", + "tax_str_rt", + "tax_sub_rt", + "tax_thramt", + "tax_tow_rt", + "theft_ind", + "tlos_ind", + "towing_payable", + "unit_number", + "updated_at", + "v_color", + "v_make_desc", + "v_model_desc", + "v_model_yr", + "v_vin", + "vehicleid" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "masterdata" + }, + "select_permissions": [ + { + "role": "anonymous", + "permission": { + "columns": [ + "key", + "value" + ], + "filter": {} + } + }, + { + "role": "user", + "permission": { + "columns": [ + "key", + "value" + ], + "filter": {} + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "messages" + }, + "object_relationships": [ + { + "name": "conversation", + "using": { + "foreign_key_constraint_on": "conversationid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "conversation": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "columns": [ + "id", + "created_at", + "updated_at", + "msid", + "conversationid", + "text", + "image", + "image_path", + "isoutbound", + "status", + "read" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "image", + "isoutbound", + "read", + "image_path", + "msid", + "status", + "text", + "created_at", + "updated_at", + "conversationid", + "id" + ], + "filter": { + "conversation": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "allow_aggregations": true + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "image", + "isoutbound", + "read", + "image_path", + "msid", + "status", + "text", + "created_at", + "updated_at", + "conversationid", + "id" + ], + "filter": { + "conversation": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "conversation": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "notes" + }, + "object_relationships": [ + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + }, + { + "name": "user", + "using": { + "foreign_key_constraint_on": "created_by" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "columns": [ + "id", + "created_at", + "updated_at", + "jobid", + "text", + "created_by", + "critical", + "private" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "critical", + "private", + "created_by", + "text", + "created_at", + "updated_at", + "id", + "jobid" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "critical", + "private", + "created_by", + "text", + "created_at", + "updated_at", + "id", + "jobid" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "owners" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "shopid" + } + } + ], + "array_relationships": [ + { + "name": "jobs", + "using": { + "foreign_key_constraint_on": { + "column": "ownerid", + "table": { + "schema": "public", + "name": "jobs" + } + } + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "columns": [ + "id", + "created_at", + "updated_at", + "ownr_fn", + "ownr_ln", + "ownr_addr1", + "ownr_addr2", + "ownr_city", + "ownr_st", + "ownr_zip", + "ownr_ctry", + "ownr_ea", + "ownr_ph1", + "preferred_contact", + "allow_text_message", + "shopid", + "ownr_ph2", + "ownr_co_nm", + "ownr_title", + "accountingid" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "allow_text_message", + "accountingid", + "ownr_addr1", + "ownr_addr2", + "ownr_city", + "ownr_co_nm", + "ownr_ctry", + "ownr_ea", + "ownr_fn", + "ownr_ln", + "ownr_ph1", + "ownr_ph2", + "ownr_st", + "ownr_title", + "ownr_zip", + "preferred_contact", + "created_at", + "updated_at", + "id", + "shopid" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "allow_aggregations": true + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "allow_text_message", + "accountingid", + "ownr_addr1", + "ownr_addr2", + "ownr_city", + "ownr_co_nm", + "ownr_ctry", + "ownr_ea", + "ownr_fn", + "ownr_ln", + "ownr_ph1", + "ownr_ph2", + "ownr_st", + "ownr_title", + "ownr_zip", + "preferred_contact", + "created_at", + "updated_at", + "id", + "shopid" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "parts_order_lines" + }, + "object_relationships": [ + { + "name": "jobline", + "using": { + "foreign_key_constraint_on": "job_line_id" + } + }, + { + "name": "parts_order", + "using": { + "foreign_key_constraint_on": "orderid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "parts_order": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + }, + "columns": [ + "act_price", + "backordered_eta", + "backordered_on", + "created_at", + "db_price", + "id", + "job_line_id", + "line_desc", + "line_remarks", + "oem_partno", + "orderid", + "quantity", + "status", + "updated_at" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "act_price", + "backordered_eta", + "backordered_on", + "created_at", + "db_price", + "id", + "job_line_id", + "line_desc", + "line_remarks", + "oem_partno", + "orderid", + "quantity", + "status", + "updated_at" + ], + "filter": { + "parts_order": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "act_price", + "backordered_eta", + "backordered_on", + "created_at", + "db_price", + "id", + "job_line_id", + "line_desc", + "line_remarks", + "oem_partno", + "orderid", + "quantity", + "status", + "updated_at" + ], + "filter": { + "parts_order": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "parts_order": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "parts_orders" + }, + "object_relationships": [ + { + "name": "invoice", + "using": { + "foreign_key_constraint_on": "returnfrominvoice" + } + }, + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + }, + { + "name": "user", + "using": { + "foreign_key_constraint_on": "user_email" + } + }, + { + "name": "vendor", + "using": { + "foreign_key_constraint_on": "vendorid" + } + } + ], + "array_relationships": [ + { + "name": "parts_order_lines", + "using": { + "foreign_key_constraint_on": { + "column": "orderid", + "table": { + "schema": "public", + "name": "parts_order_lines" + } + } + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "columns": [ + "created_at", + "deliver_by", + "id", + "jobid", + "order_date", + "order_number", + "return", + "returnfrominvoice", + "status", + "updated_at", + "user_email", + "vendorid" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "created_at", + "deliver_by", + "id", + "jobid", + "order_date", + "order_number", + "return", + "returnfrominvoice", + "status", + "updated_at", + "user_email", + "vendorid" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "created_at", + "deliver_by", + "id", + "jobid", + "order_date", + "order_number", + "returnfrominvoice", + "status", + "updated_at", + "user_email", + "vendorid" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "payments" + }, + "object_relationships": [ + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "columns": [ + "amount", + "created_at", + "exportedat", + "id", + "jobid", + "memo", + "payer", + "stripeid", + "transactionid", + "type", + "updated_at" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "amount", + "created_at", + "exportedat", + "id", + "jobid", + "memo", + "payer", + "stripeid", + "transactionid", + "type", + "updated_at" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "allow_aggregations": true + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "amount", + "created_at", + "exportedat", + "id", + "jobid", + "memo", + "payer", + "stripeid", + "transactionid", + "type", + "updated_at" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "scoreboard" + }, + "object_relationships": [ + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "columns": [ + "id", + "jobid", + "painthrs", + "bodyhrs", + "date" + ], + "backend_only": false + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "date", + "bodyhrs", + "painthrs", + "id", + "jobid" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "allow_aggregations": true + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "date", + "bodyhrs", + "painthrs", + "id", + "jobid" + ], + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "job": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "templates" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "bodyshopid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "_or": [ + { + "bodyshopid": { + "_is_null": true + } + }, + { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + ] + }, + "columns": [ + "bodyshopid", + "html", + "jsontemplate", + "name", + "query" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "bodyshopid", + "created_at", + "html", + "id", + "jsontemplate", + "name", + "query", + "updated_at" + ], + "filter": { + "_or": [ + { + "bodyshopid": { + "_is_null": true + } + }, + { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + ] + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "bodyshopid", + "created_at", + "html", + "id", + "jsontemplate", + "name", + "query", + "updated_at" + ], + "filter": { + "_or": [ + { + "bodyshopid": { + "_is_null": true + } + }, + { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + ] + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "_or": [ + { + "bodyshopid": { + "_is_null": false + } + }, + { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + ] + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "timetickets" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "bodyshopid" + } + }, + { + "name": "employee", + "using": { + "foreign_key_constraint_on": "employeeid" + } + }, + { + "name": "job", + "using": { + "foreign_key_constraint_on": "jobid" + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "columns": [ + "actualhrs", + "bodyshopid", + "ciecacode", + "clockoff", + "clockon", + "cost_center", + "created_at", + "date", + "employeeid", + "id", + "jobid", + "memo", + "productivehrs", + "rate", + "updated_at" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "actualhrs", + "bodyshopid", + "ciecacode", + "clockoff", + "clockon", + "cost_center", + "created_at", + "date", + "employeeid", + "id", + "jobid", + "memo", + "productivehrs", + "rate", + "updated_at" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "actualhrs", + "bodyshopid", + "ciecacode", + "clockoff", + "clockon", + "cost_center", + "created_at", + "date", + "employeeid", + "id", + "jobid", + "memo", + "productivehrs", + "rate", + "updated_at" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "users" + }, + "object_relationships": [ + { + "name": "employee", + "using": { + "manual_configuration": { + "remote_table": { + "schema": "public", + "name": "employees" + }, + "column_mapping": { + "email": "user_email" + } + } + } + } + ], + "array_relationships": [ + { + "name": "associations", + "using": { + "foreign_key_constraint_on": { + "column": "useremail", + "table": { + "schema": "public", + "name": "associations" + } + } + } + }, + { + "name": "audit_trails", + "using": { + "foreign_key_constraint_on": { + "column": "useremail", + "table": { + "schema": "public", + "name": "audit_trail" + } + } + } + }, + { + "name": "notes", + "using": { + "foreign_key_constraint_on": { + "column": "created_by", + "table": { + "schema": "public", + "name": "notes" + } + } + } + }, + { + "name": "parts_orders", + "using": { + "foreign_key_constraint_on": { + "column": "user_email", + "table": { + "schema": "public", + "name": "parts_orders" + } + } + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": {}, + "columns": [ + "authid", + "email", + "fcmtokens" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "authid", + "created_at", + "dashboardlayout", + "email", + "fcmtokens", + "updated_at" + ], + "filter": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "authid", + "dashboardlayout", + "email", + "fcmtokens" + ], + "filter": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + }, + "check": null + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "vehicles" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "shopid" + } + } + ], + "array_relationships": [ + { + "name": "jobs", + "using": { + "foreign_key_constraint_on": { + "column": "vehicleid", + "table": { + "schema": "public", + "name": "jobs" + } + } + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "columns": [ + "id", + "created_at", + "updated_at", + "v_vin", + "v_make_desc", + "v_model_desc", + "v_model_yr", + "v_color", + "v_paint_codes", + "v_bstyle", + "v_engine", + "shopid", + "db_v_code", + "plate_no", + "plate_st", + "v_cond", + "v_prod_dt", + "v_type", + "v_trimcode", + "trim_color", + "v_mldgcode", + "v_options", + "v_tone", + "v_stage", + "v_makecode" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "v_paint_codes", + "db_v_code", + "plate_no", + "plate_st", + "trim_color", + "v_bstyle", + "v_color", + "v_cond", + "v_engine", + "v_makecode", + "v_make_desc", + "v_mldgcode", + "v_model_desc", + "v_model_yr", + "v_options", + "v_prod_dt", + "v_stage", + "v_tone", + "v_trimcode", + "v_type", + "v_vin", + "created_at", + "updated_at", + "id", + "shopid" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "allow_aggregations": true + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "v_paint_codes", + "db_v_code", + "plate_no", + "plate_st", + "trim_color", + "v_bstyle", + "v_color", + "v_cond", + "v_engine", + "v_makecode", + "v_make_desc", + "v_mldgcode", + "v_model_desc", + "v_model_yr", + "v_options", + "v_prod_dt", + "v_stage", + "v_tone", + "v_trimcode", + "v_type", + "v_vin", + "created_at", + "updated_at", + "id", + "shopid" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ] + }, + { + "table": { + "schema": "public", + "name": "vendors" + }, + "object_relationships": [ + { + "name": "bodyshop", + "using": { + "foreign_key_constraint_on": "bodyshopid" + } + } + ], + "array_relationships": [ + { + "name": "invoices", + "using": { + "foreign_key_constraint_on": { + "column": "vendorid", + "table": { + "schema": "public", + "name": "invoices" + } + } + } + }, + { + "name": "parts_orders", + "using": { + "foreign_key_constraint_on": { + "column": "vendorid", + "table": { + "schema": "public", + "name": "parts_orders" + } + } + } + } + ], + "insert_permissions": [ + { + "role": "user", + "permission": { + "check": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "columns": [ + "due_date", + "favorite", + "discount", + "prompt_discount", + "city", + "cost_center", + "country", + "display_name", + "email", + "name", + "state", + "street1", + "street2", + "taxid", + "terms", + "zip", + "created_at", + "updated_at", + "bodyshopid", + "id" + ] + } + } + ], + "select_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "due_date", + "favorite", + "discount", + "prompt_discount", + "city", + "cost_center", + "country", + "display_name", + "email", + "name", + "state", + "street1", + "street2", + "taxid", + "terms", + "zip", + "created_at", + "updated_at", + "bodyshopid", + "id" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ], + "update_permissions": [ + { + "role": "user", + "permission": { + "columns": [ + "due_date", + "favorite", + "discount", + "prompt_discount", + "city", + "cost_center", + "country", + "display_name", + "email", + "name", + "state", + "street1", + "street2", + "taxid", + "terms", + "zip", + "created_at", + "updated_at", + "bodyshopid", + "id" + ], + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + }, + "check": null + } + } + ], + "delete_permissions": [ + { + "role": "user", + "permission": { + "filter": { + "bodyshop": { + "associations": { + "_and": [ + { + "user": { + "authid": { + "_eq": "X-Hasura-User-Id" + } + } + }, + { + "active": { + "_eq": true + } + } + ] + } + } + } + } + } + ] + } + ], + "functions": [ + { + "function": { + "schema": "public", + "name": "search_invoices" + } + }, + { + "function": { + "schema": "public", + "name": "search_jobs" + } + }, + { + "function": { + "schema": "public", + "name": "search_owners" + } + }, + { + "function": { + "schema": "public", + "name": "search_payments" + } + }, + { + "function": { + "schema": "public", + "name": "search_vehicles" + } + } + ] +} \ No newline at end of file