@merkl/api 0.10.191 → 0.10.193

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,13 +9,15 @@ 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
- params: CampaignParameters<ConvertedCampaignType<C>>["campaignParameters"];
16
15
  distributionChain?: Chain["model"];
17
16
  campaignStatus?: Status["model"];
18
17
  }>;
18
+ export type CampaignWithParams<C extends CampaignType = CampaignType> = Campaign<C> & Resource<"Campaign", "opportunityId" | "rewardTokenId" | (keyof Campaign["model"] & keyof Resource<"Campaign">), {
19
+ params: CampaignParameters<ConvertedCampaignType<C>>["campaignParameters"];
20
+ }>;
19
21
  export declare const campaignTypeToEnumMap: {
20
22
  readonly INVALID: any;
21
23
  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