@merkl/api 1.1.8 → 1.1.10

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.
@@ -604,54 +604,108 @@ export declare const OpportunityController: Elysia<"/opportunities", {
604
604
  minimumApr?: number | undefined;
605
605
  maximumApr?: number | undefined;
606
606
  rewardTokenSymbol?: string | undefined;
607
+ distributionTypes?: ("DUTCH_AUCTION" | "FIX_REWARD" | "MAX_REWARD")[] | undefined;
607
608
  };
608
609
  headers: unknown;
609
610
  response: {
610
- 200: string;
611
- 422: {
612
- type: "validation";
613
- on: string;
614
- summary?: string;
615
- message?: string;
616
- found?: unknown;
617
- property?: string;
618
- expected?: string;
619
- };
620
- } | {
621
- 200: number;
622
- 422: {
623
- type: "validation";
624
- on: string;
625
- summary?: string;
626
- message?: string;
627
- found?: unknown;
628
- property?: string;
629
- expected?: string;
630
- };
631
- } | {
632
- 200: false;
633
- 422: {
634
- type: "validation";
635
- on: string;
636
- summary?: string;
637
- message?: string;
638
- found?: unknown;
639
- property?: string;
640
- expected?: string;
641
- };
642
- } | {
643
- 200: true;
644
- 422: {
645
- type: "validation";
646
- on: string;
647
- summary?: string;
648
- message?: string;
649
- found?: unknown;
650
- property?: string;
651
- expected?: string;
652
- };
653
- } | {
654
- 200: object;
611
+ [x: string]: any;
612
+ 200: ({
613
+ protocol?: {
614
+ dailyRewards?: number | undefined;
615
+ numberOfLiveCampaigns?: number | undefined;
616
+ opportunityLiveTags?: string[] | undefined;
617
+ name: string;
618
+ description: string;
619
+ id: string;
620
+ url: string;
621
+ icon: string;
622
+ tags: string[];
623
+ } | null | undefined;
624
+ depositUrl?: string | undefined;
625
+ aprRecord?: {
626
+ timestamp: string | bigint;
627
+ cumulated: number;
628
+ breakdowns: {
629
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
630
+ value: number;
631
+ type: "TOKEN" | "CAMPAIGN" | "PROTOCOL";
632
+ identifier: string;
633
+ }[];
634
+ } | undefined;
635
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
636
+ explorerAddress?: string | undefined;
637
+ tvlRecord?: {
638
+ timestamp: string | bigint;
639
+ total: number;
640
+ breakdowns: {
641
+ value: number;
642
+ type: "TOKEN" | "PROTOCOL";
643
+ identifier: string;
644
+ }[];
645
+ } | undefined;
646
+ rewardsRecord?: {
647
+ timestamp: string | bigint;
648
+ total: number;
649
+ breakdowns: {
650
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
651
+ token: {
652
+ price?: number | null | undefined;
653
+ symbol: string;
654
+ name: string | null;
655
+ decimals: number;
656
+ address: string;
657
+ id: string;
658
+ chainId: number;
659
+ type: "TOKEN" | "PRETGE" | "POINT";
660
+ icon: string;
661
+ isNative: boolean;
662
+ isTest: boolean;
663
+ verified: boolean;
664
+ };
665
+ campaignId: string;
666
+ value: number;
667
+ amount: string | bigint;
668
+ }[];
669
+ } | undefined;
670
+ name: string;
671
+ apr: number;
672
+ tokens: {
673
+ price?: number | null | undefined;
674
+ symbol: string;
675
+ name: string | null;
676
+ decimals: number;
677
+ address: string;
678
+ id: string;
679
+ chainId: number;
680
+ type: "TOKEN" | "PRETGE" | "POINT";
681
+ icon: string;
682
+ isNative: boolean;
683
+ isTest: boolean;
684
+ verified: boolean;
685
+ }[];
686
+ tvl: number;
687
+ description: string;
688
+ id: string;
689
+ status: string;
690
+ chainId: number;
691
+ action: string;
692
+ type: string;
693
+ chain: {
694
+ explorers?: {
695
+ chainId: number;
696
+ type: "ETHERSCAN" | "BLOCKSCOUT";
697
+ url: string;
698
+ }[] | undefined;
699
+ name: string;
700
+ id: number;
701
+ icon: string;
702
+ };
703
+ identifier: string;
704
+ howToSteps: string[];
705
+ dailyRewards: number;
706
+ tags: string[];
707
+ lastCampaignCreatedAt: number;
708
+ } | null)[];
655
709
  422: {
656
710
  type: "validation";
657
711
  on: string;
@@ -662,8 +716,103 @@ export declare const OpportunityController: Elysia<"/opportunities", {
662
716
  expected?: string;
663
717
  };
664
718
  } | {
665
- [x: string]: any;
666
- 200: any;
719
+ 200: ({
720
+ protocol?: {
721
+ dailyRewards?: number | undefined;
722
+ numberOfLiveCampaigns?: number | undefined;
723
+ opportunityLiveTags?: string[] | undefined;
724
+ name: string;
725
+ description: string;
726
+ id: string;
727
+ url: string;
728
+ icon: string;
729
+ tags: string[];
730
+ } | null | undefined;
731
+ depositUrl?: string | undefined;
732
+ aprRecord?: {
733
+ timestamp: string | bigint;
734
+ cumulated: number;
735
+ breakdowns: {
736
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
737
+ value: number;
738
+ type: "TOKEN" | "CAMPAIGN" | "PROTOCOL";
739
+ identifier: string;
740
+ }[];
741
+ } | undefined;
742
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
743
+ explorerAddress?: string | undefined;
744
+ tvlRecord?: {
745
+ timestamp: string | bigint;
746
+ total: number;
747
+ breakdowns: {
748
+ value: number;
749
+ type: "TOKEN" | "PROTOCOL";
750
+ identifier: string;
751
+ }[];
752
+ } | undefined;
753
+ rewardsRecord?: {
754
+ timestamp: string | bigint;
755
+ total: number;
756
+ breakdowns: {
757
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
758
+ token: {
759
+ price?: number | null | undefined;
760
+ symbol: string;
761
+ name: string | null;
762
+ decimals: number;
763
+ address: string;
764
+ id: string;
765
+ chainId: number;
766
+ type: "TOKEN" | "PRETGE" | "POINT";
767
+ icon: string;
768
+ isNative: boolean;
769
+ isTest: boolean;
770
+ verified: boolean;
771
+ };
772
+ campaignId: string;
773
+ value: number;
774
+ amount: string | bigint;
775
+ }[];
776
+ } | undefined;
777
+ name: string;
778
+ apr: number;
779
+ tokens: {
780
+ price?: number | null | undefined;
781
+ symbol: string;
782
+ name: string | null;
783
+ decimals: number;
784
+ address: string;
785
+ id: string;
786
+ chainId: number;
787
+ type: "TOKEN" | "PRETGE" | "POINT";
788
+ icon: string;
789
+ isNative: boolean;
790
+ isTest: boolean;
791
+ verified: boolean;
792
+ }[];
793
+ tvl: number;
794
+ description: string;
795
+ id: string;
796
+ status: string;
797
+ chainId: number;
798
+ action: string;
799
+ type: string;
800
+ chain: {
801
+ explorers?: {
802
+ chainId: number;
803
+ type: "ETHERSCAN" | "BLOCKSCOUT";
804
+ url: string;
805
+ }[] | undefined;
806
+ name: string;
807
+ id: number;
808
+ icon: string;
809
+ };
810
+ identifier: string;
811
+ howToSteps: string[];
812
+ dailyRewards: number;
813
+ tags: string[];
814
+ lastCampaignCreatedAt: number;
815
+ } | null)[];
667
816
  422: {
668
817
  type: "validation";
669
818
  on: string;
@@ -674,7 +823,103 @@ export declare const OpportunityController: Elysia<"/opportunities", {
674
823
  expected?: string;
675
824
  };
676
825
  } | {
677
- 200: unknown;
826
+ 200: ({
827
+ protocol?: {
828
+ dailyRewards?: number | undefined;
829
+ numberOfLiveCampaigns?: number | undefined;
830
+ opportunityLiveTags?: string[] | undefined;
831
+ name: string;
832
+ description: string;
833
+ id: string;
834
+ url: string;
835
+ icon: string;
836
+ tags: string[];
837
+ } | null | undefined;
838
+ depositUrl?: string | undefined;
839
+ aprRecord?: {
840
+ timestamp: string | bigint;
841
+ cumulated: number;
842
+ breakdowns: {
843
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
844
+ value: number;
845
+ type: "TOKEN" | "CAMPAIGN" | "PROTOCOL";
846
+ identifier: string;
847
+ }[];
848
+ } | undefined;
849
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
850
+ explorerAddress?: string | undefined;
851
+ tvlRecord?: {
852
+ timestamp: string | bigint;
853
+ total: number;
854
+ breakdowns: {
855
+ value: number;
856
+ type: "TOKEN" | "PROTOCOL";
857
+ identifier: string;
858
+ }[];
859
+ } | undefined;
860
+ rewardsRecord?: {
861
+ timestamp: string | bigint;
862
+ total: number;
863
+ breakdowns: {
864
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
865
+ token: {
866
+ price?: number | null | undefined;
867
+ symbol: string;
868
+ name: string | null;
869
+ decimals: number;
870
+ address: string;
871
+ id: string;
872
+ chainId: number;
873
+ type: "TOKEN" | "PRETGE" | "POINT";
874
+ icon: string;
875
+ isNative: boolean;
876
+ isTest: boolean;
877
+ verified: boolean;
878
+ };
879
+ campaignId: string;
880
+ value: number;
881
+ amount: string | bigint;
882
+ }[];
883
+ } | undefined;
884
+ name: string;
885
+ apr: number;
886
+ tokens: {
887
+ price?: number | null | undefined;
888
+ symbol: string;
889
+ name: string | null;
890
+ decimals: number;
891
+ address: string;
892
+ id: string;
893
+ chainId: number;
894
+ type: "TOKEN" | "PRETGE" | "POINT";
895
+ icon: string;
896
+ isNative: boolean;
897
+ isTest: boolean;
898
+ verified: boolean;
899
+ }[];
900
+ tvl: number;
901
+ description: string;
902
+ id: string;
903
+ status: string;
904
+ chainId: number;
905
+ action: string;
906
+ type: string;
907
+ chain: {
908
+ explorers?: {
909
+ chainId: number;
910
+ type: "ETHERSCAN" | "BLOCKSCOUT";
911
+ url: string;
912
+ }[] | undefined;
913
+ name: string;
914
+ id: number;
915
+ icon: string;
916
+ };
917
+ identifier: string;
918
+ howToSteps: string[];
919
+ dailyRewards: number;
920
+ tags: string[];
921
+ lastCampaignCreatedAt: number;
922
+ } | null)[];
678
923
  422: {
679
924
  type: "validation";
680
925
  on: string;
@@ -720,6 +965,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
720
965
  minimumApr?: number | undefined;
721
966
  maximumApr?: number | undefined;
722
967
  rewardTokenSymbol?: string | undefined;
968
+ distributionTypes?: ("DUTCH_AUCTION" | "FIX_REWARD" | "MAX_REWARD")[] | undefined;
723
969
  };
724
970
  headers: unknown;
725
971
  response: {
@@ -771,6 +1017,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
771
1017
  minimumApr?: number | undefined;
772
1018
  maximumApr?: number | undefined;
773
1019
  rewardTokenSymbol?: string | undefined;
1020
+ distributionTypes?: ("DUTCH_AUCTION" | "FIX_REWARD" | "MAX_REWARD")[] | undefined;
774
1021
  };
775
1022
  headers: unknown;
776
1023
  response: {
@@ -829,6 +1076,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
829
1076
  minimumApr?: number | undefined;
830
1077
  maximumApr?: number | undefined;
831
1078
  rewardTokenSymbol?: string | undefined;
1079
+ distributionTypes?: ("DUTCH_AUCTION" | "FIX_REWARD" | "MAX_REWARD")[] | undefined;
832
1080
  };
833
1081
  headers: unknown;
834
1082
  response: {
@@ -889,6 +1137,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
889
1137
  minimumApr?: number | undefined;
890
1138
  maximumApr?: number | undefined;
891
1139
  rewardTokenSymbol?: string | undefined;
1140
+ distributionTypes?: ("DUTCH_AUCTION" | "FIX_REWARD" | "MAX_REWARD")[] | undefined;
892
1141
  };
893
1142
  headers: unknown;
894
1143
  response: {
@@ -946,6 +1195,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
946
1195
  minimumApr?: number | undefined;
947
1196
  maximumApr?: number | undefined;
948
1197
  rewardTokenSymbol?: string | undefined;
1198
+ distributionTypes?: ("DUTCH_AUCTION" | "FIX_REWARD" | "MAX_REWARD")[] | undefined;
949
1199
  };
950
1200
  headers: unknown;
951
1201
  response: {
@@ -1004,6 +1254,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
1004
1254
  minimumApr?: number | undefined;
1005
1255
  maximumApr?: number | undefined;
1006
1256
  rewardTokenSymbol?: string | undefined;
1257
+ distributionTypes?: ("DUTCH_AUCTION" | "FIX_REWARD" | "MAX_REWARD")[] | undefined;
1007
1258
  };
1008
1259
  headers: unknown;
1009
1260
  response: {
@@ -9,7 +9,7 @@ import { type Token } from "../../../modules/v4/token/token.model";
9
9
  import { type TvlRecord } from "../../../modules/v4/tvl/tvl.model";
10
10
  import type { OpportunityRepository } from "./opportunity.repository";
11
11
  /**
12
- * Opportunity
12
+ * Light Opportunity
13
13
  * @description Target description of rewards campaigns
14
14
  * @see {@link ResourceAPI}
15
15
  */
@@ -27,10 +27,10 @@ export type OpportunityLight = ResourceAPI<"Opportunity", "manualOverrides" | "m
27
27
  export type Opportunity = ResourceAPI<"Opportunity", "manualOverrides" | "mainProtocolId", {
28
28
  depositUrl?: string;
29
29
  explorerAddress?: string;
30
+ lastCampaignCreatedAt: number;
30
31
  mainProtocolId?: string;
31
32
  chain: Chain["model"];
32
33
  tokens: Token["model"][];
33
- lastCampaignCreatedAt: number;
34
34
  protocol?: Protocol["model"];
35
35
  aprRecord?: AprRecord["model"];
36
36
  tvlRecord?: TvlRecord["model"];
@@ -425,10 +425,7 @@ export declare const OpportunityUniqueUpdateDto: import("@sinclair/typebox").TOb
425
425
  id: import("@sinclair/typebox").TString;
426
426
  campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
427
427
  }>;
428
- export declare const AggregationResourceDto: import("@sinclair/typebox").TObject<{
429
- sum: import("@sinclair/typebox").TNumber;
430
- }>;
431
- export declare const GetOpportunitiesQueryDto: import("@sinclair/typebox").TObject<{
428
+ export declare const FindManyOpportunityDto: import("@sinclair/typebox").TObject<{
432
429
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
433
430
  search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
434
431
  campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -455,6 +452,11 @@ export declare const GetOpportunitiesQueryDto: import("@sinclair/typebox").TObje
455
452
  rewardTokenSymbol: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
456
453
  sort: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
457
454
  order: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
455
+ distributionTypes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TEnum<{
456
+ FIX_REWARD: "FIX_REWARD";
457
+ MAX_REWARD: "MAX_REWARD";
458
+ DUTCH_AUCTION: "DUTCH_AUCTION";
459
+ }>>>;
458
460
  mainProtocolId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
459
461
  excludeSubCampaigns: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
460
462
  page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
@@ -508,9 +510,6 @@ export declare const CreateOpportunityDto: import("@sinclair/typebox").TObject<{
508
510
  export declare const OpportunityAggregateFieldDto: import("@sinclair/typebox").TObject<{
509
511
  field: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"apr" | "tvl" | "dailyRewards">[]>;
510
512
  }>;
511
- export declare const OpportunityIdDto: import("@sinclair/typebox").TObject<{
512
- id: import("@sinclair/typebox").TString;
513
- }>;
514
513
  export declare const OpportunityOverrideDto: import("@sinclair/typebox").TObject<{
515
514
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
516
515
  description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -542,7 +541,7 @@ export declare const OpportunityDeleteOverrideDto: import("@sinclair/typebox").T
542
541
  export declare const UpdateOpportunityDto: import("@sinclair/typebox").TObject<{
543
542
  tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
544
543
  }>;
545
- export type GetOpportunitiesQueryModel = typeof GetOpportunitiesQueryDto.static;
544
+ export type FindManyOpportunityModel = typeof FindManyOpportunityDto.static;
546
545
  export type FindOpportunityModel = typeof FindOpportunityDto.static;
547
546
  export type CreateOpportunityModel = typeof CreateOpportunityDto.static;
548
547
  export type OpportunityAggregateField = typeof OpportunityAggregateFieldDto.static;
@@ -5,7 +5,7 @@ import type { AprRecord } from "../../../modules/v4/apr/apr.model";
5
5
  import type { Campaign } from "../../../modules/v4/campaign/campaign.model";
6
6
  import type { DailyRewardsRecord } from "../../../modules/v4/reward/reward.model";
7
7
  import type { TvlRecord } from "../../../modules/v4/tvl/tvl.model";
8
- import type { CreateOpportunityModel, FindOpportunityModel, GetOpportunitiesQueryModel, Opportunity } from "./opportunity.model";
8
+ import type { CreateOpportunityModel, FindManyOpportunityModel, FindOpportunityModel, Opportunity } from "./opportunity.model";
9
9
  export declare abstract class OpportunityRepository {
10
10
  #private;
11
11
  static create(newOpp: CreateOpportunityModel & {
@@ -564,7 +564,7 @@ export declare abstract class OpportunityRepository {
564
564
  tags: string[];
565
565
  lastCampaignCreatedAt: Date;
566
566
  })[]>;
567
- static findMany(query: GetOpportunitiesQueryModel): Promise<({
567
+ static findMany(query: FindManyOpportunityModel): Promise<({
568
568
  Chain: {
569
569
  Explorer: {
570
570
  id: string;
@@ -717,7 +717,7 @@ export declare abstract class OpportunityRepository {
717
717
  tags: string[];
718
718
  lastCampaignCreatedAt: Date;
719
719
  })[]>;
720
- static countMany(query: GetOpportunitiesQueryModel): Promise<number>;
720
+ static countMany(query: FindManyOpportunityModel): Promise<number>;
721
721
  /**
722
722
  * @dev Live campaigns here can be:
723
723
  * 1. Opportunities with status LIVE
@@ -1027,13 +1027,13 @@ export declare abstract class OpportunityRepository {
1027
1027
  lastCampaignCreatedAt: Date;
1028
1028
  }>;
1029
1029
  static updateMany(ids: string[], data: Partial<Opportunity["raw"]>): Promise<Prisma.BatchPayload>;
1030
- static aggregateSum(field: keyof Prisma.OpportunitySumAggregateInputType, query: GetOpportunitiesQueryModel): Promise<{
1030
+ static aggregateSum(field: keyof Prisma.OpportunitySumAggregateInputType, query: FindManyOpportunityModel): Promise<{
1031
1031
  sum: string;
1032
1032
  }>;
1033
- static aggregateMin(field: keyof Prisma.OpportunityMinAggregateInputType, query: GetOpportunitiesQueryModel): Promise<{
1033
+ static aggregateMin(field: keyof Prisma.OpportunityMinAggregateInputType, query: FindManyOpportunityModel): Promise<{
1034
1034
  min: string;
1035
1035
  }>;
1036
- static aggregateMax(field: keyof Prisma.OpportunityMaxAggregateInputType, query: GetOpportunitiesQueryModel): Promise<{
1036
+ static aggregateMax(field: keyof Prisma.OpportunityMaxAggregateInputType, query: FindManyOpportunityModel): Promise<{
1037
1037
  max: string;
1038
1038
  }>;
1039
1039
  }
@@ -1,9 +1,9 @@
1
1
  import { type MerklChainId } from "@angleprotocol/sdk/ts";
2
- import { type OpportunityAction, type OpportunityManualOverride, type Prisma, TokenType } from "@package/databases/api";
2
+ import { DistributionType, type OpportunityAction, type OpportunityManualOverride, type Prisma, TokenType } from "@package/databases/api";
3
3
  import type { CampaignWithParams, FindCampaignModel } from "../../../modules/v4/campaign/campaign.model";
4
4
  import type { Protocol } from "../protocol/protocol.model";
5
5
  import type { Token } from "../token/token.model";
6
- import type { FindOpportunityModel, GetOpportunitiesQueryModel, Opportunity, OpportunityOverrideModel, OpportunityResourceModel, OpportunityUnique } from "./opportunity.model";
6
+ import type { FindManyOpportunityModel, FindOpportunityModel, Opportunity, OpportunityOverrideModel, OpportunityResourceModel, OpportunityUnique } from "./opportunity.model";
7
7
  export declare abstract class OpportunityService {
8
8
  static transformQueryToTestAndTokenTypes(query: {
9
9
  tokenTypes?: TokenType[] | undefined;
@@ -13,15 +13,18 @@ export declare abstract class OpportunityService {
13
13
  tokenTypes: import("@package/databases").TokenType[] | undefined;
14
14
  test: boolean;
15
15
  };
16
+ static transformQueryToDistributionTypes(query: {
17
+ distributionTypes?: FindManyOpportunityModel["distributionTypes"];
18
+ }): DistributionType[] | undefined;
16
19
  static hashId(opportunity: OpportunityUnique): string;
17
- static getAprBins(query: GetOpportunitiesQueryModel): Promise<{
20
+ static getAprBins(query: FindManyOpportunityModel): Promise<{
18
21
  data: {
19
22
  count: any;
20
23
  min: number;
21
24
  max: number;
22
25
  }[];
23
26
  }>;
24
- static getTvlBins(query: GetOpportunitiesQueryModel): Promise<{
27
+ static getTvlBins(query: FindManyOpportunityModel): Promise<{
25
28
  data: {
26
29
  count: any;
27
30
  min: number;
@@ -455,7 +458,7 @@ export declare abstract class OpportunityService {
455
458
  * @param query
456
459
  * @returns A list of opportunities
457
460
  */
458
- static findMany(query: GetOpportunitiesQueryModel): Promise<{
461
+ static findMany(query: FindManyOpportunityModel): Promise<{
459
462
  aprRecord: {
460
463
  cumulated: number;
461
464
  timestamp: bigint;
@@ -562,7 +565,7 @@ export declare abstract class OpportunityService {
562
565
  * @param query
563
566
  * @returns the number of opportunities
564
567
  */
565
- static countMany(query: GetOpportunitiesQueryModel): Promise<number>;
568
+ static countMany(query: FindManyOpportunityModel): Promise<number>;
566
569
  static findLiveWithCampaigns(chainId: MerklChainId, take?: number): Promise<{
567
570
  aprRecord: {
568
571
  cumulated: number;
@@ -664,13 +667,13 @@ export declare abstract class OpportunityService {
664
667
  dailyRewards: number;
665
668
  tags: string[];
666
669
  }[]>;
667
- static aggregate(query: GetOpportunitiesQueryModel, field: keyof Prisma.OpportunitySumAggregateInputType): Promise<{
670
+ static aggregate(query: FindManyOpportunityModel, field: keyof Prisma.OpportunitySumAggregateInputType): Promise<{
668
671
  sum: string;
669
672
  }>;
670
- static aggregateMin(query: GetOpportunitiesQueryModel, field: keyof Prisma.OpportunityMinAggregateInputType): Promise<{
673
+ static aggregateMin(query: FindManyOpportunityModel, field: keyof Prisma.OpportunityMinAggregateInputType): Promise<{
671
674
  min: string;
672
675
  }>;
673
- static aggregateMax(query: GetOpportunitiesQueryModel, field: keyof Prisma.OpportunityMaxAggregateInputType): Promise<{
676
+ static aggregateMax(query: FindManyOpportunityModel, field: keyof Prisma.OpportunityMaxAggregateInputType): Promise<{
674
677
  max: string;
675
678
  }>;
676
679
  static update(id: string, data: Partial<Opportunity["raw"]>): Promise<{
@@ -1,6 +1,6 @@
1
1
  import { Campaign as CampaignType, type ChainId, type campaignConfig } from "@angleprotocol/sdk/ts";
2
2
  import { type OnChainCampaignDto } from "@angleprotocol/sdk/ts";
3
- import type { TransactionParametersModel } from "../campaign/campaign.model";
3
+ import type { TransactionParametersModel } from "../transaction/transaction.model";
4
4
  import type { CampaignPayloadInputModel, SafeFileModel, SinglePayloadInputModel } from "./payload.model";
5
5
  export declare class PayloadService {
6
6
  static buildConfigTemplate(params: {