@merkl/api 1.0.40 → 1.0.42

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.
@@ -531,6 +531,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
531
531
  campaigns?: boolean | undefined;
532
532
  point?: boolean | undefined;
533
533
  test?: boolean | undefined;
534
+ excludeSubCampaigns?: boolean | undefined;
534
535
  };
535
536
  headers: unknown;
536
537
  response: {
@@ -894,6 +895,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
894
895
  campaigns?: boolean | undefined;
895
896
  point?: boolean | undefined;
896
897
  test?: boolean | undefined;
898
+ excludeSubCampaigns?: boolean | undefined;
897
899
  };
898
900
  headers: unknown;
899
901
  response: {
@@ -10390,6 +10392,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
10390
10392
  campaigns?: boolean | undefined;
10391
10393
  point?: boolean | undefined;
10392
10394
  test?: boolean | undefined;
10395
+ excludeSubCampaigns?: boolean | undefined;
10393
10396
  };
10394
10397
  fetch?: RequestInit | undefined;
10395
10398
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
@@ -10518,6 +10521,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
10518
10521
  campaigns?: boolean | undefined;
10519
10522
  point?: boolean | undefined;
10520
10523
  test?: boolean | undefined;
10524
+ excludeSubCampaigns?: boolean | undefined;
10521
10525
  };
10522
10526
  fetch?: RequestInit | undefined;
10523
10527
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
@@ -532,6 +532,7 @@ declare const app: Elysia<"", {
532
532
  campaigns?: boolean | undefined;
533
533
  point?: boolean | undefined;
534
534
  test?: boolean | undefined;
535
+ excludeSubCampaigns?: boolean | undefined;
535
536
  };
536
537
  headers: unknown;
537
538
  response: {
@@ -895,6 +896,7 @@ declare const app: Elysia<"", {
895
896
  campaigns?: boolean | undefined;
896
897
  point?: boolean | undefined;
897
898
  test?: boolean | undefined;
899
+ excludeSubCampaigns?: boolean | undefined;
898
900
  };
899
901
  headers: unknown;
900
902
  response: {
@@ -332,6 +332,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
332
332
  campaigns?: boolean | undefined;
333
333
  point?: boolean | undefined;
334
334
  test?: boolean | undefined;
335
+ excludeSubCampaigns?: boolean | undefined;
335
336
  };
336
337
  headers: unknown;
337
338
  response: {
@@ -695,6 +696,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
695
696
  campaigns?: boolean | undefined;
696
697
  point?: boolean | undefined;
697
698
  test?: boolean | undefined;
699
+ excludeSubCampaigns?: boolean | undefined;
698
700
  };
699
701
  headers: unknown;
700
702
  response: {
@@ -402,10 +402,11 @@ export declare const GetOpportunitiesQueryDto: import("@sinclair/typebox").TObje
402
402
  page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
403
403
  items: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
404
404
  }>;
405
- export declare const GetOpportunityQueryDto: import("@sinclair/typebox").TObject<{
405
+ export declare const FindOpportunityDto: import("@sinclair/typebox").TObject<{
406
406
  test: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
407
407
  point: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
408
408
  campaigns: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
409
+ excludeSubCampaigns: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
409
410
  }>;
410
411
  export declare const CreateOpportunityDto: import("@sinclair/typebox").TObject<{
411
412
  chainId: import("@sinclair/typebox").TNumber;
@@ -479,7 +480,7 @@ export declare const UpdateOpportunityDto: import("@sinclair/typebox").TObject<{
479
480
  tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
480
481
  }>;
481
482
  export type GetOpportunitiesQueryModel = typeof GetOpportunitiesQueryDto.static;
482
- export type GetOpportunityQueryModel = typeof GetOpportunityQueryDto.static;
483
+ export type FindOpportunityModel = typeof FindOpportunityDto.static;
483
484
  export type CreateOpportunityModel = typeof CreateOpportunityDto.static;
484
485
  export type OpportunityAggregateField = typeof OpportunityAggregateFieldDto.static;
485
486
  export type OpportunityResourceModel = typeof OpportunityResourceDto.static;
@@ -4,7 +4,7 @@ import type { AprRecord } from "../../../modules/v4/apr/apr.model";
4
4
  import type { Campaign } from "../../../modules/v4/campaign/campaign.model";
5
5
  import type { DailyRewardsRecord } from "../../../modules/v4/reward/reward.model";
6
6
  import type { TvlRecord } from "../../../modules/v4/tvl/tvl.model";
7
- import type { CreateOpportunityModel, GetOpportunitiesQueryModel, Opportunity } from "./opportunity.model";
7
+ import type { CreateOpportunityModel, FindOpportunityModel, GetOpportunitiesQueryModel, Opportunity } from "./opportunity.model";
8
8
  export declare abstract class OpportunityRepository {
9
9
  #private;
10
10
  static create(newOpp: CreateOpportunityModel & {
@@ -219,7 +219,7 @@ export declare abstract class OpportunityRepository {
219
219
  tags: string[];
220
220
  lastCampaignCreatedAt: Date;
221
221
  }) | null>;
222
- static findUniqueOrThrow(id: string, withTest?: boolean, withPoints?: boolean, withCampaigns?: boolean): Promise<{
222
+ static findUniqueOrThrow(id: string, query: FindOpportunityModel): Promise<{
223
223
  Campaigns: {
224
224
  campaignId: string;
225
225
  description: string | null;
@@ -3,7 +3,7 @@ import { type OpportunityAction, type OpportunityManualOverride, type Prisma } f
3
3
  import type { CampaignWithParams, GetCampaignQueryModel } from "../../../modules/v4/campaign/campaign.model";
4
4
  import type { Protocol } from "../protocol/protocol.model";
5
5
  import type { Token } from "../token/token.model";
6
- import type { CreateOpportunityModel, GetOpportunitiesQueryModel, LightOpportunityFromDB, Opportunity, OpportunityOverrideModel, OpportunityResourceModel, OpportunityUnique } from "./opportunity.model";
6
+ import type { CreateOpportunityModel, FindOpportunityModel, GetOpportunitiesQueryModel, LightOpportunityFromDB, Opportunity, OpportunityOverrideModel, OpportunityResourceModel, OpportunityUnique } from "./opportunity.model";
7
7
  import { OpportunityRepository } from "./opportunity.repository";
8
8
  export declare abstract class OpportunityService {
9
9
  #private;
@@ -503,7 +503,7 @@ export declare abstract class OpportunityService {
503
503
  icon: string;
504
504
  };
505
505
  }[]>;
506
- static getUniqueWithCampaignsOrThrow(opportunityId: string | OpportunityUnique, withTest?: boolean, withPoints?: boolean): Promise<{
506
+ static getUniqueWithCampaignsOrThrow(opportunityId: string | OpportunityUnique, query: FindOpportunityModel): Promise<{
507
507
  protocol?: {
508
508
  dailyRewards?: number | undefined;
509
509
  numberOfLiveCampaigns?: number | undefined;
@@ -670,7 +670,7 @@ export declare abstract class OpportunityService {
670
670
  icon: string;
671
671
  };
672
672
  }>;
673
- static findUniqueOrThrow(opportunityId: string | OpportunityUnique, withCampaigns?: boolean, withTest?: boolean, withPoints?: boolean): Promise<OpportunityResourceModel>;
673
+ static findUniqueOrThrow(opportunityId: string | OpportunityUnique, query: FindOpportunityModel): Promise<OpportunityResourceModel>;
674
674
  /**
675
675
  * Get the list of opportunities satisfying the query
676
676
  * @param query
@@ -341,6 +341,7 @@ export declare const v4: Elysia<"/v4", {
341
341
  campaigns?: boolean | undefined;
342
342
  point?: boolean | undefined;
343
343
  test?: boolean | undefined;
344
+ excludeSubCampaigns?: boolean | undefined;
344
345
  };
345
346
  headers: unknown;
346
347
  response: {
@@ -704,6 +705,7 @@ export declare const v4: Elysia<"/v4", {
704
705
  campaigns?: boolean | undefined;
705
706
  point?: boolean | undefined;
706
707
  test?: boolean | undefined;
708
+ excludeSubCampaigns?: boolean | undefined;
707
709
  };
708
710
  headers: unknown;
709
711
  response: {