@merkl/api 0.10.191 → 0.10.192
Sign up to get free protection for your applications and to get access to all the features.
@@ -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
|
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:
|
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
|