-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: added sync functionality (#144)
* Feat: added sync functionality * Fix: jira and gmail to latest approach * fix: server * fix: jira * Fix: server remove limit * fix: change id to key for jira * Fix: server shouldn't react if no temporal is used --------- Co-authored-by: Manoj K <saimanoj58@gmail.com>
- Loading branch information
1 parent
0aed519
commit 9ba7c11
Showing
150 changed files
with
8,116 additions
and
800 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
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
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
19 changes: 19 additions & 0 deletions
19
engine-server/prisma/migrations/20230724073043_added_logs_table/migration.sql
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,19 @@ | ||
-- CreateEnum | ||
CREATE TYPE "JobStatus" AS ENUM ('PENDING', 'RUNNING', 'FAILED', 'SUCCEEDED'); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Job" ( | ||
"jobId" TEXT NOT NULL, | ||
"temporalId" TEXT NOT NULL, | ||
"integrationAccountId" TEXT NOT NULL, | ||
"status" "JobStatus" NOT NULL, | ||
"recordsSynced" INTEGER NOT NULL, | ||
"logs" TEXT NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "Job_pkey" PRIMARY KEY ("jobId") | ||
); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Job" ADD CONSTRAINT "Job_integrationAccountId_fkey" FOREIGN KEY ("integrationAccountId") REFERENCES "IntegrationAccount"("integrationAccountId") ON DELETE RESTRICT ON UPDATE CASCADE; |
3 changes: 3 additions & 0 deletions
3
engine-server/prisma/migrations/20230724073942_make_logs_optional/migration.sql
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,3 @@ | ||
-- AlterTable | ||
ALTER TABLE "Job" ALTER COLUMN "recordsSynced" DROP NOT NULL, | ||
ALTER COLUMN "logs" DROP NOT NULL; |
2 changes: 2 additions & 0 deletions
2
engine-server/prisma/migrations/20230724174858_add_failed_message/migration.sql
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,2 @@ | ||
-- AlterTable | ||
ALTER TABLE "Job" ADD COLUMN "failedMessage" TEXT; |
3 changes: 3 additions & 0 deletions
3
engine-server/prisma/migrations/20230725055339_add_sync_params/migration.sql
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,3 @@ | ||
-- AlterTable | ||
ALTER TABLE "IntegrationAccount" ADD COLUMN "syncEnabled" BOOLEAN NOT NULL DEFAULT false, | ||
ADD COLUMN "syncPeriod" TEXT; |
2 changes: 2 additions & 0 deletions
2
engine-server/prisma/migrations/20230725204826_remove_foriegn_check_in_jobs/migration.sql
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,2 @@ | ||
-- DropForeignKey | ||
ALTER TABLE "Job" DROP CONSTRAINT "Job_integrationAccountId_fkey"; |
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
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 @@ | ||
export * from './job'; |
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,18 @@ | ||
export enum JobStatus { | ||
PENDING = 'PENDING', | ||
RUNNING = 'RUNNING', | ||
FAILED = 'FAILED', | ||
SUCCEEDED = 'SUCCEEDED', | ||
} | ||
|
||
export interface Job { | ||
jobId: string; | ||
temporalId: string; | ||
integrationAccountId: string; | ||
status: JobStatus; | ||
failedMessage: string | null; | ||
recordsSynced: number | null; | ||
logs: string | null; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
} |
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.