@merkl/api 1.4.54 → 1.4.56

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.
Files changed (31) hide show
  1. package/dist/src/eden/index.d.ts +4769 -4868
  2. package/dist/src/index.d.ts +293 -385
  3. package/dist/src/jobs/reward-breakdowns.js.map +1 -1
  4. package/dist/src/libs/computeFee.d.ts +789 -789
  5. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +32 -170
  6. package/dist/src/modules/v4/campaign/campaign.controller.js.map +1 -1
  7. package/dist/src/modules/v4/campaign/campaign.formatter.js.map +1 -1
  8. package/dist/src/modules/v4/campaign/campaign.model.d.ts +10 -2
  9. package/dist/src/modules/v4/campaign/campaign.model.js.map +1 -1
  10. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +347 -121
  11. package/dist/src/modules/v4/campaign/campaign.repository.js.map +1 -1
  12. package/dist/src/modules/v4/campaign/campaign.service.d.ts +6 -2
  13. package/dist/src/modules/v4/campaign/campaign.service.js.map +1 -1
  14. package/dist/src/modules/v4/campaignStatus/campaignStatus.controller.d.ts +5 -0
  15. package/dist/src/modules/v4/campaignStatus/campaignStatus.repository.d.ts +1 -0
  16. package/dist/src/modules/v4/campaignStatus/campaignStatus.repository.js.map +1 -1
  17. package/dist/src/modules/v4/campaignStatus/campaignStatus.service.d.ts +7 -0
  18. package/dist/src/modules/v4/campaignStatus/campaignStatus.service.js.map +1 -1
  19. package/dist/src/modules/v4/payload/payload.controller.d.ts +3 -3
  20. package/dist/src/modules/v4/payload/payload.service.d.ts +3 -3
  21. package/dist/src/modules/v4/priceSource/priceFetchers/factory.js.map +1 -1
  22. package/dist/src/modules/v4/priceSource/priceFetchers/implementations/fakeCampaign.js.map +1 -1
  23. package/dist/src/modules/v4/priceSource/priceSource.service.js.map +1 -1
  24. package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +252 -252
  25. package/dist/src/modules/v4/programPayload/subPayloads/ethena.d.ts +18 -18
  26. package/dist/src/modules/v4/reward/reward.service.d.ts +8 -0
  27. package/dist/src/modules/v4/router.d.ts +6157 -6249
  28. package/dist/src/modules/v4/token/token.service.js.map +1 -1
  29. package/dist/src/modules/v4/user/user.controller.d.ts +2 -0
  30. package/dist/src/utils/parseDistributionType.d.ts +225 -225
  31. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import type { CampaignManualOverride, Prisma } from "@package/databases/api";
2
2
  import { type ChainId } from "@package/resources/enums";
3
- import type { Campaign, CampaignUnique, CampaignWithParams, FindCampaignModel, FindCampaignWithStatusModel } from "../../../modules/v4/campaign/campaign.model";
3
+ import type { Campaign, CampaignUnique, CampaignWithParams, FindCampaignModel, FindCampaignWithStatusModel, UpdateCampaignModel } from "../../../modules/v4/campaign/campaign.model";
4
4
  export declare abstract class CampaignRepository {
5
5
  // ─── Utils ───────────────────────────────────────────────────────────
6
6
  static transformQueryToPrismaFilters(query: Omit<FindCampaignModel, "page" | "items">): {
@@ -66,17 +66,17 @@ export declare abstract class CampaignRepository {
66
66
  address: string | undefined;
67
67
  symbol: string | undefined;
68
68
  OR: ({
69
- displaySymbol?: undefined;
70
69
  symbol: {
71
70
  equals: string;
72
71
  mode: "insensitive";
73
72
  };
73
+ displaySymbol?: undefined;
74
74
  } | {
75
- symbol?: undefined;
76
75
  displaySymbol: {
77
76
  equals: string;
78
77
  mode: "insensitive";
79
78
  };
79
+ symbol?: undefined;
80
80
  })[] | undefined;
81
81
  isTest: false | undefined;
82
82
  type: {
@@ -99,17 +99,17 @@ export declare abstract class CampaignRepository {
99
99
  Creator?: undefined;
100
100
  tags?: undefined;
101
101
  } | {
102
- OR?: undefined;
103
- tags?: undefined;
104
102
  Creator: {
105
103
  id: string;
106
104
  };
107
- } | {
108
105
  OR?: undefined;
106
+ tags?: undefined;
107
+ } | {
109
108
  Creator?: undefined;
110
109
  tags: {
111
110
  has: string;
112
111
  };
112
+ OR?: undefined;
113
113
  } | undefined;
114
114
  createdAt: {
115
115
  gte: Date;
@@ -134,32 +134,29 @@ export declare abstract class CampaignRepository {
134
134
  contains: string;
135
135
  mode: "insensitive";
136
136
  };
137
+ Opportunity?: undefined;
137
138
  campaignId?: undefined;
138
139
  creatorAddress?: undefined;
139
- Opportunity?: undefined;
140
140
  RewardToken?: undefined;
141
141
  } | {
142
- id?: undefined;
143
142
  campaignId: {
144
143
  contains: string;
145
144
  mode: "insensitive";
146
145
  };
147
- creatorAddress?: undefined;
148
146
  Opportunity?: undefined;
147
+ id?: undefined;
148
+ creatorAddress?: undefined;
149
149
  RewardToken?: undefined;
150
150
  } | {
151
- id?: undefined;
152
- campaignId?: undefined;
153
151
  creatorAddress: {
154
152
  contains: string;
155
153
  mode: "insensitive";
156
154
  };
157
155
  Opportunity?: undefined;
158
- RewardToken?: undefined;
159
- } | {
160
156
  id?: undefined;
161
157
  campaignId?: undefined;
162
- creatorAddress?: undefined;
158
+ RewardToken?: undefined;
159
+ } | {
163
160
  Opportunity: {
164
161
  identifier: {
165
162
  contains: string;
@@ -167,48 +164,51 @@ export declare abstract class CampaignRepository {
167
164
  };
168
165
  mainProtocolId?: undefined;
169
166
  };
170
- RewardToken?: undefined;
171
- } | {
172
167
  id?: undefined;
173
168
  campaignId?: undefined;
174
169
  creatorAddress?: undefined;
170
+ RewardToken?: undefined;
171
+ } | {
175
172
  Opportunity: {
176
- identifier?: undefined;
177
173
  mainProtocolId: {
178
174
  contains: string;
179
175
  mode: "insensitive";
180
176
  };
177
+ identifier?: undefined;
181
178
  };
182
- RewardToken?: undefined;
183
- } | {
184
179
  id?: undefined;
185
180
  campaignId?: undefined;
186
181
  creatorAddress?: undefined;
182
+ RewardToken?: undefined;
183
+ } | {
187
184
  Opportunity?: undefined;
188
185
  RewardToken: {
189
186
  OR: ({
190
- displaySymbol?: undefined;
191
- address?: undefined;
192
187
  symbol: {
193
188
  contains: string;
194
189
  mode: "insensitive";
195
190
  };
196
- } | {
197
- symbol?: undefined;
191
+ displaySymbol?: undefined;
198
192
  address?: undefined;
193
+ } | {
199
194
  displaySymbol: {
200
195
  contains: string;
201
196
  mode: "insensitive";
202
197
  };
203
- } | {
204
- displaySymbol?: undefined;
205
198
  symbol?: undefined;
199
+ address?: undefined;
200
+ } | {
206
201
  address: {
207
202
  contains: string;
208
203
  mode: "insensitive";
209
204
  };
205
+ displaySymbol?: undefined;
206
+ symbol?: undefined;
210
207
  })[];
211
208
  };
209
+ id?: undefined;
210
+ campaignId?: undefined;
211
+ creatorAddress?: undefined;
212
212
  })[];
213
213
  }[] | undefined;
214
214
  } | {
@@ -273,17 +273,17 @@ export declare abstract class CampaignRepository {
273
273
  address: string | undefined;
274
274
  symbol: string | undefined;
275
275
  OR: ({
276
- displaySymbol?: undefined;
277
276
  symbol: {
278
277
  equals: string;
279
278
  mode: "insensitive";
280
279
  };
280
+ displaySymbol?: undefined;
281
281
  } | {
282
- symbol?: undefined;
283
282
  displaySymbol: {
284
283
  equals: string;
285
284
  mode: "insensitive";
286
285
  };
286
+ symbol?: undefined;
287
287
  })[] | undefined;
288
288
  isTest: false | undefined;
289
289
  type: {
@@ -306,17 +306,17 @@ export declare abstract class CampaignRepository {
306
306
  Creator?: undefined;
307
307
  tags?: undefined;
308
308
  } | {
309
- OR?: undefined;
310
- tags?: undefined;
311
309
  Creator: {
312
310
  id: string;
313
311
  };
314
- } | {
315
312
  OR?: undefined;
313
+ tags?: undefined;
314
+ } | {
316
315
  Creator?: undefined;
317
316
  tags: {
318
317
  has: string;
319
318
  };
319
+ OR?: undefined;
320
320
  } | undefined;
321
321
  createdAt: {
322
322
  gte: Date;
@@ -341,32 +341,29 @@ export declare abstract class CampaignRepository {
341
341
  contains: string;
342
342
  mode: "insensitive";
343
343
  };
344
+ Opportunity?: undefined;
344
345
  campaignId?: undefined;
345
346
  creatorAddress?: undefined;
346
- Opportunity?: undefined;
347
347
  RewardToken?: undefined;
348
348
  } | {
349
- id?: undefined;
350
349
  campaignId: {
351
350
  contains: string;
352
351
  mode: "insensitive";
353
352
  };
354
- creatorAddress?: undefined;
355
353
  Opportunity?: undefined;
354
+ id?: undefined;
355
+ creatorAddress?: undefined;
356
356
  RewardToken?: undefined;
357
357
  } | {
358
- id?: undefined;
359
- campaignId?: undefined;
360
358
  creatorAddress: {
361
359
  contains: string;
362
360
  mode: "insensitive";
363
361
  };
364
362
  Opportunity?: undefined;
365
- RewardToken?: undefined;
366
- } | {
367
363
  id?: undefined;
368
364
  campaignId?: undefined;
369
- creatorAddress?: undefined;
365
+ RewardToken?: undefined;
366
+ } | {
370
367
  Opportunity: {
371
368
  identifier: {
372
369
  contains: string;
@@ -374,48 +371,51 @@ export declare abstract class CampaignRepository {
374
371
  };
375
372
  mainProtocolId?: undefined;
376
373
  };
377
- RewardToken?: undefined;
378
- } | {
379
374
  id?: undefined;
380
375
  campaignId?: undefined;
381
376
  creatorAddress?: undefined;
377
+ RewardToken?: undefined;
378
+ } | {
382
379
  Opportunity: {
383
- identifier?: undefined;
384
380
  mainProtocolId: {
385
381
  contains: string;
386
382
  mode: "insensitive";
387
383
  };
384
+ identifier?: undefined;
388
385
  };
389
- RewardToken?: undefined;
390
- } | {
391
386
  id?: undefined;
392
387
  campaignId?: undefined;
393
388
  creatorAddress?: undefined;
389
+ RewardToken?: undefined;
390
+ } | {
394
391
  Opportunity?: undefined;
395
392
  RewardToken: {
396
393
  OR: ({
397
- displaySymbol?: undefined;
398
- address?: undefined;
399
394
  symbol: {
400
395
  contains: string;
401
396
  mode: "insensitive";
402
397
  };
403
- } | {
404
- symbol?: undefined;
398
+ displaySymbol?: undefined;
405
399
  address?: undefined;
400
+ } | {
406
401
  displaySymbol: {
407
402
  contains: string;
408
403
  mode: "insensitive";
409
404
  };
410
- } | {
411
- displaySymbol?: undefined;
412
405
  symbol?: undefined;
406
+ address?: undefined;
407
+ } | {
413
408
  address: {
414
409
  contains: string;
415
410
  mode: "insensitive";
416
411
  };
412
+ displaySymbol?: undefined;
413
+ symbol?: undefined;
417
414
  })[];
418
415
  };
416
+ id?: undefined;
417
+ campaignId?: undefined;
418
+ creatorAddress?: undefined;
419
419
  })[];
420
420
  }[] | undefined;
421
421
  endTimestamp: {
@@ -490,17 +490,17 @@ export declare abstract class CampaignRepository {
490
490
  address: string | undefined;
491
491
  symbol: string | undefined;
492
492
  OR: ({
493
- displaySymbol?: undefined;
494
493
  symbol: {
495
494
  equals: string;
496
495
  mode: "insensitive";
497
496
  };
497
+ displaySymbol?: undefined;
498
498
  } | {
499
- symbol?: undefined;
500
499
  displaySymbol: {
501
500
  equals: string;
502
501
  mode: "insensitive";
503
502
  };
503
+ symbol?: undefined;
504
504
  })[] | undefined;
505
505
  isTest: false | undefined;
506
506
  type: {
@@ -523,17 +523,17 @@ export declare abstract class CampaignRepository {
523
523
  Creator?: undefined;
524
524
  tags?: undefined;
525
525
  } | {
526
- OR?: undefined;
527
- tags?: undefined;
528
526
  Creator: {
529
527
  id: string;
530
528
  };
531
- } | {
532
529
  OR?: undefined;
530
+ tags?: undefined;
531
+ } | {
533
532
  Creator?: undefined;
534
533
  tags: {
535
534
  has: string;
536
535
  };
536
+ OR?: undefined;
537
537
  } | undefined;
538
538
  createdAt: {
539
539
  gte: Date;
@@ -558,32 +558,29 @@ export declare abstract class CampaignRepository {
558
558
  contains: string;
559
559
  mode: "insensitive";
560
560
  };
561
+ Opportunity?: undefined;
561
562
  campaignId?: undefined;
562
563
  creatorAddress?: undefined;
563
- Opportunity?: undefined;
564
564
  RewardToken?: undefined;
565
565
  } | {
566
- id?: undefined;
567
566
  campaignId: {
568
567
  contains: string;
569
568
  mode: "insensitive";
570
569
  };
571
- creatorAddress?: undefined;
572
570
  Opportunity?: undefined;
571
+ id?: undefined;
572
+ creatorAddress?: undefined;
573
573
  RewardToken?: undefined;
574
574
  } | {
575
- id?: undefined;
576
- campaignId?: undefined;
577
575
  creatorAddress: {
578
576
  contains: string;
579
577
  mode: "insensitive";
580
578
  };
581
579
  Opportunity?: undefined;
582
- RewardToken?: undefined;
583
- } | {
584
580
  id?: undefined;
585
581
  campaignId?: undefined;
586
- creatorAddress?: undefined;
582
+ RewardToken?: undefined;
583
+ } | {
587
584
  Opportunity: {
588
585
  identifier: {
589
586
  contains: string;
@@ -591,48 +588,51 @@ export declare abstract class CampaignRepository {
591
588
  };
592
589
  mainProtocolId?: undefined;
593
590
  };
594
- RewardToken?: undefined;
595
- } | {
596
591
  id?: undefined;
597
592
  campaignId?: undefined;
598
593
  creatorAddress?: undefined;
594
+ RewardToken?: undefined;
595
+ } | {
599
596
  Opportunity: {
600
- identifier?: undefined;
601
597
  mainProtocolId: {
602
598
  contains: string;
603
599
  mode: "insensitive";
604
600
  };
601
+ identifier?: undefined;
605
602
  };
606
- RewardToken?: undefined;
607
- } | {
608
603
  id?: undefined;
609
604
  campaignId?: undefined;
610
605
  creatorAddress?: undefined;
606
+ RewardToken?: undefined;
607
+ } | {
611
608
  Opportunity?: undefined;
612
609
  RewardToken: {
613
610
  OR: ({
614
- displaySymbol?: undefined;
615
- address?: undefined;
616
611
  symbol: {
617
612
  contains: string;
618
613
  mode: "insensitive";
619
614
  };
620
- } | {
621
- symbol?: undefined;
615
+ displaySymbol?: undefined;
622
616
  address?: undefined;
617
+ } | {
623
618
  displaySymbol: {
624
619
  contains: string;
625
620
  mode: "insensitive";
626
621
  };
627
- } | {
628
- displaySymbol?: undefined;
629
622
  symbol?: undefined;
623
+ address?: undefined;
624
+ } | {
630
625
  address: {
631
626
  contains: string;
632
627
  mode: "insensitive";
633
628
  };
629
+ displaySymbol?: undefined;
630
+ symbol?: undefined;
634
631
  })[];
635
632
  };
633
+ id?: undefined;
634
+ campaignId?: undefined;
635
+ creatorAddress?: undefined;
636
636
  })[];
637
637
  }[] | undefined;
638
638
  endTimestamp: {
@@ -703,17 +703,17 @@ export declare abstract class CampaignRepository {
703
703
  address: string | undefined;
704
704
  symbol: string | undefined;
705
705
  OR: ({
706
- displaySymbol?: undefined;
707
706
  symbol: {
708
707
  equals: string;
709
708
  mode: "insensitive";
710
709
  };
710
+ displaySymbol?: undefined;
711
711
  } | {
712
- symbol?: undefined;
713
712
  displaySymbol: {
714
713
  equals: string;
715
714
  mode: "insensitive";
716
715
  };
716
+ symbol?: undefined;
717
717
  })[] | undefined;
718
718
  isTest: false | undefined;
719
719
  type: {
@@ -736,17 +736,17 @@ export declare abstract class CampaignRepository {
736
736
  Creator?: undefined;
737
737
  tags?: undefined;
738
738
  } | {
739
- OR?: undefined;
740
- tags?: undefined;
741
739
  Creator: {
742
740
  id: string;
743
741
  };
744
- } | {
745
742
  OR?: undefined;
743
+ tags?: undefined;
744
+ } | {
746
745
  Creator?: undefined;
747
746
  tags: {
748
747
  has: string;
749
748
  };
749
+ OR?: undefined;
750
750
  } | undefined;
751
751
  createdAt: {
752
752
  gte: Date;
@@ -771,32 +771,29 @@ export declare abstract class CampaignRepository {
771
771
  contains: string;
772
772
  mode: "insensitive";
773
773
  };
774
+ Opportunity?: undefined;
774
775
  campaignId?: undefined;
775
776
  creatorAddress?: undefined;
776
- Opportunity?: undefined;
777
777
  RewardToken?: undefined;
778
778
  } | {
779
- id?: undefined;
780
779
  campaignId: {
781
780
  contains: string;
782
781
  mode: "insensitive";
783
782
  };
784
- creatorAddress?: undefined;
785
783
  Opportunity?: undefined;
784
+ id?: undefined;
785
+ creatorAddress?: undefined;
786
786
  RewardToken?: undefined;
787
787
  } | {
788
- id?: undefined;
789
- campaignId?: undefined;
790
788
  creatorAddress: {
791
789
  contains: string;
792
790
  mode: "insensitive";
793
791
  };
794
792
  Opportunity?: undefined;
795
- RewardToken?: undefined;
796
- } | {
797
793
  id?: undefined;
798
794
  campaignId?: undefined;
799
- creatorAddress?: undefined;
795
+ RewardToken?: undefined;
796
+ } | {
800
797
  Opportunity: {
801
798
  identifier: {
802
799
  contains: string;
@@ -804,48 +801,51 @@ export declare abstract class CampaignRepository {
804
801
  };
805
802
  mainProtocolId?: undefined;
806
803
  };
807
- RewardToken?: undefined;
808
- } | {
809
804
  id?: undefined;
810
805
  campaignId?: undefined;
811
806
  creatorAddress?: undefined;
807
+ RewardToken?: undefined;
808
+ } | {
812
809
  Opportunity: {
813
- identifier?: undefined;
814
810
  mainProtocolId: {
815
811
  contains: string;
816
812
  mode: "insensitive";
817
813
  };
814
+ identifier?: undefined;
818
815
  };
819
- RewardToken?: undefined;
820
- } | {
821
816
  id?: undefined;
822
817
  campaignId?: undefined;
823
818
  creatorAddress?: undefined;
819
+ RewardToken?: undefined;
820
+ } | {
824
821
  Opportunity?: undefined;
825
822
  RewardToken: {
826
823
  OR: ({
827
- displaySymbol?: undefined;
828
- address?: undefined;
829
824
  symbol: {
830
825
  contains: string;
831
826
  mode: "insensitive";
832
827
  };
833
- } | {
834
- symbol?: undefined;
828
+ displaySymbol?: undefined;
835
829
  address?: undefined;
830
+ } | {
836
831
  displaySymbol: {
837
832
  contains: string;
838
833
  mode: "insensitive";
839
834
  };
840
- } | {
841
- displaySymbol?: undefined;
842
835
  symbol?: undefined;
836
+ address?: undefined;
837
+ } | {
843
838
  address: {
844
839
  contains: string;
845
840
  mode: "insensitive";
846
841
  };
842
+ displaySymbol?: undefined;
843
+ symbol?: undefined;
847
844
  })[];
848
845
  };
846
+ id?: undefined;
847
+ campaignId?: undefined;
848
+ creatorAddress?: undefined;
849
849
  })[];
850
850
  }[] | undefined;
851
851
  startTimestamp: {
@@ -916,17 +916,17 @@ export declare abstract class CampaignRepository {
916
916
  address: string | undefined;
917
917
  symbol: string | undefined;
918
918
  OR: ({
919
- displaySymbol?: undefined;
920
919
  symbol: {
921
920
  equals: string;
922
921
  mode: "insensitive";
923
922
  };
923
+ displaySymbol?: undefined;
924
924
  } | {
925
- symbol?: undefined;
926
925
  displaySymbol: {
927
926
  equals: string;
928
927
  mode: "insensitive";
929
928
  };
929
+ symbol?: undefined;
930
930
  })[] | undefined;
931
931
  isTest: false | undefined;
932
932
  type: {
@@ -949,17 +949,17 @@ export declare abstract class CampaignRepository {
949
949
  Creator?: undefined;
950
950
  tags?: undefined;
951
951
  } | {
952
- OR?: undefined;
953
- tags?: undefined;
954
952
  Creator: {
955
953
  id: string;
956
954
  };
957
- } | {
958
955
  OR?: undefined;
956
+ tags?: undefined;
957
+ } | {
959
958
  Creator?: undefined;
960
959
  tags: {
961
960
  has: string;
962
961
  };
962
+ OR?: undefined;
963
963
  } | undefined;
964
964
  createdAt: {
965
965
  gte: Date;
@@ -984,32 +984,29 @@ export declare abstract class CampaignRepository {
984
984
  contains: string;
985
985
  mode: "insensitive";
986
986
  };
987
+ Opportunity?: undefined;
987
988
  campaignId?: undefined;
988
989
  creatorAddress?: undefined;
989
- Opportunity?: undefined;
990
990
  RewardToken?: undefined;
991
991
  } | {
992
- id?: undefined;
993
992
  campaignId: {
994
993
  contains: string;
995
994
  mode: "insensitive";
996
995
  };
997
- creatorAddress?: undefined;
998
996
  Opportunity?: undefined;
997
+ id?: undefined;
998
+ creatorAddress?: undefined;
999
999
  RewardToken?: undefined;
1000
1000
  } | {
1001
- id?: undefined;
1002
- campaignId?: undefined;
1003
1001
  creatorAddress: {
1004
1002
  contains: string;
1005
1003
  mode: "insensitive";
1006
1004
  };
1007
1005
  Opportunity?: undefined;
1008
- RewardToken?: undefined;
1009
- } | {
1010
1006
  id?: undefined;
1011
1007
  campaignId?: undefined;
1012
- creatorAddress?: undefined;
1008
+ RewardToken?: undefined;
1009
+ } | {
1013
1010
  Opportunity: {
1014
1011
  identifier: {
1015
1012
  contains: string;
@@ -1017,48 +1014,51 @@ export declare abstract class CampaignRepository {
1017
1014
  };
1018
1015
  mainProtocolId?: undefined;
1019
1016
  };
1020
- RewardToken?: undefined;
1021
- } | {
1022
1017
  id?: undefined;
1023
1018
  campaignId?: undefined;
1024
1019
  creatorAddress?: undefined;
1020
+ RewardToken?: undefined;
1021
+ } | {
1025
1022
  Opportunity: {
1026
- identifier?: undefined;
1027
1023
  mainProtocolId: {
1028
1024
  contains: string;
1029
1025
  mode: "insensitive";
1030
1026
  };
1027
+ identifier?: undefined;
1031
1028
  };
1032
- RewardToken?: undefined;
1033
- } | {
1034
1029
  id?: undefined;
1035
1030
  campaignId?: undefined;
1036
1031
  creatorAddress?: undefined;
1032
+ RewardToken?: undefined;
1033
+ } | {
1037
1034
  Opportunity?: undefined;
1038
1035
  RewardToken: {
1039
1036
  OR: ({
1040
- displaySymbol?: undefined;
1041
- address?: undefined;
1042
1037
  symbol: {
1043
1038
  contains: string;
1044
1039
  mode: "insensitive";
1045
1040
  };
1046
- } | {
1047
- symbol?: undefined;
1041
+ displaySymbol?: undefined;
1048
1042
  address?: undefined;
1043
+ } | {
1049
1044
  displaySymbol: {
1050
1045
  contains: string;
1051
1046
  mode: "insensitive";
1052
1047
  };
1053
- } | {
1054
- displaySymbol?: undefined;
1055
1048
  symbol?: undefined;
1049
+ address?: undefined;
1050
+ } | {
1056
1051
  address: {
1057
1052
  contains: string;
1058
1053
  mode: "insensitive";
1059
1054
  };
1055
+ displaySymbol?: undefined;
1056
+ symbol?: undefined;
1060
1057
  })[];
1061
1058
  };
1059
+ id?: undefined;
1060
+ campaignId?: undefined;
1061
+ creatorAddress?: undefined;
1062
1062
  })[];
1063
1063
  }[] | undefined;
1064
1064
  endTimestamp: {
@@ -1797,6 +1797,232 @@ export declare abstract class CampaignRepository {
1797
1797
  static findChains(): Promise<Record<string, ChainId>>;
1798
1798
  static addManualOverride(id: string, field: CampaignManualOverride): Promise<void>;
1799
1799
  static removeManualOverride(id: string, field: CampaignManualOverride): Promise<void>;
1800
+ static patch(id: string, body: UpdateCampaignModel): Promise<{
1801
+ CampaignStatus: {
1802
+ campaignId: string;
1803
+ computedUntil: bigint;
1804
+ processingStarted: bigint;
1805
+ status: import("@package/databases").RunStatus;
1806
+ error: string;
1807
+ details: import("@prisma/client/runtime/client").JsonValue;
1808
+ }[];
1809
+ ChildCampaigns: {
1810
+ id: string;
1811
+ }[];
1812
+ ComputeChain: {
1813
+ id: number;
1814
+ name: string;
1815
+ icon: string;
1816
+ liveCampaigns: number;
1817
+ endOfDisputePeriod: number;
1818
+ };
1819
+ Creator: {
1820
+ address: string;
1821
+ tags: string[];
1822
+ creatorId: string | null;
1823
+ };
1824
+ DailyRewardsBreakdown: {
1825
+ id: string;
1826
+ value: number;
1827
+ timestamp: bigint;
1828
+ campaignId: string;
1829
+ dailyRewardsRecordId: string;
1830
+ }[];
1831
+ DistributionChain: {
1832
+ id: number;
1833
+ name: string;
1834
+ icon: string;
1835
+ liveCampaigns: number;
1836
+ endOfDisputePeriod: number;
1837
+ };
1838
+ Opportunity: {
1839
+ id: string;
1840
+ chainId: number;
1841
+ type: string;
1842
+ identifier: string;
1843
+ name: string;
1844
+ description: string;
1845
+ howToSteps: string[];
1846
+ depositUrl: string | null;
1847
+ explorerAddress: string | null;
1848
+ status: import("@package/databases").Status;
1849
+ action: import("@package/databases").OpportunityAction;
1850
+ mainProtocolId: string | null;
1851
+ tvl: number;
1852
+ apr: number;
1853
+ maxApr: number | null;
1854
+ dailyRewards: number;
1855
+ tags: string[];
1856
+ lastCampaignCreatedAt: Date;
1857
+ manualOverrides: import("@package/databases").OpportunityManualOverride[];
1858
+ liveCampaigns: number;
1859
+ };
1860
+ RewardToken: {
1861
+ id: string;
1862
+ name: string | null;
1863
+ chainId: number;
1864
+ address: string;
1865
+ decimals: number;
1866
+ symbol: string;
1867
+ displaySymbol: string;
1868
+ icon: string;
1869
+ verified: boolean;
1870
+ isTest: boolean;
1871
+ type: import("@package/databases").TokenType;
1872
+ isNative: boolean;
1873
+ price: number | null;
1874
+ updatedAt: number | null;
1875
+ priceSource: string | null;
1876
+ };
1877
+ groups: ({
1878
+ program: {
1879
+ id: string;
1880
+ slug: string | null;
1881
+ name: string;
1882
+ description: string;
1883
+ icon: string;
1884
+ } | null;
1885
+ } & {
1886
+ id: string;
1887
+ slug: string | null;
1888
+ programId: string | null;
1889
+ })[];
1890
+ } & {
1891
+ id: string;
1892
+ computeChainId: number;
1893
+ distributionChainId: number;
1894
+ campaignId: string;
1895
+ type: string;
1896
+ distributionType: import("@package/databases").DistributionType;
1897
+ subType: number | null;
1898
+ rewardTokenId: string;
1899
+ amount: string;
1900
+ opportunityId: string;
1901
+ startTimestamp: bigint;
1902
+ endTimestamp: bigint;
1903
+ params: import("@prisma/client/runtime/client").JsonValue;
1904
+ description: string | null;
1905
+ dailyRewards: number;
1906
+ apr: number;
1907
+ creatorAddress: string;
1908
+ manualOverrides: CampaignManualOverride[];
1909
+ createdAt: Date;
1910
+ rootCampaignId: string | null;
1911
+ parentCampaignId: string | null;
1912
+ }>;
1913
+ static patchMany(ids: string[], body: UpdateCampaignModel): Promise<({
1914
+ CampaignStatus: {
1915
+ campaignId: string;
1916
+ computedUntil: bigint;
1917
+ processingStarted: bigint;
1918
+ status: import("@package/databases").RunStatus;
1919
+ error: string;
1920
+ details: import("@prisma/client/runtime/client").JsonValue;
1921
+ }[];
1922
+ ChildCampaigns: {
1923
+ id: string;
1924
+ }[];
1925
+ ComputeChain: {
1926
+ id: number;
1927
+ name: string;
1928
+ icon: string;
1929
+ liveCampaigns: number;
1930
+ endOfDisputePeriod: number;
1931
+ };
1932
+ Creator: {
1933
+ address: string;
1934
+ tags: string[];
1935
+ creatorId: string | null;
1936
+ };
1937
+ DailyRewardsBreakdown: {
1938
+ id: string;
1939
+ value: number;
1940
+ timestamp: bigint;
1941
+ campaignId: string;
1942
+ dailyRewardsRecordId: string;
1943
+ }[];
1944
+ DistributionChain: {
1945
+ id: number;
1946
+ name: string;
1947
+ icon: string;
1948
+ liveCampaigns: number;
1949
+ endOfDisputePeriod: number;
1950
+ };
1951
+ Opportunity: {
1952
+ id: string;
1953
+ chainId: number;
1954
+ type: string;
1955
+ identifier: string;
1956
+ name: string;
1957
+ description: string;
1958
+ howToSteps: string[];
1959
+ depositUrl: string | null;
1960
+ explorerAddress: string | null;
1961
+ status: import("@package/databases").Status;
1962
+ action: import("@package/databases").OpportunityAction;
1963
+ mainProtocolId: string | null;
1964
+ tvl: number;
1965
+ apr: number;
1966
+ maxApr: number | null;
1967
+ dailyRewards: number;
1968
+ tags: string[];
1969
+ lastCampaignCreatedAt: Date;
1970
+ manualOverrides: import("@package/databases").OpportunityManualOverride[];
1971
+ liveCampaigns: number;
1972
+ };
1973
+ RewardToken: {
1974
+ id: string;
1975
+ name: string | null;
1976
+ chainId: number;
1977
+ address: string;
1978
+ decimals: number;
1979
+ symbol: string;
1980
+ displaySymbol: string;
1981
+ icon: string;
1982
+ verified: boolean;
1983
+ isTest: boolean;
1984
+ type: import("@package/databases").TokenType;
1985
+ isNative: boolean;
1986
+ price: number | null;
1987
+ updatedAt: number | null;
1988
+ priceSource: string | null;
1989
+ };
1990
+ groups: ({
1991
+ program: {
1992
+ id: string;
1993
+ slug: string | null;
1994
+ name: string;
1995
+ description: string;
1996
+ icon: string;
1997
+ } | null;
1998
+ } & {
1999
+ id: string;
2000
+ slug: string | null;
2001
+ programId: string | null;
2002
+ })[];
2003
+ } & {
2004
+ id: string;
2005
+ computeChainId: number;
2006
+ distributionChainId: number;
2007
+ campaignId: string;
2008
+ type: string;
2009
+ distributionType: import("@package/databases").DistributionType;
2010
+ subType: number | null;
2011
+ rewardTokenId: string;
2012
+ amount: string;
2013
+ opportunityId: string;
2014
+ startTimestamp: bigint;
2015
+ endTimestamp: bigint;
2016
+ params: import("@prisma/client/runtime/client").JsonValue;
2017
+ description: string | null;
2018
+ dailyRewards: number;
2019
+ apr: number;
2020
+ creatorAddress: string;
2021
+ manualOverrides: CampaignManualOverride[];
2022
+ createdAt: Date;
2023
+ rootCampaignId: string | null;
2024
+ parentCampaignId: string | null;
2025
+ })[]>;
1800
2026
  static updateOpportunity(id: string, opportunityId: string): Promise<void>;
1801
2027
  static updateCreator(id: string, creatorAddress: string): Promise<void>;
1802
2028
  static updateParams(id: string, params: string): Promise<{