@merkl/api 0.20.167 → 0.20.169

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/database/index.js +1 -1
  2. package/dist/src/eden/index.d.ts +300 -56
  3. package/dist/src/engine/deprecated/dynamicData/factory.js +3 -1
  4. package/dist/src/engine/metadata/factory.js +2 -0
  5. package/dist/src/index.d.ts +112 -18
  6. package/dist/src/jobs/update-analytics.js +79 -75
  7. package/dist/src/modules/v4/apr/apr.model.d.ts +2 -6
  8. package/dist/src/modules/v4/apr/apr.model.js +1 -3
  9. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +25 -0
  10. package/dist/src/modules/v4/campaign/campaign.controller.js +8 -1
  11. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +16 -0
  12. package/dist/src/modules/v4/campaign/campaign.repository.js +18 -0
  13. package/dist/src/modules/v4/campaign/campaign.service.d.ts +10 -0
  14. package/dist/src/modules/v4/campaign/campaign.service.js +7 -0
  15. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +87 -18
  16. package/dist/src/modules/v4/opportunity/opportunity.controller.js +8 -2
  17. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +4 -12
  18. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +0 -20
  19. package/dist/src/modules/v4/opportunity/opportunity.repository.js +10 -2
  20. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +14 -27
  21. package/dist/src/modules/v4/opportunity/opportunity.service.js +62 -1
  22. package/dist/src/modules/v4/programPayload/programPayload.service.js +3 -0
  23. package/dist/src/modules/v4/reward/reward.controller.js +1 -1
  24. package/dist/src/modules/v4/reward/reward.service.d.ts +1 -7
  25. package/dist/src/modules/v4/reward/reward.service.js +1 -1
  26. package/dist/src/modules/v4/router.d.ts +112 -18
  27. package/dist/src/modules/v4/token/token.controller.js +6 -1
  28. package/dist/src/modules/v4/tvl/tvl.model.d.ts +2 -6
  29. package/dist/src/modules/v4/tvl/tvl.model.js +1 -3
  30. package/dist/tsconfig.package.tsbuildinfo +1 -1
  31. package/package.json +1 -1
@@ -4,7 +4,7 @@ import { drizzle } from "drizzle-orm/prisma/pg";
4
4
  export const apiDbClient = new ApiPrismaClient({
5
5
  datasources: {
6
6
  db: {
7
- url: `${process.env.DATABASE_API_URL}&connection_limit=${!!process.env.BACKOFFICE_SECRET ? "300" : "25"}&pool_timeout=60`,
7
+ url: `${process.env.DATABASE_API_URL}&connection_limit=${!!process.env.BACKOFFICE_SECRET ? "300" : "20"}&pool_timeout=60`,
8
8
  },
9
9
  },
10
10
  }).$extends(drizzle());
@@ -1,4 +1,4 @@
1
- import type { Campaign as CampaignResource, CampaignWithParams } from "@/modules/v4/campaign/campaign.model";
1
+ import type { CampaignWithParams } from "@/modules/v4/campaign/campaign.model";
2
2
  import type { Campaign as CampaignType } from "@sdk";
3
3
  declare const eden: {
4
4
  derive: {};
@@ -329,10 +329,8 @@ declare const eden: {
329
329
  cumulated: number;
330
330
  breakdowns: {
331
331
  type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
332
- id: string;
333
332
  identifier: string;
334
333
  value: number;
335
- aprRecordId: string;
336
334
  }[];
337
335
  } | undefined;
338
336
  tvlRecord?: {
@@ -340,10 +338,8 @@ declare const eden: {
340
338
  timestamp: string | bigint;
341
339
  breakdowns: {
342
340
  type: "TOKEN" | "PROTOCOL";
343
- id: string;
344
341
  identifier: string;
345
342
  value: number;
346
- tvlRecordId: string;
347
343
  }[];
348
344
  } | undefined;
349
345
  rewardsRecord?: {
@@ -442,10 +438,8 @@ declare const eden: {
442
438
  cumulated: number;
443
439
  breakdowns: {
444
440
  type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
445
- id: string;
446
441
  identifier: string;
447
442
  value: number;
448
- aprRecordId: string;
449
443
  }[];
450
444
  } | undefined;
451
445
  tvlRecord?: {
@@ -453,10 +447,8 @@ declare const eden: {
453
447
  timestamp: string | bigint;
454
448
  breakdowns: {
455
449
  type: "TOKEN" | "PROTOCOL";
456
- id: string;
457
450
  identifier: string;
458
451
  value: number;
459
- tvlRecordId: string;
460
452
  }[];
461
453
  } | undefined;
462
454
  rewardsRecord?: {
@@ -689,16 +681,12 @@ declare const eden: {
689
681
  cumulated: number;
690
682
  timestamp: bigint;
691
683
  breakdowns: ({
692
- id: string;
693
684
  value: number;
694
- aprRecordId: string;
695
685
  distributionType: import("@db/api").$Enums.DistributionType;
696
686
  identifier: string;
697
687
  type: "CAMPAIGN";
698
688
  } | {
699
- id: string;
700
689
  value: number;
701
- aprRecordId: string;
702
690
  identifier: string;
703
691
  type: import("@db/api").$Enums.AprType;
704
692
  })[];
@@ -709,10 +697,8 @@ declare const eden: {
709
697
  timestamp: bigint;
710
698
  breakdowns: {
711
699
  type: import("@db/api").$Enums.TvlType;
712
- id: string;
713
700
  identifier: string;
714
701
  value: number;
715
- tvlRecordId: string;
716
702
  }[];
717
703
  };
718
704
  rewardsRecord: {
@@ -899,6 +885,81 @@ declare const eden: {
899
885
  200: number;
900
886
  }>>;
901
887
  };
888
+ bins: {
889
+ apr: {
890
+ get: (options: {
891
+ headers?: Record<string, unknown> | undefined;
892
+ query: {
893
+ status?: string | undefined;
894
+ search?: string | undefined;
895
+ sort?: string | undefined;
896
+ type?: string | undefined;
897
+ name?: string | undefined;
898
+ tokens?: string | undefined;
899
+ items?: number | undefined;
900
+ tags?: string | undefined;
901
+ identifier?: string | undefined;
902
+ page?: number | undefined;
903
+ action?: string | undefined;
904
+ campaignId?: string | undefined;
905
+ creatorAddress?: string | undefined;
906
+ chainId?: string | undefined;
907
+ mainProtocolId?: string | undefined;
908
+ campaigns?: boolean | undefined;
909
+ point?: boolean | undefined;
910
+ rewardTokenSymbol?: string | undefined;
911
+ order?: string | undefined;
912
+ test?: boolean | undefined;
913
+ minimumTvl?: number | undefined;
914
+ };
915
+ fetch?: RequestInit | undefined;
916
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
917
+ 200: {
918
+ min: number;
919
+ max: number;
920
+ overThreshold: number;
921
+ binWidth: number;
922
+ bins: any[];
923
+ };
924
+ }>>;
925
+ };
926
+ tvl: {
927
+ get: (options: {
928
+ headers?: Record<string, unknown> | undefined;
929
+ query: {
930
+ status?: string | undefined;
931
+ search?: string | undefined;
932
+ sort?: string | undefined;
933
+ type?: string | undefined;
934
+ name?: string | undefined;
935
+ tokens?: string | undefined;
936
+ items?: number | undefined;
937
+ tags?: string | undefined;
938
+ identifier?: string | undefined;
939
+ page?: number | undefined;
940
+ action?: string | undefined;
941
+ campaignId?: string | undefined;
942
+ creatorAddress?: string | undefined;
943
+ chainId?: string | undefined;
944
+ mainProtocolId?: string | undefined;
945
+ campaigns?: boolean | undefined;
946
+ point?: boolean | undefined;
947
+ rewardTokenSymbol?: string | undefined;
948
+ order?: string | undefined;
949
+ test?: boolean | undefined;
950
+ minimumTvl?: number | undefined;
951
+ };
952
+ fetch?: RequestInit | undefined;
953
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
954
+ 200: {
955
+ min: number;
956
+ max: number;
957
+ binWidth: number;
958
+ bins: any[];
959
+ };
960
+ }>>;
961
+ };
962
+ };
902
963
  campaigns: {
903
964
  get: (options: {
904
965
  headers?: Record<string, unknown> | undefined;
@@ -945,10 +1006,8 @@ declare const eden: {
945
1006
  cumulated: number;
946
1007
  breakdowns: {
947
1008
  type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
948
- id: string;
949
1009
  identifier: string;
950
1010
  value: number;
951
- aprRecordId: string;
952
1011
  }[];
953
1012
  } | undefined;
954
1013
  tvlRecord?: {
@@ -956,10 +1015,8 @@ declare const eden: {
956
1015
  timestamp: string | bigint;
957
1016
  breakdowns: {
958
1017
  type: "TOKEN" | "PROTOCOL";
959
- id: string;
960
1018
  identifier: string;
961
1019
  value: number;
962
- tvlRecordId: string;
963
1020
  }[];
964
1021
  } | undefined;
965
1022
  rewardsRecord?: {
@@ -1280,6 +1337,24 @@ declare const eden: {
1280
1337
  opportunityId: string;
1281
1338
  };
1282
1339
  }>>;
1340
+ timeseries: {
1341
+ get: (options?: {
1342
+ headers?: Record<string, unknown> | undefined;
1343
+ query?: Record<string, unknown> | undefined;
1344
+ fetch?: RequestInit | undefined;
1345
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1346
+ 200: {
1347
+ tvlRecords: {
1348
+ total: number;
1349
+ timestamp: bigint;
1350
+ }[];
1351
+ aprRecords: {
1352
+ timestamp: bigint;
1353
+ cumulated: number;
1354
+ }[];
1355
+ };
1356
+ }>>;
1357
+ };
1283
1358
  }) & {
1284
1359
  engine: {
1285
1360
  post: (body: {
@@ -5781,16 +5856,12 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5781
5856
  cumulated: number;
5782
5857
  timestamp: bigint;
5783
5858
  breakdowns: ({
5784
- id: string;
5785
5859
  value: number;
5786
- aprRecordId: string;
5787
5860
  distributionType: import("@db/api").$Enums.DistributionType;
5788
5861
  identifier: string;
5789
5862
  type: "CAMPAIGN";
5790
5863
  } | {
5791
- id: string;
5792
5864
  value: number;
5793
- aprRecordId: string;
5794
5865
  identifier: string;
5795
5866
  type: import("@db/api").$Enums.AprType;
5796
5867
  })[];
@@ -5801,10 +5872,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5801
5872
  timestamp: bigint;
5802
5873
  breakdowns: {
5803
5874
  type: import("@db/api").$Enums.TvlType;
5804
- id: string;
5805
5875
  identifier: string;
5806
5876
  value: number;
5807
- tvlRecordId: string;
5808
5877
  }[];
5809
5878
  };
5810
5879
  rewardsRecord: {
@@ -5998,6 +6067,93 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5998
6067
  };
5999
6068
  };
6000
6069
  };
6070
+ } & {
6071
+ opportunities: {
6072
+ bins: {
6073
+ apr: {
6074
+ get: {
6075
+ body: unknown;
6076
+ params: {};
6077
+ query: {
6078
+ status?: string | undefined;
6079
+ search?: string | undefined;
6080
+ sort?: string | undefined;
6081
+ type?: string | undefined;
6082
+ name?: string | undefined;
6083
+ tokens?: string | undefined;
6084
+ items?: number | undefined;
6085
+ tags?: string | undefined;
6086
+ identifier?: string | undefined;
6087
+ page?: number | undefined;
6088
+ action?: string | undefined;
6089
+ campaignId?: string | undefined;
6090
+ creatorAddress?: string | undefined;
6091
+ chainId?: string | undefined;
6092
+ mainProtocolId?: string | undefined;
6093
+ campaigns?: boolean | undefined;
6094
+ point?: boolean | undefined;
6095
+ rewardTokenSymbol?: string | undefined;
6096
+ order?: string | undefined;
6097
+ test?: boolean | undefined;
6098
+ minimumTvl?: number | undefined;
6099
+ };
6100
+ headers: unknown;
6101
+ response: {
6102
+ 200: {
6103
+ min: number;
6104
+ max: number;
6105
+ overThreshold: number;
6106
+ binWidth: number;
6107
+ bins: any[];
6108
+ };
6109
+ };
6110
+ };
6111
+ };
6112
+ };
6113
+ };
6114
+ } & {
6115
+ opportunities: {
6116
+ bins: {
6117
+ tvl: {
6118
+ get: {
6119
+ body: unknown;
6120
+ params: {};
6121
+ query: {
6122
+ status?: string | undefined;
6123
+ search?: string | undefined;
6124
+ sort?: string | undefined;
6125
+ type?: string | undefined;
6126
+ name?: string | undefined;
6127
+ tokens?: string | undefined;
6128
+ items?: number | undefined;
6129
+ tags?: string | undefined;
6130
+ identifier?: string | undefined;
6131
+ page?: number | undefined;
6132
+ action?: string | undefined;
6133
+ campaignId?: string | undefined;
6134
+ creatorAddress?: string | undefined;
6135
+ chainId?: string | undefined;
6136
+ mainProtocolId?: string | undefined;
6137
+ campaigns?: boolean | undefined;
6138
+ point?: boolean | undefined;
6139
+ rewardTokenSymbol?: string | undefined;
6140
+ order?: string | undefined;
6141
+ test?: boolean | undefined;
6142
+ minimumTvl?: number | undefined;
6143
+ };
6144
+ headers: unknown;
6145
+ response: {
6146
+ 200: {
6147
+ min: number;
6148
+ max: number;
6149
+ binWidth: number;
6150
+ bins: any[];
6151
+ };
6152
+ };
6153
+ };
6154
+ };
6155
+ };
6156
+ };
6001
6157
  } & {
6002
6158
  opportunities: {
6003
6159
  ":id": {
@@ -6029,10 +6185,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6029
6185
  cumulated: number;
6030
6186
  breakdowns: {
6031
6187
  type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
6032
- id: string;
6033
6188
  identifier: string;
6034
6189
  value: number;
6035
- aprRecordId: string;
6036
6190
  }[];
6037
6191
  } | undefined;
6038
6192
  tvlRecord?: {
@@ -6040,10 +6194,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6040
6194
  timestamp: string | bigint;
6041
6195
  breakdowns: {
6042
6196
  type: "TOKEN" | "PROTOCOL";
6043
- id: string;
6044
6197
  identifier: string;
6045
6198
  value: number;
6046
- tvlRecordId: string;
6047
6199
  }[];
6048
6200
  } | undefined;
6049
6201
  rewardsRecord?: {
@@ -6168,10 +6320,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6168
6320
  cumulated: number;
6169
6321
  breakdowns: {
6170
6322
  type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
6171
- id: string;
6172
6323
  identifier: string;
6173
6324
  value: number;
6174
- aprRecordId: string;
6175
6325
  }[];
6176
6326
  } | undefined;
6177
6327
  tvlRecord?: {
@@ -6179,10 +6329,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6179
6329
  timestamp: string | bigint;
6180
6330
  breakdowns: {
6181
6331
  type: "TOKEN" | "PROTOCOL";
6182
- id: string;
6183
6332
  identifier: string;
6184
6333
  value: number;
6185
- tvlRecordId: string;
6186
6334
  }[];
6187
6335
  } | undefined;
6188
6336
  rewardsRecord?: {
@@ -6344,10 +6492,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6344
6492
  cumulated: number;
6345
6493
  breakdowns: {
6346
6494
  type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
6347
- id: string;
6348
6495
  identifier: string;
6349
6496
  value: number;
6350
- aprRecordId: string;
6351
6497
  }[];
6352
6498
  } | undefined;
6353
6499
  tvlRecord?: {
@@ -6355,10 +6501,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6355
6501
  timestamp: string | bigint;
6356
6502
  breakdowns: {
6357
6503
  type: "TOKEN" | "PROTOCOL";
6358
- id: string;
6359
6504
  identifier: string;
6360
6505
  value: number;
6361
- tvlRecordId: string;
6362
6506
  }[];
6363
6507
  } | undefined;
6364
6508
  rewardsRecord?: {
@@ -7051,6 +7195,31 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
7051
7195
  };
7052
7196
  };
7053
7197
  };
7198
+ } & {
7199
+ ":id": {
7200
+ timeseries: {
7201
+ get: {
7202
+ body: unknown;
7203
+ params: {
7204
+ id: string;
7205
+ };
7206
+ query: unknown;
7207
+ headers: unknown;
7208
+ response: {
7209
+ 200: {
7210
+ tvlRecords: {
7211
+ total: number;
7212
+ timestamp: bigint;
7213
+ }[];
7214
+ aprRecords: {
7215
+ timestamp: bigint;
7216
+ cumulated: number;
7217
+ }[];
7218
+ };
7219
+ };
7220
+ };
7221
+ };
7222
+ };
7054
7223
  } & {
7055
7224
  "campaigns-to-process": {
7056
7225
  index: {
@@ -12129,10 +12298,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12129
12298
  cumulated: number;
12130
12299
  breakdowns: {
12131
12300
  type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
12132
- id: string;
12133
12301
  identifier: string;
12134
12302
  value: number;
12135
- aprRecordId: string;
12136
12303
  }[];
12137
12304
  } | undefined;
12138
12305
  tvlRecord?: {
@@ -12140,10 +12307,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12140
12307
  timestamp: string | bigint;
12141
12308
  breakdowns: {
12142
12309
  type: "TOKEN" | "PROTOCOL";
12143
- id: string;
12144
12310
  identifier: string;
12145
12311
  value: number;
12146
- tvlRecordId: string;
12147
12312
  }[];
12148
12313
  } | undefined;
12149
12314
  rewardsRecord?: {
@@ -12242,10 +12407,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12242
12407
  cumulated: number;
12243
12408
  breakdowns: {
12244
12409
  type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
12245
- id: string;
12246
12410
  identifier: string;
12247
12411
  value: number;
12248
- aprRecordId: string;
12249
12412
  }[];
12250
12413
  } | undefined;
12251
12414
  tvlRecord?: {
@@ -12253,10 +12416,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12253
12416
  timestamp: string | bigint;
12254
12417
  breakdowns: {
12255
12418
  type: "TOKEN" | "PROTOCOL";
12256
- id: string;
12257
12419
  identifier: string;
12258
12420
  value: number;
12259
- tvlRecordId: string;
12260
12421
  }[];
12261
12422
  } | undefined;
12262
12423
  rewardsRecord?: {
@@ -12489,16 +12650,12 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12489
12650
  cumulated: number;
12490
12651
  timestamp: bigint;
12491
12652
  breakdowns: ({
12492
- id: string;
12493
12653
  value: number;
12494
- aprRecordId: string;
12495
12654
  distributionType: import("@db/api").$Enums.DistributionType;
12496
12655
  identifier: string;
12497
12656
  type: "CAMPAIGN";
12498
12657
  } | {
12499
- id: string;
12500
12658
  value: number;
12501
- aprRecordId: string;
12502
12659
  identifier: string;
12503
12660
  type: import("@db/api").$Enums.AprType;
12504
12661
  })[];
@@ -12509,10 +12666,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12509
12666
  timestamp: bigint;
12510
12667
  breakdowns: {
12511
12668
  type: import("@db/api").$Enums.TvlType;
12512
- id: string;
12513
12669
  identifier: string;
12514
12670
  value: number;
12515
- tvlRecordId: string;
12516
12671
  }[];
12517
12672
  };
12518
12673
  rewardsRecord: {
@@ -12699,6 +12854,81 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12699
12854
  200: number;
12700
12855
  }>>;
12701
12856
  };
12857
+ bins: {
12858
+ apr: {
12859
+ get: (options: {
12860
+ headers?: Record<string, unknown> | undefined;
12861
+ query: {
12862
+ status?: string | undefined;
12863
+ search?: string | undefined;
12864
+ sort?: string | undefined;
12865
+ type?: string | undefined;
12866
+ name?: string | undefined;
12867
+ tokens?: string | undefined;
12868
+ items?: number | undefined;
12869
+ tags?: string | undefined;
12870
+ identifier?: string | undefined;
12871
+ page?: number | undefined;
12872
+ action?: string | undefined;
12873
+ campaignId?: string | undefined;
12874
+ creatorAddress?: string | undefined;
12875
+ chainId?: string | undefined;
12876
+ mainProtocolId?: string | undefined;
12877
+ campaigns?: boolean | undefined;
12878
+ point?: boolean | undefined;
12879
+ rewardTokenSymbol?: string | undefined;
12880
+ order?: string | undefined;
12881
+ test?: boolean | undefined;
12882
+ minimumTvl?: number | undefined;
12883
+ };
12884
+ fetch?: RequestInit | undefined;
12885
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
12886
+ 200: {
12887
+ min: number;
12888
+ max: number;
12889
+ overThreshold: number;
12890
+ binWidth: number;
12891
+ bins: any[];
12892
+ };
12893
+ }>>;
12894
+ };
12895
+ tvl: {
12896
+ get: (options: {
12897
+ headers?: Record<string, unknown> | undefined;
12898
+ query: {
12899
+ status?: string | undefined;
12900
+ search?: string | undefined;
12901
+ sort?: string | undefined;
12902
+ type?: string | undefined;
12903
+ name?: string | undefined;
12904
+ tokens?: string | undefined;
12905
+ items?: number | undefined;
12906
+ tags?: string | undefined;
12907
+ identifier?: string | undefined;
12908
+ page?: number | undefined;
12909
+ action?: string | undefined;
12910
+ campaignId?: string | undefined;
12911
+ creatorAddress?: string | undefined;
12912
+ chainId?: string | undefined;
12913
+ mainProtocolId?: string | undefined;
12914
+ campaigns?: boolean | undefined;
12915
+ point?: boolean | undefined;
12916
+ rewardTokenSymbol?: string | undefined;
12917
+ order?: string | undefined;
12918
+ test?: boolean | undefined;
12919
+ minimumTvl?: number | undefined;
12920
+ };
12921
+ fetch?: RequestInit | undefined;
12922
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
12923
+ 200: {
12924
+ min: number;
12925
+ max: number;
12926
+ binWidth: number;
12927
+ bins: any[];
12928
+ };
12929
+ }>>;
12930
+ };
12931
+ };
12702
12932
  campaigns: {
12703
12933
  get: (options: {
12704
12934
  headers?: Record<string, unknown> | undefined;
@@ -12745,10 +12975,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12745
12975
  cumulated: number;
12746
12976
  breakdowns: {
12747
12977
  type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
12748
- id: string;
12749
12978
  identifier: string;
12750
12979
  value: number;
12751
- aprRecordId: string;
12752
12980
  }[];
12753
12981
  } | undefined;
12754
12982
  tvlRecord?: {
@@ -12756,10 +12984,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12756
12984
  timestamp: string | bigint;
12757
12985
  breakdowns: {
12758
12986
  type: "TOKEN" | "PROTOCOL";
12759
- id: string;
12760
12987
  identifier: string;
12761
12988
  value: number;
12762
- tvlRecordId: string;
12763
12989
  }[];
12764
12990
  } | undefined;
12765
12991
  rewardsRecord?: {
@@ -13080,6 +13306,24 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
13080
13306
  opportunityId: string;
13081
13307
  };
13082
13308
  }>>;
13309
+ timeseries: {
13310
+ get: (options?: {
13311
+ headers?: Record<string, unknown> | undefined;
13312
+ query?: Record<string, unknown> | undefined;
13313
+ fetch?: RequestInit | undefined;
13314
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
13315
+ 200: {
13316
+ tvlRecords: {
13317
+ total: number;
13318
+ timestamp: bigint;
13319
+ }[];
13320
+ aprRecords: {
13321
+ timestamp: bigint;
13322
+ cumulated: number;
13323
+ }[];
13324
+ };
13325
+ }>>;
13326
+ };
13083
13327
  }) & {
13084
13328
  engine: {
13085
13329
  post: (body: {
@@ -17073,7 +17317,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
17073
17317
  };
17074
17318
  export type Opportunity = FromPromise<Api["v4"]["opportunities"]["index"]["get"]>;
17075
17319
  export type Protocol = FromPromise<Api["v4"]["protocols"]["index"]["get"]>;
17076
- export type Campaign = CampaignResource["model"];
17320
+ export type Campaign = FromPromise<Api["v4"]["campaigns"]["index"]["get"]>;
17077
17321
  export type CampaignParams<C extends CampaignType> = CampaignWithParams<C>["params"];
17078
17322
  export type Chain = FromPromise<Api["v4"]["chains"]["index"]["get"]>;
17079
17323
  export type Explorer = FromPromise<Api["v4"]["chains"]["index"]["get"]>["explorers"][number];
@@ -62,6 +62,8 @@ const map = {
62
62
  [Campaign.ERC721]: new ERC721DynamicData(),
63
63
  [Campaign.ERC721FIXAPR]: new ERC721DynamicData(),
64
64
  [Campaign.MULTILOG]: new DefaultDynamicData(),
65
- [Campaign.LOCKER]: new DefaultDynamicData(),
65
+ [Campaign.LOCKER]: new DefaultDynamicData(), // TODO
66
+ [Campaign.CONVEX]: new DefaultDynamicData(), // TODO
67
+ [Campaign.CURVEVAULT]: new DefaultDynamicData(), // TODO
66
68
  };
67
69
  export const dynamicDataBuilderFactory = (campaignType) => map[campaignType];
@@ -70,5 +70,7 @@ const map = {
70
70
  [Campaign.ERC721FIXAPR]: new Erc721Metadata(),
71
71
  [Campaign.MULTILOG]: new MultiLogMetaData(),
72
72
  [Campaign.LOCKER]: new LockerMetadata(),
73
+ [Campaign.CONVEX]: new DefaultMetadata(), // TODO
74
+ [Campaign.CURVEVAULT]: new DefaultMetadata(), // TODO
73
75
  };
74
76
  export const metadataBuilderFactory = (campaignType) => map[campaignType];