@merkl/api 0.17.7 → 0.17.9

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.
@@ -198,6 +198,8 @@ export declare const v4: Elysia<"/v4", false, {
198
198
  id: number;
199
199
  icon: string;
200
200
  };
201
+ endTimestamp: number;
202
+ startTimestamp: number;
201
203
  rewardToken: {
202
204
  symbol: string;
203
205
  name: string | null;
@@ -217,15 +219,15 @@ export declare const v4: Elysia<"/v4", false, {
217
219
  icon: string;
218
220
  } | undefined;
219
221
  campaignStatus: {
222
+ computedUntil: number;
223
+ processingStarted: number;
220
224
  error: string;
221
225
  details: import("database/api/.generated/runtime/library").JsonValue;
222
226
  status: import("../../../database/api/.generated").$Enums.RunStatus;
223
227
  campaignId: string;
224
- computedUntil: bigint;
225
- processingStarted: bigint;
226
228
  };
227
229
  creatorAddress: string;
228
- Creator: {
230
+ creator: {
229
231
  tags: string[];
230
232
  address: string;
231
233
  creatorId: string | null;
@@ -233,8 +235,6 @@ export declare const v4: Elysia<"/v4", false, {
233
235
  type: string;
234
236
  id: string;
235
237
  subType: number | null;
236
- startTimestamp: bigint;
237
- endTimestamp: bigint;
238
238
  computeChainId: number;
239
239
  distributionChainId: number;
240
240
  campaignId: string;
@@ -538,13 +538,18 @@ export declare const v4: Elysia<"/v4", false, {
538
538
  apr: number;
539
539
  dailyRewards: number;
540
540
  campaigns: {
541
+ creator?: {
542
+ tags?: string[] | undefined;
543
+ creatorId?: string | null | undefined;
544
+ address: string;
545
+ } | undefined;
541
546
  campaignStatus?: {
542
547
  error?: string | undefined;
543
548
  details?: any;
544
549
  status: string;
545
550
  campaignId: string;
546
- computedUntil: string | bigint;
547
- processingStarted: string | bigint;
551
+ computedUntil: string | number;
552
+ processingStarted: string | number;
548
553
  } | undefined;
549
554
  distributionChain?: {
550
555
  name: string;
@@ -560,8 +565,8 @@ export declare const v4: Elysia<"/v4", false, {
560
565
  id: number;
561
566
  icon: string;
562
567
  };
563
- startTimestamp: string | bigint;
564
- endTimestamp: string | bigint;
568
+ startTimestamp: string | number;
569
+ endTimestamp: string | number;
565
570
  computeChainId: number;
566
571
  distributionChainId: number;
567
572
  campaignId: string;
@@ -695,13 +700,18 @@ export declare const v4: Elysia<"/v4", false, {
695
700
  apr: number;
696
701
  dailyRewards: number;
697
702
  campaigns: {
703
+ creator?: {
704
+ tags?: string[] | undefined;
705
+ creatorId?: string | null | undefined;
706
+ address: string;
707
+ } | undefined;
698
708
  campaignStatus?: {
699
709
  error?: string | undefined;
700
710
  details?: any;
701
711
  status: string;
702
712
  campaignId: string;
703
- computedUntil: string | bigint;
704
- processingStarted: string | bigint;
713
+ computedUntil: string | number;
714
+ processingStarted: string | number;
705
715
  } | undefined;
706
716
  distributionChain?: {
707
717
  name: string;
@@ -717,8 +727,8 @@ export declare const v4: Elysia<"/v4", false, {
717
727
  id: number;
718
728
  icon: string;
719
729
  };
720
- startTimestamp: string | bigint;
721
- endTimestamp: string | bigint;
730
+ startTimestamp: string | number;
731
+ endTimestamp: string | number;
722
732
  computeChainId: number;
723
733
  distributionChainId: number;
724
734
  campaignId: string;
@@ -1037,6 +1047,8 @@ export declare const v4: Elysia<"/v4", false, {
1037
1047
  id: number;
1038
1048
  icon: string;
1039
1049
  };
1050
+ endTimestamp: number;
1051
+ startTimestamp: number;
1040
1052
  rewardToken: {
1041
1053
  symbol: string;
1042
1054
  name: string | null;
@@ -1056,15 +1068,15 @@ export declare const v4: Elysia<"/v4", false, {
1056
1068
  icon: string;
1057
1069
  } | undefined;
1058
1070
  campaignStatus: {
1071
+ computedUntil: number;
1072
+ processingStarted: number;
1059
1073
  error: string;
1060
1074
  details: import("database/api/.generated/runtime/library").JsonValue;
1061
1075
  status: import("../../../database/api/.generated").$Enums.RunStatus;
1062
1076
  campaignId: string;
1063
- computedUntil: bigint;
1064
- processingStarted: bigint;
1065
1077
  };
1066
1078
  creatorAddress: string;
1067
- Creator: {
1079
+ creator: {
1068
1080
  tags: string[];
1069
1081
  address: string;
1070
1082
  creatorId: string | null;
@@ -1072,8 +1084,6 @@ export declare const v4: Elysia<"/v4", false, {
1072
1084
  type: string;
1073
1085
  id: string;
1074
1086
  subType: number | null;
1075
- startTimestamp: bigint;
1076
- endTimestamp: bigint;
1077
1087
  computeChainId: number;
1078
1088
  distributionChainId: number;
1079
1089
  campaignId: string;
@@ -1101,6 +1111,8 @@ export declare const v4: Elysia<"/v4", false, {
1101
1111
  id: number;
1102
1112
  icon: string;
1103
1113
  };
1114
+ endTimestamp: number;
1115
+ startTimestamp: number;
1104
1116
  rewardToken: {
1105
1117
  symbol: string;
1106
1118
  name: string | null;
@@ -1120,15 +1132,15 @@ export declare const v4: Elysia<"/v4", false, {
1120
1132
  icon: string;
1121
1133
  } | undefined;
1122
1134
  campaignStatus: {
1135
+ computedUntil: number;
1136
+ processingStarted: number;
1123
1137
  error: string;
1124
1138
  details: import("database/api/.generated/runtime/library").JsonValue;
1125
1139
  status: import("../../../database/api/.generated").$Enums.RunStatus;
1126
1140
  campaignId: string;
1127
- computedUntil: bigint;
1128
- processingStarted: bigint;
1129
1141
  };
1130
1142
  creatorAddress: string;
1131
- Creator: {
1143
+ creator: {
1132
1144
  tags: string[];
1133
1145
  address: string;
1134
1146
  creatorId: string | null;
@@ -1136,8 +1148,6 @@ export declare const v4: Elysia<"/v4", false, {
1136
1148
  type: string;
1137
1149
  id: string;
1138
1150
  subType: number | null;
1139
- startTimestamp: bigint;
1140
- endTimestamp: bigint;
1141
1151
  computeChainId: number;
1142
1152
  distributionChainId: number;
1143
1153
  campaignId: string;
@@ -1,6 +1,9 @@
1
1
  import type { Campaign } from "../campaign";
2
2
  import type { Resource } from "../prisma";
3
- export type Status = Resource<"CampaignStatus", "campaignId">;
3
+ export type Status = Resource<"CampaignStatus", "campaignId", {
4
+ computedUntil: number;
5
+ processingStarted: number;
6
+ }>;
4
7
  export type StatusWithCampaign = Status & {
5
8
  campaign: Campaign["model"];
6
9
  };
@@ -15,8 +18,8 @@ export declare const DelayDto: import("@sinclair/typebox").TObject<{
15
18
  }>;
16
19
  export declare const CampaignStatusResourceDto: import("@sinclair/typebox").TObject<{
17
20
  campaignId: import("@sinclair/typebox").TString;
18
- computedUntil: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBigInt, import("@sinclair/typebox").TString]>;
19
- processingStarted: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBigInt, import("@sinclair/typebox").TString]>;
21
+ computedUntil: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
22
+ processingStarted: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
20
23
  status: import("@sinclair/typebox").TString;
21
24
  error: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
22
25
  details: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
@@ -14,8 +14,8 @@ export const DelayDto = t.Object({
14
14
  });
15
15
  export const CampaignStatusResourceDto = t.Object({
16
16
  campaignId: t.String(),
17
- computedUntil: t.Union([t.BigInt(), t.String()]),
18
- processingStarted: t.Union([t.BigInt(), t.String()]),
17
+ computedUntil: t.Union([t.String(), t.Numeric()]),
18
+ processingStarted: t.Union([t.String(), t.Numeric()]),
19
19
  status: t.String(),
20
20
  error: t.Optional(t.String()),
21
21
  details: t.Optional(t.Any()),
@@ -1,6 +1,14 @@
1
- import { type CampaignUnique } from "../campaign";
1
+ import { CampaignService, type CampaignUnique } from "../campaign";
2
2
  import type { DelayModel, QueryCampaignStatus, UpdateStatusModel } from "./status.model";
3
3
  export declare abstract class StatusService {
4
+ static format(status: Awaited<ReturnType<(typeof CampaignService)["findUniqueOrThrow"]>>["CampaignStatus"][number]): {
5
+ computedUntil: number;
6
+ processingStarted: number;
7
+ error: string;
8
+ details: import("database/api/.generated/runtime/library").JsonValue;
9
+ status: import("../../../../database/api/.generated").$Enums.RunStatus;
10
+ campaignId: string;
11
+ };
4
12
  static findMany(query: QueryCampaignStatus): Promise<{
5
13
  error: string;
6
14
  details: import("database/api/.generated/runtime/library").JsonValue;
@@ -5,6 +5,13 @@ import { CampaignService } from "../campaign";
5
5
  import { MerklRootService } from "../merklRoot";
6
6
  import { StatusRepository } from "./status.repository";
7
7
  export class StatusService {
8
+ static format(status) {
9
+ return {
10
+ ...status,
11
+ computedUntil: Number(status.computedUntil),
12
+ processingStarted: Number(status.processingStarted),
13
+ };
14
+ }
8
15
  static async findMany(query) {
9
16
  return await StatusRepository.findMany(query);
10
17
  }