@merkl/api 0.20.170 → 0.20.172
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/database/api/.generated/drizzle/schema.d.ts +57 -0
- package/dist/database/api/.generated/drizzle/schema.js +52 -4
- package/dist/database/api/.generated/drizzle/schema.ts +52 -4
- package/dist/database/api/.generated/edge.js +13 -7
- package/dist/database/api/.generated/index-browser.js +10 -4
- package/dist/database/api/.generated/index.d.ts +1624 -39
- package/dist/database/api/.generated/index.js +13 -7
- package/dist/database/api/.generated/package.json +1 -1
- package/dist/database/api/.generated/schema.prisma +23 -13
- package/dist/database/api/.generated/wasm.js +10 -4
- package/dist/src/eden/index.d.ts +80 -15
- package/dist/src/engine/deprecated/dynamicData/factory.js +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/ownerFinder.js +1 -0
- package/dist/src/engine/implementations/Erc20/subTypes/factories.js +4 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/metadata.d.ts +17 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/metadata.js +24 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/tvl.js +69 -0
- package/dist/src/engine/implementations/Erc20/subTypes/index.d.ts +2 -1
- package/dist/src/engine/implementations/Erc20/subTypes/index.js +1 -0
- package/dist/src/engine/implementations/JsonAirdrop/metadata.d.ts +2 -2
- package/dist/src/engine/implementations/Locker/tvl.js +7 -2
- package/dist/src/engine/metadata/factory.js +0 -1
- package/dist/src/index.d.ts +28 -5
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +11 -1
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +4 -0
- package/dist/src/modules/v4/campaign/campaign.model.js +2 -0
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +16 -0
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +25 -1
- package/dist/src/modules/v4/campaign/campaign.service.js +3 -1
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +6 -2
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +8 -2
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +2 -0
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +10 -0
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +13 -3
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
- package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
- package/dist/src/modules/v4/protocol/protocol.repository.d.ts +2 -0
- package/dist/src/modules/v4/reward/reward.model.d.ts +3 -1
- package/dist/src/modules/v4/reward/reward.repository.d.ts +2 -0
- package/dist/src/modules/v4/reward/reward.service.d.ts +9 -0
- package/dist/src/modules/v4/reward/reward.service.js +2 -1
- package/dist/src/modules/v4/router.d.ts +28 -5
- package/dist/src/modules/v4/user/user.controller.d.ts +3 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -34,7 +34,7 @@ model Campaign {
|
|
34
34
|
endTimestamp BigInt
|
35
35
|
params Json
|
36
36
|
description String? // Can only be added manually for now
|
37
|
-
RewardBreakdown RewardBreakdown[]
|
37
|
+
RewardBreakdown RewardBreakdown[] @relation("Campaign")
|
38
38
|
DailyRewardsBreakdown DailyRewardsBreakdown[]
|
39
39
|
Creator User @relation(fields: [creatorAddress], references: [address])
|
40
40
|
creatorAddress String @db.Char(42)
|
@@ -49,6 +49,14 @@ model Campaign {
|
|
49
49
|
|
50
50
|
createdAt DateTime @default(now())
|
51
51
|
|
52
|
+
rootCampaignId String? // In case this is a subCampaign, refers to the root of the subCampaign tree
|
53
|
+
rootCampaign Campaign? @relation("root", fields: [rootCampaignId], references: [id])
|
54
|
+
subCampaigns Campaign[] @relation("root")
|
55
|
+
parentCampaignId String? // In case this is a subCampaign, refers to the parent campaign in the subCampaign tree
|
56
|
+
parentCampaign Campaign? @relation("parent", fields: [parentCampaignId], references: [id])
|
57
|
+
childCampaigns Campaign[] @relation("parent")
|
58
|
+
RewardBreakdownSubCampaign RewardBreakdown[] @relation("SubCampaign")
|
59
|
+
|
52
60
|
@@unique([distributionChainId, campaignId])
|
53
61
|
@@index([opportunityId], type: Hash)
|
54
62
|
}
|
@@ -299,19 +307,21 @@ model Reward {
|
|
299
307
|
}
|
300
308
|
|
301
309
|
model RewardBreakdown {
|
302
|
-
id
|
303
|
-
Protocol
|
304
|
-
protocolId
|
305
|
-
reason
|
306
|
-
amount
|
307
|
-
claimed
|
308
|
-
pending
|
309
|
-
Reward
|
310
|
-
rewardId
|
311
|
-
campaignId
|
312
|
-
Campaign
|
313
|
-
|
310
|
+
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
311
|
+
Protocol Protocol? @relation(fields: [protocolId], references: [id])
|
312
|
+
protocolId String?
|
313
|
+
reason String
|
314
|
+
amount String
|
315
|
+
claimed String
|
316
|
+
pending String
|
317
|
+
Reward Reward @relation(fields: [rewardId], references: [id], onDelete: Cascade)
|
318
|
+
rewardId String
|
319
|
+
campaignId String
|
320
|
+
Campaign Campaign @relation(name: "Campaign", fields: [campaignId], references: [id])
|
321
|
+
subCampaignId String?
|
322
|
+
SubCampaign Campaign? @relation(name: "SubCampaign", fields: [subCampaignId], references: [id])
|
314
323
|
|
324
|
+
// Hidden index on ((CAST(amount AS INTEGER) + CAST(pending AS INTEGER)));
|
315
325
|
@@unique([rewardId, campaignId, reason])
|
316
326
|
@@index([rewardId], type: Hash)
|
317
327
|
@@index([campaignId], type: Hash)
|
@@ -134,7 +134,9 @@ exports.Prisma.CampaignScalarFieldEnum = {
|
|
134
134
|
description: 'description',
|
135
135
|
creatorAddress: 'creatorAddress',
|
136
136
|
manualOverrides: 'manualOverrides',
|
137
|
-
createdAt: 'createdAt'
|
137
|
+
createdAt: 'createdAt',
|
138
|
+
rootCampaignId: 'rootCampaignId',
|
139
|
+
parentCampaignId: 'parentCampaignId'
|
138
140
|
};
|
139
141
|
|
140
142
|
exports.Prisma.RelationLoadStrategy = {
|
@@ -301,7 +303,8 @@ exports.Prisma.RewardBreakdownScalarFieldEnum = {
|
|
301
303
|
claimed: 'claimed',
|
302
304
|
pending: 'pending',
|
303
305
|
rewardId: 'rewardId',
|
304
|
-
campaignId: 'campaignId'
|
306
|
+
campaignId: 'campaignId',
|
307
|
+
subCampaignId: 'subCampaignId'
|
305
308
|
};
|
306
309
|
|
307
310
|
exports.Prisma.MerklRootScalarFieldEnum = {
|
@@ -388,7 +391,9 @@ exports.Prisma.CampaignOrderByRelevanceFieldEnum = {
|
|
388
391
|
amount: 'amount',
|
389
392
|
opportunityId: 'opportunityId',
|
390
393
|
description: 'description',
|
391
|
-
creatorAddress: 'creatorAddress'
|
394
|
+
creatorAddress: 'creatorAddress',
|
395
|
+
rootCampaignId: 'rootCampaignId',
|
396
|
+
parentCampaignId: 'parentCampaignId'
|
392
397
|
};
|
393
398
|
|
394
399
|
exports.Prisma.CampaignStatusOrderByRelevanceFieldEnum = {
|
@@ -512,7 +517,8 @@ exports.Prisma.RewardBreakdownOrderByRelevanceFieldEnum = {
|
|
512
517
|
claimed: 'claimed',
|
513
518
|
pending: 'pending',
|
514
519
|
rewardId: 'rewardId',
|
515
|
-
campaignId: 'campaignId'
|
520
|
+
campaignId: 'campaignId',
|
521
|
+
subCampaignId: 'subCampaignId'
|
516
522
|
};
|
517
523
|
|
518
524
|
exports.Prisma.MerklRootOrderByRelevanceFieldEnum = {
|