Skip to content

Commit

Permalink
add application type migration for analytics and submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
RODO94 committed Oct 29, 2024
1 parent 0ce5aff commit e11368f
Show file tree
Hide file tree
Showing 3 changed files with 361 additions and 37 deletions.
82 changes: 45 additions & 37 deletions hasura.planx.uk/metadata/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
definition:
enable_manual: false
insert:
columns: "*"
columns: '*'
retry_conf:
interval_sec: 30
num_retries: 1
Expand All @@ -171,7 +171,7 @@
query_params:
type: bops-submission
template_engine: Kriti
url: "{{$base_url}}/webhooks/hasura/send-slack-notification"
url: '{{$base_url}}/webhooks/hasura/send-slack-notification'
version: 2
- table:
name: document_template
Expand Down Expand Up @@ -225,7 +225,7 @@
definition:
enable_manual: false
insert:
columns: "*"
columns: '*'
retry_conf:
interval_sec: 30
num_retries: 1
Expand All @@ -239,7 +239,7 @@
query_params:
type: email-submission
template_engine: Kriti
url: "{{$base_url}}/webhooks/hasura/send-slack-notification"
url: '{{$base_url}}/webhooks/hasura/send-slack-notification'
version: 2
- table:
name: feedback
Expand Down Expand Up @@ -464,6 +464,8 @@
- role: api
permission:
check: {}
set:
creator_id: x-hasura-user-id
columns:
- copied_from
- created_at
Expand All @@ -481,15 +483,17 @@
forward_client_headers: false
headers:
- name: authorization
value: "{{HASURA_PLANX_API_KEY}}"
value: '{{HASURA_PLANX_API_KEY}}'
timeout: 10
url: "{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html"
url: '{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html'
type: http
- role: demoUser
permission:
check:
team_id:
_eq: 32
set:
creator_id: x-hasura-user-id
columns:
- copied_from
- created_at
Expand All @@ -506,6 +510,8 @@
- role: platformAdmin
permission:
check: {}
set:
creator_id: x-hasura-user-id
columns:
- copied_from
- created_at
Expand All @@ -523,9 +529,9 @@
forward_client_headers: false
headers:
- name: authorization
value: "{{HASURA_PLANX_API_KEY}}"
value: '{{HASURA_PLANX_API_KEY}}'
timeout: 10
url: "{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html"
url: '{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html'
type: http
- role: teamEditor
permission:
Expand All @@ -537,6 +543,8 @@
_eq: x-hasura-user-id
- role:
_eq: teamEditor
set:
creator_id: x-hasura-user-id
columns:
- copied_from
- created_at
Expand All @@ -554,9 +562,9 @@
forward_client_headers: false
headers:
- name: authorization
value: "{{HASURA_PLANX_API_KEY}}"
value: '{{HASURA_PLANX_API_KEY}}'
timeout: 10
url: "{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html"
url: '{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html'
type: http
select_permissions:
- role: api
Expand Down Expand Up @@ -608,7 +616,7 @@
- 1
- 29
- 30
comment: "For the demo user, we want to ensure they can only see their own flows, and flows from the Open Digital Planning [id = 30], Open Systems Lab [id = 1], and Templates [id = 29] team "
comment: 'For the demo user, we want to ensure they can only see their own flows, and flows from the Open Digital Planning [id = 30], Open Systems Lab [id = 1], and Templates [id = 29] team '
- role: platformAdmin
permission:
columns:
Expand Down Expand Up @@ -689,9 +697,9 @@
forward_client_headers: false
headers:
- name: authorization
value: "{{HASURA_PLANX_API_KEY}}"
value: '{{HASURA_PLANX_API_KEY}}'
timeout: 10
url: "{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html"
url: '{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html'
type: http
- role: demoUser
permission:
Expand Down Expand Up @@ -731,9 +739,9 @@
forward_client_headers: false
headers:
- name: authorization
value: "{{HASURA_PLANX_API_KEY}}"
value: '{{HASURA_PLANX_API_KEY}}'
timeout: 10
url: "{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html"
url: '{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html'
type: http
- role: teamEditor
permission:
Expand All @@ -758,9 +766,9 @@
forward_client_headers: false
headers:
- name: authorization
value: "{{HASURA_PLANX_API_KEY}}"
value: '{{HASURA_PLANX_API_KEY}}'
timeout: 10
url: "{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html"
url: '{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html'
type: http
delete_permissions:
- role: demoUser
Expand Down Expand Up @@ -800,9 +808,9 @@
forward_client_headers: false
headers:
- name: authorization
value: "{{HASURA_PLANX_API_KEY}}"
value: '{{HASURA_PLANX_API_KEY}}'
timeout: 10
url: "{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html"
url: '{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html'
type: http
select_permissions:
- role: demoUser
Expand Down Expand Up @@ -840,9 +848,9 @@
forward_client_headers: false
headers:
- name: authorization
value: "{{HASURA_PLANX_API_KEY}}"
value: '{{HASURA_PLANX_API_KEY}}'
timeout: 10
url: "{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html"
url: '{{HASURA_PLANX_API_URL}}/webhooks/hasura/validate-input/jsonb/clean-html'
type: http
- table:
name: lowcal_sessions
Expand Down Expand Up @@ -989,7 +997,7 @@
method: POST
query_params: {}
template_engine: Kriti
url: "{{$base_url}}/send-email/confirmation"
url: '{{$base_url}}/send-email/confirmation'
version: 2
- name: setup_lowcal_expiry_events
definition:
Expand Down Expand Up @@ -1019,7 +1027,7 @@
method: POST
query_params: {}
template_engine: Kriti
url: "{{$base_url}}/webhooks/hasura/create-expiry-event"
url: '{{$base_url}}/webhooks/hasura/create-expiry-event'
version: 2
- name: setup_lowcal_reminder_events
definition:
Expand Down Expand Up @@ -1049,7 +1057,7 @@
method: POST
query_params: {}
template_engine: Kriti
url: "{{$base_url}}/webhooks/hasura/create-reminder-event"
url: '{{$base_url}}/webhooks/hasura/create-reminder-event'
version: 2
- table:
name: operations
Expand Down Expand Up @@ -1255,7 +1263,7 @@
definition:
enable_manual: false
insert:
columns: "*"
columns: '*'
retry_conf:
interval_sec: 10
num_retries: 3
Expand All @@ -1277,13 +1285,13 @@
method: POST
query_params: {}
template_engine: Kriti
url: "{{$base_url}}/webhooks/hasura/create-payment-expiry-events"
url: '{{$base_url}}/webhooks/hasura/create-payment-expiry-events'
version: 2
- name: setup_payment_invitation_events
definition:
enable_manual: false
insert:
columns: "*"
columns: '*'
retry_conf:
interval_sec: 10
num_retries: 3
Expand All @@ -1305,13 +1313,13 @@
method: POST
query_params: {}
template_engine: Kriti
url: "{{$base_url}}/webhooks/hasura/create-payment-invitation-events"
url: '{{$base_url}}/webhooks/hasura/create-payment-invitation-events'
version: 2
- name: setup_payment_reminder_events
definition:
enable_manual: false
insert:
columns: "*"
columns: '*'
retry_conf:
interval_sec: 10
num_retries: 3
Expand All @@ -1333,7 +1341,7 @@
method: POST
query_params: {}
template_engine: Kriti
url: "{{$base_url}}/webhooks/hasura/create-payment-reminder-events"
url: '{{$base_url}}/webhooks/hasura/create-payment-reminder-events'
version: 2
- name: setup_payment_send_events
definition:
Expand Down Expand Up @@ -1362,7 +1370,7 @@
method: POST
query_params: {}
template_engine: Kriti
url: "{{$base_url}}/webhooks/hasura/create-payment-send-events"
url: '{{$base_url}}/webhooks/hasura/create-payment-send-events'
version: 2
- table:
name: payment_status
Expand Down Expand Up @@ -1624,12 +1632,12 @@
definition:
enable_manual: false
insert:
columns: "*"
columns: '*'
retry_conf:
interval_sec: 30
num_retries: 1
timeout_sec: 60
webhook: "{{HASURA_PLANX_API_URL}}"
webhook: '{{HASURA_PLANX_API_URL}}'
headers:
- name: authorization
value_from_env: HASURA_PLANX_API_KEY
Expand All @@ -1638,7 +1646,7 @@
query_params:
type: s3-submission
template_engine: Kriti
url: "{{$base_url}}/webhooks/hasura/send-slack-notification"
url: '{{$base_url}}/webhooks/hasura/send-slack-notification'
version: 2
- table:
name: sessions
Expand Down Expand Up @@ -2313,7 +2321,7 @@
- 29
- 30
- 32
comment: "For the demo user, we want to ensure they can only see their own team [id = 32], and the teams: Open Digital Planning [id = 30], Open Systems Lab [id = 1], and Templates [id = 29] team "
comment: 'For the demo user, we want to ensure they can only see their own team [id = 32], and the teams: Open Digital Planning [id = 30], Open Systems Lab [id = 1], and Templates [id = 29] team '
- role: platformAdmin
permission:
columns:
Expand Down Expand Up @@ -2430,7 +2438,7 @@
definition:
enable_manual: false
insert:
columns: "*"
columns: '*'
retry_conf:
interval_sec: 30
num_retries: 1
Expand All @@ -2444,7 +2452,7 @@
query_params:
type: uniform-submission
template_engine: Kriti
url: "{{$base_url}}/webhooks/hasura/send-slack-notification"
url: '{{$base_url}}/webhooks/hasura/send-slack-notification'
version: 2
- table:
name: user_roles
Expand Down
Loading

0 comments on commit e11368f

Please sign in to comment.