-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Uroš Marolt <[email protected]> Co-authored-by: garrrikkotua <[email protected]> Co-authored-by: Gašper Grom <[email protected]>
- Loading branch information
1 parent
afa3487
commit 76ccc3b
Showing
152 changed files
with
14,581 additions
and
1,863 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
.github/workflows/staging-deploy-integration-sync-worker.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Staging Deploy Integration Sync Worker | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'staging/**' | ||
- 'staging-**' | ||
paths: | ||
- 'services/libs/**' | ||
- 'services/apps/integration_sync_worker/**' | ||
|
||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
CROWD_CLUSTER: ${{ secrets.STAGING_CLUSTER_NAME }} | ||
CROWD_ROLE_ARN: ${{ secrets.STAGING_CLUSTER_ROLE_ARN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
SLACK_CHANNEL: deploys-staging | ||
SLACK_WEBHOOK: ${{ secrets.STAGING_SLACK_CHANNEL_HOOK }} | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
image: ${{ steps.image.outputs.IMAGE }} | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
|
||
- uses: ./.github/actions/build-docker-image | ||
id: image-builder | ||
with: | ||
image: integration-sync-worker | ||
|
||
- name: Set docker image output | ||
id: image | ||
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT | ||
|
||
deploy-integration-sync-worker: | ||
needs: build-and-push | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
|
||
- uses: ./.github/actions/deploy-service | ||
with: | ||
service: integration-sync-worker | ||
image: ${{ needs.build-and-push.outputs.image }} | ||
cluster: ${{ env.CROWD_CLUSTER }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Permissions from '../../../security/permissions' | ||
import IntegrationService from '../../../services/integrationService' | ||
import PermissionChecker from '../../../services/user/permissionChecker' | ||
|
||
export default async (req, res) => { | ||
new PermissionChecker(req).validateHas(Permissions.values.tenantEdit) | ||
const payload = await new IntegrationService(req).hubspotConnect() | ||
await req.responseHandler.success(req, res, payload) | ||
} |
9 changes: 9 additions & 0 deletions
9
backend/src/api/integration/helpers/hubspotGetMappableFields.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Permissions from '../../../security/permissions' | ||
import IntegrationService from '../../../services/integrationService' | ||
import PermissionChecker from '../../../services/user/permissionChecker' | ||
|
||
export default async (req, res) => { | ||
new PermissionChecker(req).validateHas(Permissions.values.tenantEdit) | ||
const payload = await new IntegrationService(req).hubspotGetMappableFields() | ||
await req.responseHandler.success(req, res, payload) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Permissions from '../../../security/permissions' | ||
import IntegrationService from '../../../services/integrationService' | ||
import PermissionChecker from '../../../services/user/permissionChecker' | ||
|
||
export default async (req, res) => { | ||
new PermissionChecker(req).validateHas(Permissions.values.tenantEdit) | ||
const payload = await new IntegrationService(req).hubspotOnboard(req.body) | ||
await req.responseHandler.success(req, res, payload) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Permissions from '../../../security/permissions' | ||
import IntegrationService from '../../../services/integrationService' | ||
import PermissionChecker from '../../../services/user/permissionChecker' | ||
|
||
export default async (req, res) => { | ||
new PermissionChecker(req).validateHas(Permissions.values.integrationEdit) | ||
const payload = await new IntegrationService(req).hubspotStopSyncMember(req.body) | ||
await req.responseHandler.success(req, res, payload) | ||
} |
9 changes: 9 additions & 0 deletions
9
backend/src/api/integration/helpers/hubspotStopSyncOrganization.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Permissions from '../../../security/permissions' | ||
import IntegrationService from '../../../services/integrationService' | ||
import PermissionChecker from '../../../services/user/permissionChecker' | ||
|
||
export default async (req, res) => { | ||
new PermissionChecker(req).validateHas(Permissions.values.integrationEdit) | ||
const payload = await new IntegrationService(req).hubspotStopSyncOrganization(req.body) | ||
await req.responseHandler.success(req, res, payload) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Permissions from '../../../security/permissions' | ||
import IntegrationService from '../../../services/integrationService' | ||
import PermissionChecker from '../../../services/user/permissionChecker' | ||
|
||
export default async (req, res) => { | ||
new PermissionChecker(req).validateHas(Permissions.values.integrationEdit) | ||
const payload = await new IntegrationService(req).hubspotSyncMember(req.body) | ||
await req.responseHandler.success(req, res, payload) | ||
} |
9 changes: 9 additions & 0 deletions
9
backend/src/api/integration/helpers/hubspotSyncOrganization.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Permissions from '../../../security/permissions' | ||
import IntegrationService from '../../../services/integrationService' | ||
import PermissionChecker from '../../../services/user/permissionChecker' | ||
|
||
export default async (req, res) => { | ||
new PermissionChecker(req).validateHas(Permissions.values.integrationEdit) | ||
const payload = await new IntegrationService(req).hubspotSyncOrganization(req.body) | ||
await req.responseHandler.success(req, res, payload) | ||
} |
9 changes: 9 additions & 0 deletions
9
backend/src/api/integration/helpers/hubspotUpdateProperties.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Permissions from '../../../security/permissions' | ||
import IntegrationService from '../../../services/integrationService' | ||
import PermissionChecker from '../../../services/user/permissionChecker' | ||
|
||
export default async (req, res) => { | ||
new PermissionChecker(req).validateHas(Permissions.values.tenantEdit) | ||
const payload = await new IntegrationService(req).hubspotUpdateProperties() | ||
await req.responseHandler.success(req, res, payload) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.