@merkl/api 0.10.190 → 0.10.192

Sign up to get free protection for your applications and to get access to all the features.
@@ -1374,7 +1374,7 @@ declare const eden: {
1374
1374
  proofs: string[];
1375
1375
  }, "breakdowns"> & {
1376
1376
  breakdowns: {
1377
- opportunity: import("../modules/v4").Opportunity["model"] | null;
1377
+ opportunity: import("../modules/v4").Opportunity["model"];
1378
1378
  claimed: bigint;
1379
1379
  amount: bigint;
1380
1380
  pending: bigint;
@@ -3703,7 +3703,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
3703
3703
  proofs: string[];
3704
3704
  }, "breakdowns"> & {
3705
3705
  breakdowns: {
3706
- opportunity: import("../modules/v4").Opportunity["model"] | null;
3706
+ opportunity: import("../modules/v4").Opportunity["model"];
3707
3707
  claimed: bigint;
3708
3708
  amount: bigint;
3709
3709
  pending: bigint;
@@ -5812,7 +5812,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5812
5812
  proofs: string[];
5813
5813
  }, "breakdowns"> & {
5814
5814
  breakdowns: {
5815
- opportunity: import("../modules/v4").Opportunity["model"] | null;
5815
+ opportunity: import("../modules/v4").Opportunity["model"];
5816
5816
  claimed: bigint;
5817
5817
  amount: bigint;
5818
5818
  pending: bigint;
@@ -1726,7 +1726,7 @@ declare const app: Elysia<"", false, {
1726
1726
  proofs: string[];
1727
1727
  }, "breakdowns"> & {
1728
1728
  breakdowns: {
1729
- opportunity: import("./modules/v4").Opportunity["model"] | null;
1729
+ opportunity: import("./modules/v4").Opportunity["model"];
1730
1730
  claimed: bigint;
1731
1731
  amount: bigint;
1732
1732
  pending: bigint;
@@ -9,13 +9,14 @@ import type { Status } from "../status";
9
9
  * @description Target description of rewards campaigns
10
10
  * @see {@link Resource}
11
11
  */
12
- export type Campaign<C extends CampaignType = CampaignType> = Resource<"Campaign", "opportunityId" | "rewardTokenId", {
12
+ export type Campaign<C extends CampaignType = CampaignType> = Resource<"Campaign", "opportunityId" | "rewardTokenId" | "params", {
13
13
  chain: Chain["model"];
14
14
  rewardToken: Token["model"];
15
15
  params: CampaignParameters<ConvertedCampaignType<C>>["campaignParameters"];
16
16
  distributionChain?: Chain["model"];
17
17
  campaignStatus?: Status["model"];
18
18
  }>;
19
+ export type CampaignWithParams<C extends CampaignType = CampaignType> = Campaign<C> & Resource<"Campaign", "opportunityId" | "rewardTokenId" | (keyof Campaign["model"] & keyof Resource<"Campaign">)>;
19
20
  export declare const campaignTypeToEnumMap: {
20
21
  readonly INVALID: any;
21
22
  readonly CLAMM: any;
@@ -1,4 +1,4 @@
1
- import { type Campaign, type CampaignUnique, type ConvertedCampaignType, type CreateCampaignModel, type GetCampaignQueryModel } from "./";
1
+ import { type CampaignUnique, type CampaignWithParams, type ConvertedCampaignType, type CreateCampaignModel, type GetCampaignQueryModel } from "./";
2
2
  import { CampaignRepository } from "./campaign.repository";
3
3
  import type { CampaignType } from "../../../../database/api/.generated";
4
4
  import { type CampaignParameters, type Campaign as CampaignTypeV3, type ChainId } from "@sdk";
@@ -208,7 +208,7 @@ export declare abstract class CampaignService {
208
208
  opportunityId: string;
209
209
  creatorAddress: string;
210
210
  };
211
- static formatAsCampaignParameters<C extends CampaignTypeV3>(campaign: Campaign["model"]): CampaignParameters<C>;
211
+ static formatAsCampaignParameters<C extends CampaignTypeV3>(campaign: CampaignWithParams["model"]): CampaignParameters<C>;
212
212
  /**
213
213
  * Fetches the campaign dynamic data for a v3 campaign onchain
214
214
  * @param chainId
@@ -250,7 +250,7 @@ export declare abstract class RewardService {
250
250
  static splitBreakdownByOpportunity(breakdowns: (RewardBreakdown["model"] & {
251
251
  opportunity: LightOpportunityFromDB;
252
252
  })[]): {
253
- opportunity: Opportunity["model"] | null;
253
+ opportunity: Opportunity["model"];
254
254
  claimed: bigint;
255
255
  amount: bigint;
256
256
  pending: bigint;
@@ -346,7 +346,7 @@ export declare abstract class RewardService {
346
346
  proofs: string[];
347
347
  }, "breakdowns"> & {
348
348
  breakdowns: {
349
- opportunity: Opportunity["model"] | null;
349
+ opportunity: Opportunity["model"];
350
350
  claimed: bigint;
351
351
  amount: bigint;
352
352
  pending: bigint;
@@ -1708,7 +1708,7 @@ export declare const v4: Elysia<"/v4", false, {
1708
1708
  proofs: string[];
1709
1709
  }, "breakdowns"> & {
1710
1710
  breakdowns: {
1711
- opportunity: import("./opportunity").Opportunity["model"] | null;
1711
+ opportunity: import("./opportunity").Opportunity["model"];
1712
1712
  claimed: bigint;
1713
1713
  amount: bigint;
1714
1714
  pending: bigint;
@@ -171,7 +171,7 @@ export declare const UserController: Elysia<"/users", false, {
171
171
  proofs: string[];
172
172
  }, "breakdowns"> & {
173
173
  breakdowns: {
174
- opportunity: import("..").Opportunity["model"] | null;
174
+ opportunity: import("..").Opportunity["model"];
175
175
  claimed: bigint;
176
176
  amount: bigint;
177
177
  pending: bigint;
@@ -1732,7 +1732,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1732
1732
  proofs: string[];
1733
1733
  }, "breakdowns"> & {
1734
1734
  breakdowns: {
1735
- opportunity: import("../../modules/v4").Opportunity["model"] | null;
1735
+ opportunity: import("../../modules/v4").Opportunity["model"];
1736
1736
  claimed: bigint;
1737
1737
  amount: bigint;
1738
1738
  pending: bigint;
@@ -1735,7 +1735,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1735
1735
  proofs: string[];
1736
1736
  }, "breakdowns"> & {
1737
1737
  breakdowns: {
1738
- opportunity: import("../../modules/v4").Opportunity["model"] | null;
1738
+ opportunity: import("../../modules/v4").Opportunity["model"];
1739
1739
  claimed: bigint;
1740
1740
  amount: bigint;
1741
1741
  pending: bigint;
@@ -1726,7 +1726,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1726
1726
  proofs: string[];
1727
1727
  }, "breakdowns"> & {
1728
1728
  breakdowns: {
1729
- opportunity: import("../../modules/v4").Opportunity["model"] | null;
1729
+ opportunity: import("../../modules/v4").Opportunity["model"];
1730
1730
  claimed: bigint;
1731
1731
  amount: bigint;
1732
1732
  pending: bigint;
@@ -1731,7 +1731,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1731
1731
  proofs: string[];
1732
1732
  }, "breakdowns"> & {
1733
1733
  breakdowns: {
1734
- opportunity: import("../../modules/v4").Opportunity["model"] | null;
1734
+ opportunity: import("../../modules/v4").Opportunity["model"];
1735
1735
  claimed: bigint;
1736
1736
  amount: bigint;
1737
1737
  pending: bigint;
@@ -1749,7 +1749,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1749
1749
  proofs: string[];
1750
1750
  }, "breakdowns"> & {
1751
1751
  breakdowns: {
1752
- opportunity: import("../../modules/v4").Opportunity["model"] | null;
1752
+ opportunity: import("../../modules/v4").Opportunity["model"];
1753
1753
  claimed: bigint;
1754
1754
  amount: bigint;
1755
1755
  pending: bigint;
@@ -1750,7 +1750,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1750
1750
  proofs: string[];
1751
1751
  }, "breakdowns"> & {
1752
1752
  breakdowns: {
1753
- opportunity: import("../../modules/v4").Opportunity["model"] | null;
1753
+ opportunity: import("../../modules/v4").Opportunity["model"];
1754
1754
  claimed: bigint;
1755
1755
  amount: bigint;
1756
1756
  pending: bigint;
@@ -1732,7 +1732,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1732
1732
  proofs: string[];
1733
1733
  }, "breakdowns"> & {
1734
1734
  breakdowns: {
1735
- opportunity: import("../../modules/v4").Opportunity["model"] | null;
1735
+ opportunity: import("../../modules/v4").Opportunity["model"];
1736
1736
  claimed: bigint;
1737
1737
  amount: bigint;
1738
1738
  pending: bigint;
@@ -1733,7 +1733,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1733
1733
  proofs: string[];
1734
1734
  }, "breakdowns"> & {
1735
1735
  breakdowns: {
1736
- opportunity: import("../../modules/v4").Opportunity["model"] | null;
1736
+ opportunity: import("../../modules/v4").Opportunity["model"];
1737
1737
  claimed: bigint;
1738
1738
  amount: bigint;
1739
1739
  pending: bigint;
@@ -1735,7 +1735,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1735
1735
  proofs: string[];
1736
1736
  }, "breakdowns"> & {
1737
1737
  breakdowns: {
1738
- opportunity: import("../../modules/v4").Opportunity["model"] | null;
1738
+ opportunity: import("../../modules/v4").Opportunity["model"];
1739
1739
  claimed: bigint;
1740
1740
  amount: bigint;
1741
1741
  pending: bigint;