Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement discord integration #369

Closed
wants to merge 59 commits into from

Conversation

hrutik7
Copy link
Contributor

@hrutik7 hrutik7 commented Nov 19, 2023

Description

Right now discord oauth integrated

Loom demo: https://www.loom.com/share/61c16fc032bd4f619c098a87ee62d0ca

Fixes #213

hrutik7 and others added 30 commits November 15, 2023 12:13
* prisma migration to add field mapping schemas

* seed hs note model (unverified)

* seed hs note model (verified)

* seed hs note model

* transform note acc to schema mapping

* (approach 2) transform note acc to schema field mapping

* (approach 2) seed all note fields and fix single note structure

* minor fix

* common func to transform field mapping to model

* disunify using field mapping

* allow connections to override field mapping

* support custom objects in schema; show custom fields as additional

* add winston and morgan logger

* Field mapping for contact; support custom field mapping to custom crm field

* add field mapping config

* common unify and disunify methods

* seed contact field mapping

* use lodash get to transform nested mappings

* unify and disunify for contact

* disunify based on account config

* unify and disunify for company

* unify and disunify for deal

* unify and disunify for event

* unify and disunify for lead

* unify and disunify for task

* unify and disunify for user

* minor refactor

* handle 2 level nesting and fix mapping

* make target field optional; multi level nesting

* fix

* fix

* fix obj merge

* fix pipedrive get format

* preprocess

* preprocess unify and disunify

* disunify postprocess

* flatten before disunify

* pipedrive fix contact create

* minor fixes

* fix pipedrive lead disunify

* chore: add account id to morgan logs

* chore: cleanup

* chore: cleanup

* chore: cleanup

* feat: ui for field mapping (revertinc#242)

* feat: processing ui

* feat: immplememt sse and redis pubsub

* feat: read sse data to render failed ui

* minor changes

* feat: api to fetch mappable details and crm object properties

* feat: api to create connection field mapping

* feat: add custom field mapped to connection schema

* feat: reallly basic ui for std field mapping

* feat: reallly basic ui for custom field mapping

* feat: add styling

* fix: fix add btn order

* feat: check for t_id in sse msg; send private token for calling further apis

* feat: save mappings on click

* feat: fix ui

* feat: show done screen

* feat: mark form dirty if empty fields

* feat: show done stage if config doesnt exist

* chore: fix pr comments

* chore: use temp tenant token for auth; ui fixes

* chore: fix dropdown caret; redis timeout

* chore: pubsub fix

* chore: cleanup

* chore: cleanup

* chore: resolve conflicts

* feat: add remove mapping btn and divider

* fix: fix logger

* chore: cleanup

* chore: move endpoints to fern

* update yarn.lock

* fix issues

* add hubspot create custom properties api

---------

Co-authored-by: jatin <sandilya.jatin@gmail.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.23 to 20.8.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(docs): update readme

* update heading

* move links

* nit fix
* add api analytics w/moesif

* feat: make api analytics work

* only run db migration when prisma folder changes
* removed install state for rebasing

* slack integration with refactored code

* removed cert.pem

* client side updated with respect to slack integration

* localhost https configs removed

* Refactored code worked successfully with hubspot

* Added PubSub for chat feature

* removed install-state to fix rebase

* make improvements & fixes post testing

* update header text

---------

Co-authored-by: Ashutosh Dhande <ashutosh.dhande001@gmail.com>
* prisma migration to add field mapping schemas

* seed hs note model (unverified)

* seed hs note model (verified)

* seed hs note model

* transform note acc to schema mapping

* (approach 2) transform note acc to schema field mapping

* (approach 2) seed all note fields and fix single note structure

* minor fix

* common func to transform field mapping to model

* disunify using field mapping

* allow connections to override field mapping

* support custom objects in schema; show custom fields as additional

* add winston and morgan logger

* Field mapping for contact; support custom field mapping to custom crm field

* add field mapping config

* common unify and disunify methods

* seed contact field mapping

* use lodash get to transform nested mappings

* unify and disunify for contact

* disunify based on account config

* unify and disunify for company

* unify and disunify for deal

* unify and disunify for event

* unify and disunify for lead

* unify and disunify for task

* unify and disunify for user

* minor refactor

* handle 2 level nesting and fix mapping

* make target field optional; multi level nesting

* fix

* fix

* fix obj merge

* fix pipedrive get format

* preprocess

* preprocess unify and disunify

* disunify postprocess

* flatten before disunify

* pipedrive fix contact create

* minor fixes

* fix pipedrive lead disunify

* chore: add account id to morgan logs

* chore: cleanup

* chore: cleanup

* chore: cleanup

* feat: ui for field mapping (revertinc#242)

* feat: processing ui

* feat: immplememt sse and redis pubsub

* feat: read sse data to render failed ui

* minor changes

* feat: api to fetch mappable details and crm object properties

* feat: api to create connection field mapping

* feat: add custom field mapped to connection schema

* feat: reallly basic ui for std field mapping

* feat: reallly basic ui for custom field mapping

* feat: add styling

* fix: fix add btn order

* feat: check for t_id in sse msg; send private token for calling further apis

* feat: save mappings on click

* feat: fix ui

* feat: show done screen

* feat: mark form dirty if empty fields

* feat: show done stage if config doesnt exist

* chore: fix pr comments

* chore: use temp tenant token for auth; ui fixes

* chore: fix dropdown caret; redis timeout

* chore: pubsub fix

* chore: cleanup

* chore: cleanup

* chore: resolve conflicts

* feat: add remove mapping btn and divider

* fix: fix logger

* chore: cleanup

* chore: move endpoints to fern

* update yarn.lock

* fix issues

* add hubspot create custom properties api

---------

Co-authored-by: jatin <sandilya.jatin@gmail.com>
dependabot bot and others added 10 commits November 15, 2023 17:16
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.23 to 20.8.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@sentry/react](https://github.com/getsentry/sentry-javascript) from 7.64.0 to 7.73.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@7.64.0...7.73.0)

---
updated-dependencies:
- dependency-name: "@sentry/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* add api analytics w/moesif

* feat: make api analytics work

* only run db migration when prisma folder changes
Copy link

vercel bot commented Nov 19, 2023

@hrutik7 is attempting to deploy a commit to the Revertdev Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

github-actions bot commented Nov 19, 2023

Thank you for following the naming conventions for pull request titles! 🙏

@hrutik7
Copy link
Contributor Author

hrutik7 commented Nov 20, 2023

@jatinsandilya This is ready for review
lemme know if there are some update in this

@jatinsandilya jatinsandilya changed the title Discordmain/integration feat: implement discord integration Nov 20, 2023
@jatinsandilya
Copy link
Contributor

@jatinsandilya This is ready for review lemme know if there are some update in this

@hrutik7 Thanks for the PR!

Could you add a loom video of the OAuth + APIs on the PR description as well?

Copy link

vercel bot commented Nov 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
revert-client ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2023 8:09am

@hrutik7
Copy link
Contributor Author

hrutik7 commented Nov 20, 2023

https://www.loom.com/share/61c16fc032bd4f619c098a87ee62d0ca
done !

.github/workflows/deploy-db-changes.yml Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
fern/definition/api.yml Outdated Show resolved Hide resolved
packages/backend/index.ts Outdated Show resolved Hide resolved
packages/backend/routes/index.ts Outdated Show resolved Hide resolved
packages/client/package.json Show resolved Hide resolved
packages/backend/tsconfig.json Outdated Show resolved Hide resolved
@@ -83,6 +83,15 @@ const metadataService = new MetadataService({
scopes: getScope(apps, TP_ID.slack),
clientId: getClientId(apps, TP_ID.slack) || config.SLACK_CLIENT_ID,
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO on @jatinsandilya: Provide alternative image path.

packages/backend/routes/v1/chat/auth.ts Outdated Show resolved Hide resolved
packages/backend/package.json Outdated Show resolved Hide resolved
@jatinsandilya
Copy link
Contributor

Closing this one as it's being covered in #381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discord Integration
3 participants