Skip to content

Commit

Permalink
release: develop changes to main (#61)
Browse files Browse the repository at this point in the history
* fix: allow empty email in registration input (#59)

* feat: autolink covers for sladers who receive an SMS from EDI (#44)

* feat: isc endpoint to check for permission (#60)

- feat: retrive users with a role, get role by name
- chore: remove unused role usecases

* test: fix tests for getting navigation actions usecase (#53)

* chore: filter roles using filter input struct (#57)

* fix: ensure that returned navigation actions are in the order required (#58)

* chore: update email templates (#62)

Co-authored-by: Willard Shikami <shikami@savannahinformatics.com>

* ref: ordering navigation actions using priority (#68)

- chore: add employee navigation actions

* fix: change role filter to search role by role name (#67)

* chore: update registered user welcome message (#70)

fix: return empty list for missing role in role search

* feat: add permission scopes in login response (#69)

* feat: layout community onboarding service deployment (#72)

* feat: layout community onboarding service deployment

[ ] Build and push docker image to GCR
[ ] Deploy the revision to Cloud Run via CI
[ ] Make this workflow stage depend on CI test and lint workflow

Signed-off-by: Otieno Calvine <nyarangaotieno@gmail.com>

* feat: for lint and test workflow to complete and succeed before running deployment workflow

Signed-off-by: Otieno Calvine <nyarangaotieno@gmail.com>

* configure enviroment and job concurrency group

Signed-off-by: Otieno Calvine <nyarangaotieno@gmail.com>

* fix: flagged feature disabled on token refresh (#75)

* refactor purge user (#77)

* feat: add service deployment job (#74)

[ ] Deploy test server to Google Cloud Run
[ ] Supply secrets via Google Secret Manager

Signed-off-by: Otieno Calvine <nyarangaotieno@gmail.com>

Co-authored-by: Charles Muchogo <48381664+Muchogoc@users.noreply.github.com>
Co-authored-by: Salaton <nairouasalaton@gmail.com>
Co-authored-by: Richard Ochom <ochomrichard752@gmail.com>
Co-authored-by: Shikami <46521311+willshikami@users.noreply.github.com>
Co-authored-by: Willard Shikami <shikami@savannahinformatics.com>
Co-authored-by: Kennedy Kori <kennedykori47@gmail.com>
Co-authored-by: Kathurima Kimathi <41376826+KathurimaKimathi@users.noreply.github.com>
  • Loading branch information
8 people committed Aug 18, 2021
1 parent 42ab045 commit 0785477
Show file tree
Hide file tree
Showing 41 changed files with 4,126 additions and 1,959 deletions.
110 changes: 110 additions & 0 deletions .github/workflows/deployment.yaml
@@ -0,0 +1,110 @@
name: Deployment

on: [push]

concurrency:
group: build_and_push_image

jobs:
build_and_push_image:
runs-on: ubuntu-latest
environment:
name: test # run this only in test environment for now
steps:
- uses: actions/checkout@v2

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@master
with:
service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
project_id: ${{ secrets.GOOGLE_CLOUD_PROJECT }}
export_default_credentials: true

# Build docker image
- name: Build
run: |-
docker build -t eu.gcr.io/${{ secrets.GOOGLE_CLOUD_PROJECT }}/${{ secrets.GCR_NAME }}:$GITHUB_SHA --build-arg=ACCESS_TOKEN=${{ secrets.ACCESS_TOKEN }} .
# Configure docker to use the gcloud command-line tool as a credential helper
- run: |
gcloud auth configure-docker -q
# Push image to Google Container Registry
- name: Push
run: |-
docker push eu.gcr.io/${{ secrets.GOOGLE_CLOUD_PROJECT }}/${{ secrets.GCR_NAME }}:$GITHUB_SHA
deploy_to_test:
name: Deploy Test Server to Google Cloud Run
runs-on: ubuntu-latest
environment:
name: test
needs: [build_and_push_image]
steps:
- name: Checkout working branches
uses: actions/checkout@v2

# Deploy to Google Cloud Run Serverless
- name: Get GCP project credential
uses: google-github-actions/setup-gcloud@master
with:
service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
project_id: ${{ secrets.GOOGLE_CLOUD_PROJECT }}
export_default_credentials: true

# Deploy to Google Cloud Run Serverless
- name: Deploy to Google Cloud Run
run: |
gcloud components install beta --quiet
gcloud beta run deploy ${{ secrets.SERVICE_NAME }} --image eu.gcr.io/${{ secrets.GOOGLE_CLOUD_PROJECT }}/${{ secrets.GCR_NAME }}:$GITHUB_SHA \
--region europe-west1 \
--platform managed \
--allow-unauthenticated \
--min-instances=${{ secrets.MIN_INST }} \
--max-instances=${{ secrets.MAX_INST }} \
--memory=${{ secrets.MEMORY_LIMIT}} \
--cpu=${{ secrets.CPU }} \
--set-env-vars "GOOGLE_CLOUD_PROJECT=${{ secrets.GOOGLE_CLOUD_PROJECT }}" \
--set-env-vars "FIREBASE_WEB_API_KEY=${{ secrets.FIREBASE_WEB_API_KEY }}" \
--set-env-vars "JWT_KEY=${{ secrets.JWT_KEY }}" \
--set-env-vars "ENVIRONMENT=${{ secrets.ENVIRONMENT }}" \
--set-env-vars "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" \
--set-env-vars "ROOT_COLLECTION_SUFFIX="${{ secrets.ROOT_COLLECTION_SUFFIX }}" \
--set-env-vars "ERP_HOST=${{ secrets.ERP_HOST }}" \
--set-env-vars "ERP_API_SCHEME=${{ secrets.ERP_API_SCHEME }}" \
--set-env-vars "ERP_TOKEN_URL=${{ secrets.ERP_TOKEN_URL }}" \
--set-env-vars "ERP_CLIENT_ID=${{ secrets.ERP_CLIENT_ID }}" \
--set-env-vars "ERP_CLIENT_SECRET=${{ secrets.ERP_CLIENT_SECRET }}" \
--set-env-vars "ERP_USERNAME=${{ secrets.ERP_USERNAME }}" \
--set-env-vars "ERP_PASSWORD=${{ secrets.ERP_PASSWORD }}" \
--set-env-vars "ERP_GRANT_TYPE=${{ secrets.ERP_GRANT_TYPE }}" \
--set-env-vars "ERP_DEFAULT_WORKSTATION_ID=${{ secrets.ERP_DEFAULT_WORKSTATION_ID }}" \
--set-env-vars "ERP_DEFAULT_CURRENCY=${{ secrets.ERP_DEFAULT_CURRENCY }}" \
--set-env-vars "CHARGE_MASTER_API_HOST=${{ secrets.CHARGE_MASTER_API_HOST }}" \
--set-env-vars "CHARGE_MASTER_API_SCHEME=${{ secrets.CHARGE_MASTER_API_SCHEME }}" \
--set-env-vars "CHARGE_MASTER_TOKEN_URL=${{ secrets.CHARGE_MASTER_TOKEN_URL }}" \
--set-env-vars "CHARGE_MASTER_CLIENT_ID=${{ secrets.CHARGE_MASTER_CLIENT_ID }}" \
--set-env-vars "CHARGE_MASTER_CLIENT_SECRET=${{ secrets.CHARGE_MASTER_CLIENT_SECRET }}" \
--set-env-vars "CHARGE_MASTER_USERNAME=${{ secrets.CHARGE_MASTER_USERNAME }}" \
--set-env-vars "CHARGE_MASTER_PASSWORD=${{ secrets.CHARGE_MASTER_PASSWORD }}" \
--set-env-vars "CHARGE_MASTER_GRANT_TYPE=${{ secrets.CHARGE_MASTER_GRANT_TYPE }}" \
--set-env-vars "CLIENT_ID=${{ secrets.CLIENT_ID }}" \
--set-env-vars "CLIENT_SECRET=${{ secrets.CLIENT_SECRET }}" \
--set-env-vars "TOKEN_URL=${{ secrets.TOKEN_URL }}" \
--set-env-vars "HOST=${{ secrets.HOST }}" \
--set-env-vars "API_SCHEME=${{ secrets.API_SCHEME }}" \
--set-env-vars "GRANT_TYPE=${{ secrets.GRANT_TYPE }}" \
--set-env-vars "CORE_CLIENT_ID=${{ secrets.CORE_CLIENT_ID }}" \
--set-env-vars "CORE_CLIENT_SECRET=${{ secrets.CORE_CLIENT_SECRET }}" \
--set-env-vars "CORE_USERNAME=${{ secrets.CORE_USERNAME }}" \
--set-env-vars "CORE_PASSWORD=${{ secrets.CORE_PASSWORD }}" \
--set-env-vars "CORE_GRANT_TYPE=${{ secrets.CORE_GRANT_TYPE }}" \
--set-env-vars "CORE_API_SCHEME=${{ secrets.CORE_API_SCHEME }}" \
--set-env-vars "CORE_TOKEN_URL=${{ secrets.CORE_TOKEN_URL }}" \
--set-env-vars "CORE_HOST=${{ secrets.CORE_HOST }}" \
--set-env-vars "REPOSITORY=${{ secrets.REPOSITORY }}" \
--set-env-vars "SERVICE_HOST=${{ secrets.SERVICE_HOST }}" \
--set-env-vars "GOOGLE_PROJECT_NUMBER=${{ secrets.GOOGLE_PROJECT_NUMBER }}" \
--set-env-vars "SAVANNAH_ADMIN_EMAIL=${{ secrets.SAVANNAH_ADMIN_EMAIL }}" \
--set-env-vars "HUBSPOT_API_KEY=${{ secrets.HUBSPOT_API_KEY }}" \
--set-env-vars "HUBSPOT_API_URL=${{ secrets.HUBSPOT_API_URL }}" \
--set-env-vars "JAEGER_URL=${{ secrets.JAEGER_URL }}"
12 changes: 6 additions & 6 deletions go.mod
Expand Up @@ -20,15 +20,15 @@ require (
github.com/imroc/req v0.3.0
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/savannahghi/converterandformatter v0.0.9
github.com/savannahghi/enumutils v0.0.2
github.com/savannahghi/enumutils v0.0.3
github.com/savannahghi/errorcodeutil v0.0.1
github.com/savannahghi/feedlib v0.0.1
github.com/savannahghi/firebasetools v0.0.13
github.com/savannahghi/feedlib v0.0.4
github.com/savannahghi/firebasetools v0.0.15
github.com/savannahghi/interserviceclient v0.0.13
github.com/savannahghi/profileutils v0.0.15
github.com/savannahghi/profileutils v0.0.17
github.com/savannahghi/pubsubtools v0.0.2
github.com/savannahghi/scalarutils v0.0.2
github.com/savannahghi/serverutils v0.0.3
github.com/savannahghi/scalarutils v0.0.4
github.com/savannahghi/serverutils v0.0.4
github.com/segmentio/ksuid v1.0.4
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.0
Expand Down
28 changes: 12 additions & 16 deletions go.sum
Expand Up @@ -118,10 +118,8 @@ github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcju
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -365,45 +363,45 @@ github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/rs/xid v1.3.0 h1:6NjYksEUlhurdVehpc7S7dk6DAmcKv8V9gG0FsVN2U4=
github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/savannahghi/converterandformatter v0.0.3/go.mod h1:0o7yieYU10WabPqKuqj+5QL52eTL1eGElxjb+A68bbA=
github.com/savannahghi/converterandformatter v0.0.7/go.mod h1:DNqyfHojHOrll1/l6Y9UUSl97/TBiB08zcRWjaXbXRM=
github.com/savannahghi/converterandformatter v0.0.9 h1:Wi9D1Vt7NHFVeRjrSU05uBbvikUwbuQlv8iiQHZUCRI=
github.com/savannahghi/converterandformatter v0.0.9/go.mod h1:DNqyfHojHOrll1/l6Y9UUSl97/TBiB08zcRWjaXbXRM=
github.com/savannahghi/enumutils v0.0.0-20210622094023-d347744e1825/go.mod h1:DDdjQBO1qyf5BxLzhTs1uN91drCIHH2Lvr8aLdJwu/o=
github.com/savannahghi/enumutils v0.0.2 h1:BwAIewTo73IIeF4Fw7/rL/mspgRVMPno49jTAgetAKk=
github.com/savannahghi/enumutils v0.0.2/go.mod h1:DDdjQBO1qyf5BxLzhTs1uN91drCIHH2Lvr8aLdJwu/o=
github.com/savannahghi/enumutils v0.0.3 h1:0IPGS/Q27B8mZw+0YOb1r7Au1MgJQldfuwYid3byUx0=
github.com/savannahghi/enumutils v0.0.3/go.mod h1:DDdjQBO1qyf5BxLzhTs1uN91drCIHH2Lvr8aLdJwu/o=
github.com/savannahghi/errorcodeutil v0.0.0-20210715070815-98283e9f49c6/go.mod h1:BthIcPLuJe9K5eE97/qrcfkS+3azS91UFerowDIq/eE=
github.com/savannahghi/errorcodeutil v0.0.1 h1:q5JYMrzXDAJ9/99fV7Mj2bFF1XOidlRgSlYHy73q2GA=
github.com/savannahghi/errorcodeutil v0.0.1/go.mod h1:nNBaBjatvoRusnDr2aRoNr4Rpmz9Z779mjcL0tr/IXk=
github.com/savannahghi/feedlib v0.0.0-20210628122532-ef88e353d4d6/go.mod h1:P6YHmWsa/TK/qTb2U1ryjuASotTQmbarArB0LYLjMo4=
github.com/savannahghi/feedlib v0.0.1 h1:BixXDyfj1Kj+f8AOwd32A/xXr5CZxrOqLitp09xDQcg=
github.com/savannahghi/feedlib v0.0.1/go.mod h1:P6YHmWsa/TK/qTb2U1ryjuASotTQmbarArB0LYLjMo4=
github.com/savannahghi/feedlib v0.0.4 h1:CF3vOKMOkMCSNqX+q0Ypa/6LUtiMU6QGX8Kkf82RH0A=
github.com/savannahghi/feedlib v0.0.4/go.mod h1:PzEP7gw4w1Xuw36uIRr1H2ffd+kozWHyJCuGWO06AtQ=
github.com/savannahghi/firebasetools v0.0.5/go.mod h1:obAxyBfPaGTx/g86LF19gSmmEh5x+Tbnziatk514mUQ=
github.com/savannahghi/firebasetools v0.0.6/go.mod h1:obAxyBfPaGTx/g86LF19gSmmEh5x+Tbnziatk514mUQ=
github.com/savannahghi/firebasetools v0.0.13 h1:2eBFwzsnmhRUzxfgQZxOjedlMuyef2dz4tvpw59pJkE=
github.com/savannahghi/firebasetools v0.0.13/go.mod h1:0xgpolbK6P2GzUveYSeF9DcMTkJvF8pIWLes1LLtTEE=
github.com/savannahghi/firebasetools v0.0.15 h1:/i/VyddxLmBO1Fn4W1rcj6nKUut2x+mgX4BOU0ogiPY=
github.com/savannahghi/firebasetools v0.0.15/go.mod h1:2Qhj483I+CiKzObf+T3cKhf1YYsEQWz8e+KPE+6LyBk=
github.com/savannahghi/interserviceclient v0.0.3/go.mod h1:GWTJkKfsXzTPNDkZ5U07pBZr6avQF5SndW36f1Hew7k=
github.com/savannahghi/interserviceclient v0.0.13 h1:hKUrWkUQW7mNZLp/wxJNnzORDpNjuQ8wzstI25F6mLQ=
github.com/savannahghi/interserviceclient v0.0.13/go.mod h1:aGGEc+40bBVHVDs1k0CzK5uPb5080vv4fb25T/cuXQk=
github.com/savannahghi/profileutils v0.0.6/go.mod h1:Ct0sjzOW9zjDN58ynT5GTV6M2hHMY3nsFDV08I6gpO4=
github.com/savannahghi/profileutils v0.0.7/go.mod h1:Ct0sjzOW9zjDN58ynT5GTV6M2hHMY3nsFDV08I6gpO4=
github.com/savannahghi/profileutils v0.0.15 h1:H05wdnrKzPm5RyaLvSMDI18JJU0hOF/QfNcCUBtsirc=
github.com/savannahghi/profileutils v0.0.15/go.mod h1:Ct0sjzOW9zjDN58ynT5GTV6M2hHMY3nsFDV08I6gpO4=
github.com/savannahghi/profileutils v0.0.17 h1:Zgk3n+ZtgQjI8vLTde4/c2U/t/Zh+q9jXZqVRL5ptRg=
github.com/savannahghi/profileutils v0.0.17/go.mod h1:Sq/2fK2iVntGqwC0EFe5SED0+AkdOrxp7gra9KmWPQQ=
github.com/savannahghi/pubsubtools v0.0.2 h1:5JqgynuuzduYu57y8TM0bU8unZD/7ob36sZ9BKPmt9o=
github.com/savannahghi/pubsubtools v0.0.2/go.mod h1:FQ+BxO4uA1ZkcziY4dR0uT9CKHVHb+4L1lUURBV2UD0=
github.com/savannahghi/scalarutils v0.0.0-20210622091443-bad5089abdad/go.mod h1:Z+Dl3wc3vy5zKvthctHAtYzol1p8w27zEVRfOYueoks=
github.com/savannahghi/scalarutils v0.0.2 h1:naX6Zhv/tDbwKAKVY4bksyhnE43f2583xWesAKHb1CU=
github.com/savannahghi/scalarutils v0.0.2/go.mod h1:Z+Dl3wc3vy5zKvthctHAtYzol1p8w27zEVRfOYueoks=
github.com/savannahghi/server_utils v0.0.1 h1:q6SL4BRvkpYJujXvWwCl4vU1U+VTzKRGfNXnl0H6tfw=
github.com/savannahghi/scalarutils v0.0.4 h1:UT0a5zl1ByzV4+W7hYjGlIyLmILmpJV/Wgc39sGVc6U=
github.com/savannahghi/scalarutils v0.0.4/go.mod h1:Z+Dl3wc3vy5zKvthctHAtYzol1p8w27zEVRfOYueoks=
github.com/savannahghi/server_utils v0.0.1/go.mod h1:Tldm4Op4ARxk8xaP3BA0V52XVZEJenkq0ck4FCdEp+I=
github.com/savannahghi/serverutils v0.0.2/go.mod h1:sLX0El0i0DKN/9cUkB8xqm5cVMP79qCZvK60EzB7Pa4=
github.com/savannahghi/serverutils v0.0.3 h1:1gX/zD6tt4tAEpcQFyzXBUp70BvUiqmJpjADqjdvFwI=
github.com/savannahghi/serverutils v0.0.3/go.mod h1:3VCEJ8BTHf/DW3WFjLqV4SznzrXaul/As2RJ5eNOO7U=
github.com/savannahghi/serverutils v0.0.4 h1:mQGAwhNgS1NPSBXqCeyywuGQFnvRxiOmHJEHPgzhWQE=
github.com/savannahghi/serverutils v0.0.4/go.mod h1:3VCEJ8BTHf/DW3WFjLqV4SznzrXaul/As2RJ5eNOO7U=
github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g=
github.com/segmentio/ksuid v1.0.3/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE=
github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c=
Expand All @@ -414,7 +412,6 @@ github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
Expand Down Expand Up @@ -448,7 +445,6 @@ github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGr
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k=
github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
Expand Down
48 changes: 29 additions & 19 deletions pkg/onboarding/application/common/common.go
Expand Up @@ -11,15 +11,16 @@ const (
// StaticBase is the default path at which static assets are hosted
StaticBase = "https://assets.healthcloud.co.ke"

RoleNavActionURL = StaticBase + "/actions/roles_navaction.png"
AgentNavActionURL = StaticBase + "/actions/agent_navaction.png"
ConsumerNavActionURL = StaticBase + "/actions/consumer_navaction.png"
HelpNavActionURL = StaticBase + "/actions/help_navaction.png"
HomeNavActionURL = StaticBase + "/actions/home_navaction.png"
KYCNavActionURL = StaticBase + "/actions/kyc_navaction.png"
PartnerNavActionURL = StaticBase + "/actions/partner_navaction.png"
PatientNavActionURL = StaticBase + "/actions/patient_navaction.png"
RequestNavActionURL = StaticBase + "/actions/request_navaction.png"
RoleNavActionIcon = StaticBase + "/actions/roles_navaction.png"
AgentNavActionIcon = StaticBase + "/actions/agent_navaction.png"
EmployeeNavActionIcon = StaticBase + "/actions/employee_navaction.png"
ConsumerNavActionIcon = StaticBase + "/actions/consumer_navaction.png"
HelpNavActionIcon = StaticBase + "/actions/help_navaction.png"
HomeNavActionIcon = StaticBase + "/actions/home_navaction.png"
KYCNavActionIcon = StaticBase + "/actions/kyc_navaction.png"
PartnerNavActionIcon = StaticBase + "/actions/partner_navaction.png"
PatientNavActionIcon = StaticBase + "/actions/patient_navaction.png"
RequestNavActionIcon = StaticBase + "/actions/request_navaction.png"
)

// On Tap Routes
Expand All @@ -37,6 +38,9 @@ const (

AgentRegistrationRoute = "/agentRegistration"
AgentIdentificationRoute = "/agentIdentification"

EmployeeRegistrationRoute = "/employeeRegistration"
EmployeeIdentificationRoute = "/employeeIdentification"
)

// Navigation actions
Expand All @@ -51,26 +55,28 @@ const (
RoleViewActionTitle = "View Roles"
RoleCreationActionTitle = "Create Role"

PatientNavActionTitle = "Patient"
PatientNavActionTitle = "Patients"
PatientNavActionDescription = "Patient Navigation action"
PatientRegistrationActionTitle = "Patient Registration"
PatientIdentificationActionTitle = "Patient Identification"
PatientRegistrationActionTitle = "Register Patient"
PatientIdentificationActionTitle = "Search Patient"

RequestsNavActionTitle = "Requests"
RequestsNavActionDescription = "Requests Navigation action"

AgentNavActionTitle = "Agent"
AgentNavActionTitle = "Agents"
AgentNavActionDescription = "Agent Navigation action"
AgentRegistrationActionTitle = "Agent Registration"
AgentIdentificationActionTitle = "Agent Identification"
AgentRegistrationActionTitle = "Register Agent"
AgentIdentificationActionTitle = "View Agents"

AgentRegistrationTitle = "Agent Registration"
AgentIdentificationTitle = "Agent Identification"
EmployeeNavActionTitle = "Employees"
EmployeeNavActionDescription = "Employee Navigation action"
EmployeeRegistrationActionTitle = "Register Employee"
EmployeeIdentificationActionTitle = "View Employees"

ConsumerNavActionTitle = "Consumer"
ConsumerNavActionTitle = "Consumers"
ConsumerNavActionDescription = "Consumer Navigation action"

PartnerNavActionTitle = "Partner"
PartnerNavActionTitle = "Partners"
PartnerNavActionDescription = "Partner Navigation action"
)

Expand All @@ -90,4 +96,8 @@ const (

// LinkCoverTopic is the topicID for cover linking topic
LinkCoverTopic = "covers.link"

// LinkEDIMemberCoverTopic is the topic ID for cover linking topic of an EDI member who has
// received a message with the link to download bewell
LinkEDIMemberCoverTopic = "edi.covers.link"
)
15 changes: 15 additions & 0 deletions pkg/onboarding/application/dto/input.go
Expand Up @@ -432,3 +432,18 @@ type ProfileSuspensionInput struct {
ID string `json:"id,omitempty"`
Reason string `json:"reason,omitempty"`
}

// EDICoverLinkingPubSubMessage holds the data required to add a cover to the profile
// of EDI members who received a message with the bewell link an went ahead to
// download the app
type EDICoverLinkingPubSubMessage struct {
PayerSladeCode int `json:"payersladecode"`
MemberNumber string `json:"membernumber"`
PhoneNumber string `json:"phonenumber"`
}

// CheckPermissionPayload is the payload used when checking if a user is authorized
type CheckPermissionPayload struct {
UID *string `json:"uid"`
Permission *profileutils.Permission `json:"permission"`
}

0 comments on commit 0785477

Please sign in to comment.