From d7acbd51ed68b57c37e12e5c0746896b782d5d6a Mon Sep 17 00:00:00 2001 From: Safwan Shaheer Date: Wed, 3 Sep 2025 05:36:27 -0600 Subject: [PATCH 1/4] blacklisted partner rewards scout developers --- .../migration.sql | 14 ++++++ src/prisma/schema.prisma | 49 ++++++++++++------- 2 files changed, 44 insertions(+), 19 deletions(-) create mode 100644 src/prisma/migrations/20250903113117_blacklisted_scout_partner_developers/migration.sql diff --git a/src/prisma/migrations/20250903113117_blacklisted_scout_partner_developers/migration.sql b/src/prisma/migrations/20250903113117_blacklisted_scout_partner_developers/migration.sql new file mode 100644 index 00000000..03b3fa42 --- /dev/null +++ b/src/prisma/migrations/20250903113117_blacklisted_scout_partner_developers/migration.sql @@ -0,0 +1,14 @@ +-- CreateTable +CREATE TABLE "BlacklistedScoutPartnerDeveloper" ( + "scoutPartnerId" TEXT NOT NULL, + "scoutId" UUID NOT NULL +); + +-- CreateIndex +CREATE UNIQUE INDEX "BlacklistedScoutPartnerDeveloper_scoutPartnerId_scoutId_key" ON "BlacklistedScoutPartnerDeveloper"("scoutPartnerId", "scoutId"); + +-- AddForeignKey +ALTER TABLE "BlacklistedScoutPartnerDeveloper" ADD CONSTRAINT "BlacklistedScoutPartnerDeveloper_scoutPartnerId_fkey" FOREIGN KEY ("scoutPartnerId") REFERENCES "ScoutPartner"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "BlacklistedScoutPartnerDeveloper" ADD CONSTRAINT "BlacklistedScoutPartnerDeveloper_scoutId_fkey" FOREIGN KEY ("scoutId") REFERENCES "Scout"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/src/prisma/schema.prisma b/src/prisma/schema.prisma index a39e5dcd..144c86b0 100644 --- a/src/prisma/schema.prisma +++ b/src/prisma/schema.prisma @@ -2984,38 +2984,38 @@ enum BuilderStatus { } model Scout { - createdAt DateTime @default(now()) + createdAt DateTime @default(now()) deletedAt DateTime? - id String @id @default(uuid()) @db.Uuid + id String @id @default(uuid()) @db.Uuid email String? - path String @unique + path String @unique displayName String - farcasterId Int? @unique + farcasterId Int? @unique farcasterName String? // every user only has one farcaster account - telegramId BigInt? @unique + telegramId BigInt? @unique telegramName String? walletENS String? avatar String? bio String? builderStatus BuilderStatus? reappliedAt DateTime? - sendMarketing Boolean @default(false) - sendTransactionEmails Boolean @default(true) + sendMarketing Boolean @default(false) + sendTransactionEmails Boolean @default(true) agreedToTermsAt DateTime? onboardedAt DateTime? - currentBalance Int? @default(0) - currentBalanceDevToken String? @default("0") - hasMoxieProfile Boolean @default(false) + currentBalance Int? @default(0) + currentBalanceDevToken String? @default("0") + hasMoxieProfile Boolean @default(false) utmCampaign String? framesNotificationToken String? - sendFarcasterNotification Boolean @default(true) + sendFarcasterNotification Boolean @default(true) wallets ScoutWallet[] strikes BuilderStrike[] events BuilderEvent[] githubUsers GithubUser[] gemsPayoutEvents GemsPayoutEvent[] - pointsReceived PointsReceipt[] @relation("pointsReceiptRecipient") - pointsSent PointsReceipt[] @relation("pointsReceiptSender") + pointsReceived PointsReceipt[] @relation("pointsReceiptRecipient") + pointsSent PointsReceipt[] @relation("pointsReceiptSender") userWeeklyStats UserWeeklyStats[] userSeasonStats UserSeasonStats[] userAllTimeStats UserAllTimeStats[] @@ -3028,11 +3028,11 @@ model Scout { socialQuests ScoutSocialQuest[] dailyClaimEvents ScoutDailyClaimEvent[] dailyClaimStreakEvents ScoutDailyClaimStreakEvent[] - referralCode String @unique + referralCode String @unique referralCodeEvents ReferralCodeEvent[] talentProfile TalentProfile? - mergedFromEvents ScoutMergeEvent[] @relation("mergedFromScout") - mergedToEvents ScoutMergeEvent[] @relation("mergedToScout") + mergedFromEvents ScoutMergeEvent[] @relation("mergedFromScout") + mergedToEvents ScoutMergeEvent[] @relation("mergedToScout") partnerRewardEvents PartnerRewardEvent[] emailVerifications ScoutEmailVerification[] builderStatusEvents BuilderStatusEvent[] @@ -3042,6 +3042,7 @@ model Scout { matchups ScoutMatchup[] scoutAppNotifications ScoutAppNotification[] draftSeasonOffersReceived DraftSeasonOffer[] + blacklistedScoutPartners BlacklistedScoutPartnerDeveloper[] @@index([path]) @@index([farcasterId]) @@ -3195,6 +3196,15 @@ model GithubRepo { @@index([scoutPartnerId]) } +model BlacklistedScoutPartnerDeveloper { + scoutPartnerId String + scoutPartner ScoutPartner @relation(fields: [scoutPartnerId], references: [id], onDelete: Cascade) + scoutId String @db.Uuid + scout Scout @relation(fields: [scoutId], references: [id], onDelete: Cascade) + + @@unique([scoutPartnerId, scoutId]) +} + enum GithubEventType { merged_pull_request closed_pull_request @@ -4205,21 +4215,22 @@ enum ScoutPartnerStatus { } model ScoutPartner { - id String @id + id String @id icon String bannerImage String infoPageImage String name String - status ScoutPartnerStatus @default(active) + status ScoutPartnerStatus @default(active) tokenAmountPerPullRequest Int? tokenAddress String? tokenChain Int? tokenSymbol String? tokenDecimals Int? tokenImage String? - issueTagTokenAmounts Json? @default("{}") // Stores mapping of issue tags to token amounts + issueTagTokenAmounts Json? @default("{}") // Stores mapping of issue tags to token amounts builderEvents BuilderEvent[] repos GithubRepo[] payoutContracts PartnerRewardPayoutContract[] rewardEvents PartnerRewardEvent[] + blacklistedDevelopers BlacklistedScoutPartnerDeveloper[] } From 45983fbe8c53b6c52e94f7870080add0052d0aab Mon Sep 17 00:00:00 2001 From: Automated Version Bump Date: Wed, 3 Sep 2025 11:38:43 +0000 Subject: [PATCH 2/4] ci: version bump to 0.126.6-rc-feat-github-rep.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c8f76b1f..e0af12dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@charmverse/core", - "version": "0.126.5", + "version": "0.126.6-rc-feat-github-rep.0", "description": "Core API for Charmverse", "type": "commonjs", "types": "./dist/cjs/index.d.ts", From ad023c9de6f4a935095242ed4ee40a7ffd3d058b Mon Sep 17 00:00:00 2001 From: Safwan Shaheer Date: Wed, 3 Sep 2025 05:43:57 -0600 Subject: [PATCH 3/4] developer id rather than scout id --- .../migration.sql | 6 +++--- src/prisma/schema.prisma | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) rename src/prisma/migrations/{20250903113117_blacklisted_scout_partner_developers => 20250903114321_scout_partner_blacklisted_developer_id}/migration.sql (65%) diff --git a/src/prisma/migrations/20250903113117_blacklisted_scout_partner_developers/migration.sql b/src/prisma/migrations/20250903114321_scout_partner_blacklisted_developer_id/migration.sql similarity index 65% rename from src/prisma/migrations/20250903113117_blacklisted_scout_partner_developers/migration.sql rename to src/prisma/migrations/20250903114321_scout_partner_blacklisted_developer_id/migration.sql index 03b3fa42..a7ae2729 100644 --- a/src/prisma/migrations/20250903113117_blacklisted_scout_partner_developers/migration.sql +++ b/src/prisma/migrations/20250903114321_scout_partner_blacklisted_developer_id/migration.sql @@ -1,14 +1,14 @@ -- CreateTable CREATE TABLE "BlacklistedScoutPartnerDeveloper" ( "scoutPartnerId" TEXT NOT NULL, - "scoutId" UUID NOT NULL + "developerId" UUID NOT NULL ); -- CreateIndex -CREATE UNIQUE INDEX "BlacklistedScoutPartnerDeveloper_scoutPartnerId_scoutId_key" ON "BlacklistedScoutPartnerDeveloper"("scoutPartnerId", "scoutId"); +CREATE UNIQUE INDEX "BlacklistedScoutPartnerDeveloper_scoutPartnerId_developerId_key" ON "BlacklistedScoutPartnerDeveloper"("scoutPartnerId", "developerId"); -- AddForeignKey ALTER TABLE "BlacklistedScoutPartnerDeveloper" ADD CONSTRAINT "BlacklistedScoutPartnerDeveloper_scoutPartnerId_fkey" FOREIGN KEY ("scoutPartnerId") REFERENCES "ScoutPartner"("id") ON DELETE CASCADE ON UPDATE CASCADE; -- AddForeignKey -ALTER TABLE "BlacklistedScoutPartnerDeveloper" ADD CONSTRAINT "BlacklistedScoutPartnerDeveloper_scoutId_fkey" FOREIGN KEY ("scoutId") REFERENCES "Scout"("id") ON DELETE CASCADE ON UPDATE CASCADE; +ALTER TABLE "BlacklistedScoutPartnerDeveloper" ADD CONSTRAINT "BlacklistedScoutPartnerDeveloper_developerId_fkey" FOREIGN KEY ("developerId") REFERENCES "Scout"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/src/prisma/schema.prisma b/src/prisma/schema.prisma index 144c86b0..7b6fc753 100644 --- a/src/prisma/schema.prisma +++ b/src/prisma/schema.prisma @@ -3199,10 +3199,10 @@ model GithubRepo { model BlacklistedScoutPartnerDeveloper { scoutPartnerId String scoutPartner ScoutPartner @relation(fields: [scoutPartnerId], references: [id], onDelete: Cascade) - scoutId String @db.Uuid - scout Scout @relation(fields: [scoutId], references: [id], onDelete: Cascade) + developerId String @db.Uuid + developer Scout @relation(fields: [developerId], references: [id], onDelete: Cascade) - @@unique([scoutPartnerId, scoutId]) + @@unique([scoutPartnerId, developerId]) } enum GithubEventType { From aa0b552b611d5631a8af65821f3fd0e520dc834d Mon Sep 17 00:00:00 2001 From: Automated Version Bump Date: Wed, 3 Sep 2025 11:45:40 +0000 Subject: [PATCH 4/4] ci: version bump to 0.126.6-rc-feat-github-rep.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e0af12dc..1764d04c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@charmverse/core", - "version": "0.126.6-rc-feat-github-rep.0", + "version": "0.126.6-rc-feat-github-rep.1", "description": "Core API for Charmverse", "type": "commonjs", "types": "./dist/cjs/index.d.ts",