@merkl/api 0.10.94 → 0.10.96

Sign up to get free protection for your applications and to get access to all the features.
@@ -567,6 +567,34 @@ declare const eden: {
567
567
  };
568
568
  };
569
569
  rewards: {
570
+ index: {
571
+ get: (options: {
572
+ headers?: Record<string, unknown> | undefined;
573
+ query: {
574
+ items?: number | undefined;
575
+ page?: number | undefined;
576
+ chainId: number;
577
+ campaignIds: string;
578
+ };
579
+ fetch?: RequestInit | undefined;
580
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
581
+ 200: unknown;
582
+ }>>;
583
+ };
584
+ total: {
585
+ get: (options: {
586
+ headers?: Record<string, unknown> | undefined;
587
+ query: {
588
+ items?: number | undefined;
589
+ page?: number | undefined;
590
+ chainId: number;
591
+ campaignIds: string;
592
+ };
593
+ fetch?: RequestInit | undefined;
594
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
595
+ 200: unknown;
596
+ }>>;
597
+ };
570
598
  engine: {
571
599
  post: (body: {
572
600
  recipient: string;
@@ -606,7 +634,7 @@ declare const eden: {
606
634
  query?: Record<string, unknown> | undefined;
607
635
  fetch?: RequestInit | undefined;
608
636
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
609
- 200: import("../../database/api/.generated").Prisma.BatchPayload;
637
+ 200: import("../../database/api/.generated").Prisma.BatchPayload | undefined;
610
638
  }>>;
611
639
  };
612
640
  };
@@ -654,28 +682,6 @@ declare const eden: {
654
682
  }>;
655
683
  }>>;
656
684
  };
657
- breakdown: {
658
- get: (options: {
659
- headers?: Record<string, unknown> | undefined;
660
- query: {
661
- items?: number | undefined;
662
- page?: number | undefined;
663
- chainId: number;
664
- campaignIdentifiers: string | string[];
665
- };
666
- fetch?: RequestInit | undefined;
667
- }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
668
- 200: {
669
- Campaign: {
670
- campaignId: string;
671
- };
672
- amount: string;
673
- Reward: {
674
- recipient: string;
675
- };
676
- }[];
677
- }>>;
678
- };
679
685
  };
680
686
  chains: ((params: {
681
687
  chainId: string | number;
@@ -2257,6 +2263,44 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
2257
2263
  };
2258
2264
  } & {
2259
2265
  v4: {
2266
+ rewards: {
2267
+ index: {
2268
+ get: {
2269
+ body: unknown;
2270
+ params: Record<never, string>;
2271
+ query: {
2272
+ items?: number | undefined;
2273
+ page?: number | undefined;
2274
+ chainId: number;
2275
+ campaignIds: string;
2276
+ };
2277
+ headers: unknown;
2278
+ response: {
2279
+ 200: unknown;
2280
+ };
2281
+ };
2282
+ };
2283
+ };
2284
+ } & {
2285
+ rewards: {
2286
+ total: {
2287
+ get: {
2288
+ body: unknown;
2289
+ params: Record<never, string>;
2290
+ query: {
2291
+ items?: number | undefined;
2292
+ page?: number | undefined;
2293
+ chainId: number;
2294
+ campaignIds: string;
2295
+ };
2296
+ headers: unknown;
2297
+ response: {
2298
+ 200: unknown;
2299
+ };
2300
+ };
2301
+ };
2302
+ };
2303
+ } & {
2260
2304
  rewards: {
2261
2305
  engine: {
2262
2306
  post: {
@@ -2305,7 +2349,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
2305
2349
  authorization: string;
2306
2350
  };
2307
2351
  response: {
2308
- 200: import("../../database/api/.generated").Prisma.BatchPayload;
2352
+ 200: import("../../database/api/.generated").Prisma.BatchPayload | undefined;
2309
2353
  };
2310
2354
  };
2311
2355
  };
@@ -2365,33 +2409,6 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
2365
2409
  };
2366
2410
  };
2367
2411
  };
2368
- } & {
2369
- rewards: {
2370
- breakdown: {
2371
- get: {
2372
- body: unknown;
2373
- params: Record<never, string>;
2374
- query: {
2375
- items?: number | undefined;
2376
- page?: number | undefined;
2377
- chainId: number;
2378
- campaignIdentifiers: string | string[];
2379
- };
2380
- headers: unknown;
2381
- response: {
2382
- 200: {
2383
- Campaign: {
2384
- campaignId: string;
2385
- };
2386
- amount: string;
2387
- Reward: {
2388
- recipient: string;
2389
- };
2390
- }[];
2391
- };
2392
- };
2393
- };
2394
- };
2395
2412
  };
2396
2413
  } & {
2397
2414
  v4: {
@@ -4126,6 +4143,34 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
4126
4143
  };
4127
4144
  };
4128
4145
  rewards: {
4146
+ index: {
4147
+ get: (options: {
4148
+ headers?: Record<string, unknown> | undefined;
4149
+ query: {
4150
+ items?: number | undefined;
4151
+ page?: number | undefined;
4152
+ chainId: number;
4153
+ campaignIds: string;
4154
+ };
4155
+ fetch?: RequestInit | undefined;
4156
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4157
+ 200: unknown;
4158
+ }>>;
4159
+ };
4160
+ total: {
4161
+ get: (options: {
4162
+ headers?: Record<string, unknown> | undefined;
4163
+ query: {
4164
+ items?: number | undefined;
4165
+ page?: number | undefined;
4166
+ chainId: number;
4167
+ campaignIds: string;
4168
+ };
4169
+ fetch?: RequestInit | undefined;
4170
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4171
+ 200: unknown;
4172
+ }>>;
4173
+ };
4129
4174
  engine: {
4130
4175
  post: (body: {
4131
4176
  recipient: string;
@@ -4165,7 +4210,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
4165
4210
  query?: Record<string, unknown> | undefined;
4166
4211
  fetch?: RequestInit | undefined;
4167
4212
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4168
- 200: import("../../database/api/.generated").Prisma.BatchPayload;
4213
+ 200: import("../../database/api/.generated").Prisma.BatchPayload | undefined;
4169
4214
  }>>;
4170
4215
  };
4171
4216
  };
@@ -4213,28 +4258,6 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
4213
4258
  }>;
4214
4259
  }>>;
4215
4260
  };
4216
- breakdown: {
4217
- get: (options: {
4218
- headers?: Record<string, unknown> | undefined;
4219
- query: {
4220
- items?: number | undefined;
4221
- page?: number | undefined;
4222
- chainId: number;
4223
- campaignIdentifiers: string | string[];
4224
- };
4225
- fetch?: RequestInit | undefined;
4226
- }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4227
- 200: {
4228
- Campaign: {
4229
- campaignId: string;
4230
- };
4231
- amount: string;
4232
- Reward: {
4233
- recipient: string;
4234
- };
4235
- }[];
4236
- }>>;
4237
- };
4238
4261
  };
4239
4262
  chains: ((params: {
4240
4263
  chainId: string | number;
@@ -676,6 +676,44 @@ declare const app: Elysia<"", false, {
676
676
  };
677
677
  } & {
678
678
  v4: {
679
+ rewards: {
680
+ index: {
681
+ get: {
682
+ body: unknown;
683
+ params: Record<never, string>;
684
+ query: {
685
+ items?: number | undefined;
686
+ page?: number | undefined;
687
+ chainId: number;
688
+ campaignIds: string;
689
+ };
690
+ headers: unknown;
691
+ response: {
692
+ 200: unknown;
693
+ };
694
+ };
695
+ };
696
+ };
697
+ } & {
698
+ rewards: {
699
+ total: {
700
+ get: {
701
+ body: unknown;
702
+ params: Record<never, string>;
703
+ query: {
704
+ items?: number | undefined;
705
+ page?: number | undefined;
706
+ chainId: number;
707
+ campaignIds: string;
708
+ };
709
+ headers: unknown;
710
+ response: {
711
+ 200: unknown;
712
+ };
713
+ };
714
+ };
715
+ };
716
+ } & {
679
717
  rewards: {
680
718
  engine: {
681
719
  post: {
@@ -724,7 +762,7 @@ declare const app: Elysia<"", false, {
724
762
  authorization: string;
725
763
  };
726
764
  response: {
727
- 200: import("../database/api/.generated").Prisma.BatchPayload;
765
+ 200: import("../database/api/.generated").Prisma.BatchPayload | undefined;
728
766
  };
729
767
  };
730
768
  };
@@ -784,33 +822,6 @@ declare const app: Elysia<"", false, {
784
822
  };
785
823
  };
786
824
  };
787
- } & {
788
- rewards: {
789
- breakdown: {
790
- get: {
791
- body: unknown;
792
- params: Record<never, string>;
793
- query: {
794
- items?: number | undefined;
795
- page?: number | undefined;
796
- chainId: number;
797
- campaignIdentifiers: string | string[];
798
- };
799
- headers: unknown;
800
- response: {
801
- 200: {
802
- Campaign: {
803
- campaignId: string;
804
- };
805
- amount: string;
806
- Reward: {
807
- recipient: string;
808
- };
809
- }[];
810
- };
811
- };
812
- };
813
- };
814
825
  };
815
826
  } & {
816
827
  v4: {
@@ -11,6 +11,44 @@ export declare const RewardController: Elysia<"/rewards", false, {
11
11
  schema: {};
12
12
  macro: {};
13
13
  }, {
14
+ rewards: {
15
+ index: {
16
+ get: {
17
+ body: unknown;
18
+ params: Record<never, string>;
19
+ query: {
20
+ items?: number | undefined;
21
+ page?: number | undefined;
22
+ chainId: number;
23
+ campaignIds: string;
24
+ };
25
+ headers: unknown;
26
+ response: {
27
+ 200: unknown;
28
+ };
29
+ };
30
+ };
31
+ };
32
+ } & {
33
+ rewards: {
34
+ total: {
35
+ get: {
36
+ body: unknown;
37
+ params: Record<never, string>;
38
+ query: {
39
+ items?: number | undefined;
40
+ page?: number | undefined;
41
+ chainId: number;
42
+ campaignIds: string;
43
+ };
44
+ headers: unknown;
45
+ response: {
46
+ 200: unknown;
47
+ };
48
+ };
49
+ };
50
+ };
51
+ } & {
14
52
  rewards: {
15
53
  engine: {
16
54
  post: {
@@ -59,7 +97,7 @@ export declare const RewardController: Elysia<"/rewards", false, {
59
97
  authorization: string;
60
98
  };
61
99
  response: {
62
- 200: import("../../../../database/api/.generated").Prisma.BatchPayload;
100
+ 200: import("../../../../database/api/.generated").Prisma.BatchPayload | undefined;
63
101
  };
64
102
  };
65
103
  };
@@ -119,33 +157,6 @@ export declare const RewardController: Elysia<"/rewards", false, {
119
157
  };
120
158
  };
121
159
  };
122
- } & {
123
- rewards: {
124
- breakdown: {
125
- get: {
126
- body: unknown;
127
- params: Record<never, string>;
128
- query: {
129
- items?: number | undefined;
130
- page?: number | undefined;
131
- chainId: number;
132
- campaignIdentifiers: string | string[];
133
- };
134
- headers: unknown;
135
- response: {
136
- 200: {
137
- Campaign: {
138
- campaignId: string;
139
- };
140
- amount: string;
141
- Reward: {
142
- recipient: string;
143
- };
144
- }[];
145
- };
146
- };
147
- };
148
- };
149
160
  }, {
150
161
  derive: {};
151
162
  resolve: {};
@@ -108,7 +108,7 @@ export declare const RewardsPerChainDto: import("@sinclair/typebox").TObject<{
108
108
  }>;
109
109
  export declare const CampaignIdListDto: import("@sinclair/typebox").TObject<{
110
110
  chainId: import("@sinclair/typebox").TNumber;
111
- campaignIdentifiers: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>]>;
111
+ campaignIds: import("@sinclair/typebox").TString;
112
112
  page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
113
113
  items: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
114
114
  }>;
@@ -144,13 +144,6 @@ export declare abstract class RewardRepository {
144
144
  campaignId: string;
145
145
  }[]>;
146
146
  static findManyRootsWithRewardOnChain(chainId: number): Promise<string[]>;
147
- static breakdownForCampaigns(root: string, campaignIds: string[], query: CampaignIdListModel): Promise<{
148
- Campaign: {
149
- campaignId: string;
150
- };
151
- amount: string;
152
- Reward: {
153
- recipient: string;
154
- };
155
- }[]>;
147
+ static breakdownForCampaigns(root: string, campaignIds: string[], query: CampaignIdListModel): Promise<unknown>;
148
+ static total(campaignIds: string[]): Promise<unknown>;
156
149
  }
@@ -149,7 +149,7 @@ export declare abstract class RewardService {
149
149
  recipient: string;
150
150
  proofs: string[];
151
151
  }[];
152
- static createManyBreakdown(data: CreateManyBreakdownModel): Promise<import("../../../../database/api/.generated").Prisma.BatchPayload>;
152
+ static createManyBreakdown(data: CreateManyBreakdownModel): Promise<import("../../../../database/api/.generated").Prisma.BatchPayload | undefined>;
153
153
  static getByRecipient(recipient: string, roots: string[], withToken?: boolean): Promise<({
154
154
  RewardToken: {
155
155
  id: string;
@@ -524,14 +524,7 @@ export declare abstract class RewardService {
524
524
  breakdown: number;
525
525
  rewards: Record<string, number>;
526
526
  }>>;
527
- static breakdownForCampaigns(query: CampaignIdListModel): Promise<{
528
- Campaign: {
529
- campaignId: string;
530
- };
531
- amount: string;
532
- Reward: {
533
- recipient: string;
534
- };
535
- }[]>;
527
+ static breakdownForCampaigns(query: CampaignIdListModel): Promise<unknown>;
528
+ static total(query: CampaignIdListModel): Promise<unknown>;
536
529
  static extractDailyRewardsRecordFromDynamicData<C extends Campaign>(type: C, dynamicData: CampaignDynamicData<C>[], timestamp?: bigint): Promise<DailyRewardsRecord["model"]>;
537
530
  }
@@ -658,6 +658,44 @@ export declare const v4: Elysia<"/v4", false, {
658
658
  };
659
659
  } & {
660
660
  v4: {
661
+ rewards: {
662
+ index: {
663
+ get: {
664
+ body: unknown;
665
+ params: Record<never, string>;
666
+ query: {
667
+ items?: number | undefined;
668
+ page?: number | undefined;
669
+ chainId: number;
670
+ campaignIds: string;
671
+ };
672
+ headers: unknown;
673
+ response: {
674
+ 200: unknown;
675
+ };
676
+ };
677
+ };
678
+ };
679
+ } & {
680
+ rewards: {
681
+ total: {
682
+ get: {
683
+ body: unknown;
684
+ params: Record<never, string>;
685
+ query: {
686
+ items?: number | undefined;
687
+ page?: number | undefined;
688
+ chainId: number;
689
+ campaignIds: string;
690
+ };
691
+ headers: unknown;
692
+ response: {
693
+ 200: unknown;
694
+ };
695
+ };
696
+ };
697
+ };
698
+ } & {
661
699
  rewards: {
662
700
  engine: {
663
701
  post: {
@@ -706,7 +744,7 @@ export declare const v4: Elysia<"/v4", false, {
706
744
  authorization: string;
707
745
  };
708
746
  response: {
709
- 200: import("../../../database/api/.generated").Prisma.BatchPayload;
747
+ 200: import("../../../database/api/.generated").Prisma.BatchPayload | undefined;
710
748
  };
711
749
  };
712
750
  };
@@ -766,33 +804,6 @@ export declare const v4: Elysia<"/v4", false, {
766
804
  };
767
805
  };
768
806
  };
769
- } & {
770
- rewards: {
771
- breakdown: {
772
- get: {
773
- body: unknown;
774
- params: Record<never, string>;
775
- query: {
776
- items?: number | undefined;
777
- page?: number | undefined;
778
- chainId: number;
779
- campaignIdentifiers: string | string[];
780
- };
781
- headers: unknown;
782
- response: {
783
- 200: {
784
- Campaign: {
785
- campaignId: string;
786
- };
787
- amount: string;
788
- Reward: {
789
- recipient: string;
790
- };
791
- }[];
792
- };
793
- };
794
- };
795
- };
796
807
  };
797
808
  } & {
798
809
  v4: {
@@ -684,6 +684,44 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
684
684
  };
685
685
  } & {
686
686
  v4: {
687
+ rewards: {
688
+ index: {
689
+ get: {
690
+ body: unknown;
691
+ params: Record<never, string>;
692
+ query: {
693
+ items?: number | undefined;
694
+ page?: number | undefined;
695
+ chainId: number;
696
+ campaignIds: string;
697
+ };
698
+ headers: unknown;
699
+ response: {
700
+ 200: unknown;
701
+ };
702
+ };
703
+ };
704
+ };
705
+ } & {
706
+ rewards: {
707
+ total: {
708
+ get: {
709
+ body: unknown;
710
+ params: Record<never, string>;
711
+ query: {
712
+ items?: number | undefined;
713
+ page?: number | undefined;
714
+ chainId: number;
715
+ campaignIds: string;
716
+ };
717
+ headers: unknown;
718
+ response: {
719
+ 200: unknown;
720
+ };
721
+ };
722
+ };
723
+ };
724
+ } & {
687
725
  rewards: {
688
726
  engine: {
689
727
  post: {
@@ -732,7 +770,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
732
770
  authorization: string;
733
771
  };
734
772
  response: {
735
- 200: import("../../../database/api/.generated").Prisma.BatchPayload;
773
+ 200: import("../../../database/api/.generated").Prisma.BatchPayload | undefined;
736
774
  };
737
775
  };
738
776
  };
@@ -792,33 +830,6 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
792
830
  };
793
831
  };
794
832
  };
795
- } & {
796
- rewards: {
797
- breakdown: {
798
- get: {
799
- body: unknown;
800
- params: Record<never, string>;
801
- query: {
802
- items?: number | undefined;
803
- page?: number | undefined;
804
- chainId: number;
805
- campaignIdentifiers: string | string[];
806
- };
807
- headers: unknown;
808
- response: {
809
- 200: {
810
- Campaign: {
811
- campaignId: string;
812
- };
813
- amount: string;
814
- Reward: {
815
- recipient: string;
816
- };
817
- }[];
818
- };
819
- };
820
- };
821
- };
822
833
  };
823
834
  } & {
824
835
  v4: {