@merkl/api 0.10.140 → 0.10.141

Sign up to get free protection for your applications and to get access to all the features.
@@ -1659,6 +1659,13 @@ declare const eden: {
1659
1659
  campaignId: string;
1660
1660
  computedUntil: bigint;
1661
1661
  processingStarted: bigint;
1662
+ }[] | {
1663
+ error: string;
1664
+ details: import("database/api/.generated/runtime/library").JsonValue;
1665
+ status: import("../../database/api/.generated").$Enums.RunStatus;
1666
+ campaignId: string;
1667
+ computedUntil: bigint;
1668
+ processingStarted: bigint;
1662
1669
  };
1663
1670
  }>>;
1664
1671
  }) & {
@@ -3886,6 +3893,13 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
3886
3893
  campaignId: string;
3887
3894
  computedUntil: bigint;
3888
3895
  processingStarted: bigint;
3896
+ }[] | {
3897
+ error: string;
3898
+ details: import("database/api/.generated/runtime/library").JsonValue;
3899
+ status: import("../../database/api/.generated").$Enums.RunStatus;
3900
+ campaignId: string;
3901
+ computedUntil: bigint;
3902
+ processingStarted: bigint;
3889
3903
  };
3890
3904
  };
3891
3905
  };
@@ -5559,6 +5573,13 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5559
5573
  campaignId: string;
5560
5574
  computedUntil: bigint;
5561
5575
  processingStarted: bigint;
5576
+ }[] | {
5577
+ error: string;
5578
+ details: import("database/api/.generated/runtime/library").JsonValue;
5579
+ status: import("../../database/api/.generated").$Enums.RunStatus;
5580
+ campaignId: string;
5581
+ computedUntil: bigint;
5582
+ processingStarted: bigint;
5562
5583
  };
5563
5584
  }>>;
5564
5585
  }) & {
@@ -2152,6 +2152,13 @@ declare const app: Elysia<"", false, {
2152
2152
  campaignId: string;
2153
2153
  computedUntil: bigint;
2154
2154
  processingStarted: bigint;
2155
+ }[] | {
2156
+ error: string;
2157
+ details: import("database/api/.generated/runtime/library").JsonValue;
2158
+ status: import("../database/api/.generated").$Enums.RunStatus;
2159
+ campaignId: string;
2160
+ computedUntil: bigint;
2161
+ processingStarted: bigint;
2155
2162
  };
2156
2163
  };
2157
2164
  };
@@ -2134,6 +2134,13 @@ export declare const v4: Elysia<"/v4", false, {
2134
2134
  campaignId: string;
2135
2135
  computedUntil: bigint;
2136
2136
  processingStarted: bigint;
2137
+ }[] | {
2138
+ error: string;
2139
+ details: import("database/api/.generated/runtime/library").JsonValue;
2140
+ status: import("../../../database/api/.generated").$Enums.RunStatus;
2141
+ campaignId: string;
2142
+ computedUntil: bigint;
2143
+ processingStarted: bigint;
2137
2144
  };
2138
2145
  };
2139
2146
  };
@@ -107,6 +107,13 @@ export declare const StatusController: Elysia<"/campaign-status", false, {
107
107
  campaignId: string;
108
108
  computedUntil: bigint;
109
109
  processingStarted: bigint;
110
+ }[] | {
111
+ error: string;
112
+ details: import("database/api/.generated/runtime/library").JsonValue;
113
+ status: import("../../../../database/api/.generated").$Enums.RunStatus;
114
+ campaignId: string;
115
+ computedUntil: bigint;
116
+ processingStarted: bigint;
110
117
  };
111
118
  };
112
119
  };
@@ -22,7 +22,10 @@ export const StatusController = new Elysia({ prefix: "/campaign-status", detail:
22
22
  // ─── Find Many Status ────────────────────────────────────────────────
23
23
  .get("/", async ({ query }) => await StatusService.findMany(query), { query: QueryCampaignStatusDto })
24
24
  // ─── Get A Status By Id ────────────────────────────────────────────
25
+ // campaignId will be either a rough campaignId in the engine sense, a campaignId in the api db way, or a distributionChain_campaignId
25
26
  .get("/:campaignId", async ({ params }) => {
27
+ if (!params.campaignId.includes("-") && params.campaignId.startsWith("0x"))
28
+ return await StatusService.findManyByCampaignId(params.campaignId);
26
29
  if (!params.campaignId.includes("-"))
27
30
  return await StatusService.findUniqueOrThrow(params.campaignId);
28
31
  const [distributionChain, campaignId] = params.campaignId.split("-");
@@ -11,6 +11,14 @@ export declare class StatusRepository {
11
11
  computedUntil: bigint;
12
12
  processingStarted: bigint;
13
13
  }[]>;
14
+ static findManyByCampaignId(campaignId: string): Promise<{
15
+ error: string;
16
+ details: Prisma.JsonValue;
17
+ status: import("../../../../database/api/.generated").$Enums.RunStatus;
18
+ campaignId: string;
19
+ computedUntil: bigint;
20
+ processingStarted: bigint;
21
+ }[]>;
14
22
  static findUniqueOrThrow(campaignId: string): Promise<{
15
23
  error: string;
16
24
  details: Prisma.JsonValue;
@@ -14,6 +14,15 @@ export class StatusRepository {
14
14
  static async findMany(query) {
15
15
  return await apiDbClient.campaignStatus.findMany(StatusRepository.#formatQuery(query));
16
16
  }
17
+ static async findManyByCampaignId(campaignId) {
18
+ return await apiDbClient.campaignStatus.findMany({
19
+ where: {
20
+ Campaign: {
21
+ campaignId: campaignId,
22
+ },
23
+ },
24
+ });
25
+ }
17
26
  static async findUniqueOrThrow(campaignId) {
18
27
  return await apiDbClient.campaignStatus.findUniqueOrThrow({
19
28
  where: {
@@ -9,6 +9,14 @@ export declare class StatusService {
9
9
  computedUntil: bigint;
10
10
  processingStarted: bigint;
11
11
  }[]>;
12
+ static findManyByCampaignId(campaignId: string): Promise<{
13
+ error: string;
14
+ details: import("database/api/.generated/runtime/library").JsonValue;
15
+ status: import("../../../../database/api/.generated").$Enums.RunStatus;
16
+ campaignId: string;
17
+ computedUntil: bigint;
18
+ processingStarted: bigint;
19
+ }[]>;
12
20
  static findUniqueOrThrow(campaignUnique: CampaignUnique | string): Promise<{
13
21
  error: string;
14
22
  details: import("database/api/.generated/runtime/library").JsonValue;
@@ -7,6 +7,9 @@ export class StatusService {
7
7
  static async findMany(query) {
8
8
  return await StatusRepository.findMany(query);
9
9
  }
10
+ static async findManyByCampaignId(campaignId) {
11
+ return await StatusRepository.findManyByCampaignId(campaignId);
12
+ }
10
13
  static async findUniqueOrThrow(campaignUnique) {
11
14
  const campaignId = typeof campaignUnique === "string" ? campaignUnique : CampaignService.hashId(campaignUnique);
12
15
  return await StatusRepository.findUniqueOrThrow(campaignId);
@@ -2160,6 +2160,13 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
2160
2160
  campaignId: string;
2161
2161
  computedUntil: bigint;
2162
2162
  processingStarted: bigint;
2163
+ }[] | {
2164
+ error: string;
2165
+ details: import("database/api/.generated/runtime/library").JsonValue;
2166
+ status: import("../../../database/api/.generated").$Enums.RunStatus;
2167
+ campaignId: string;
2168
+ computedUntil: bigint;
2169
+ processingStarted: bigint;
2163
2170
  };
2164
2171
  };
2165
2172
  };
@@ -2158,6 +2158,13 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
2158
2158
  campaignId: string;
2159
2159
  computedUntil: bigint;
2160
2160
  processingStarted: bigint;
2161
+ }[] | {
2162
+ error: string;
2163
+ details: import("database/api/.generated/runtime/library").JsonValue;
2164
+ status: import("../../../database/api/.generated").$Enums.RunStatus;
2165
+ campaignId: string;
2166
+ computedUntil: bigint;
2167
+ processingStarted: bigint;
2161
2168
  };
2162
2169
  };
2163
2170
  };
@@ -2161,6 +2161,13 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
2161
2161
  campaignId: string;
2162
2162
  computedUntil: bigint;
2163
2163
  processingStarted: bigint;
2164
+ }[] | {
2165
+ error: string;
2166
+ details: import("database/api/.generated/runtime/library").JsonValue;
2167
+ status: import("../../../database/api/.generated").$Enums.RunStatus;
2168
+ campaignId: string;
2169
+ computedUntil: bigint;
2170
+ processingStarted: bigint;
2164
2171
  };
2165
2172
  };
2166
2173
  };
@@ -2152,6 +2152,13 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
2152
2152
  campaignId: string;
2153
2153
  computedUntil: bigint;
2154
2154
  processingStarted: bigint;
2155
+ }[] | {
2156
+ error: string;
2157
+ details: import("database/api/.generated/runtime/library").JsonValue;
2158
+ status: import("../../../database/api/.generated").$Enums.RunStatus;
2159
+ campaignId: string;
2160
+ computedUntil: bigint;
2161
+ processingStarted: bigint;
2155
2162
  };
2156
2163
  };
2157
2164
  };
@@ -2157,6 +2157,13 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
2157
2157
  campaignId: string;
2158
2158
  computedUntil: bigint;
2159
2159
  processingStarted: bigint;
2160
+ }[] | {
2161
+ error: string;
2162
+ details: import("database/api/.generated/runtime/library").JsonValue;
2163
+ status: import("../../../database/api/.generated").$Enums.RunStatus;
2164
+ campaignId: string;
2165
+ computedUntil: bigint;
2166
+ processingStarted: bigint;
2160
2167
  };
2161
2168
  };
2162
2169
  };
@@ -2175,6 +2175,13 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
2175
2175
  campaignId: string;
2176
2176
  computedUntil: bigint;
2177
2177
  processingStarted: bigint;
2178
+ }[] | {
2179
+ error: string;
2180
+ details: import("database/api/.generated/runtime/library").JsonValue;
2181
+ status: import("../../../database/api/.generated").$Enums.RunStatus;
2182
+ campaignId: string;
2183
+ computedUntil: bigint;
2184
+ processingStarted: bigint;
2178
2185
  };
2179
2186
  };
2180
2187
  };
@@ -2176,6 +2176,13 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
2176
2176
  campaignId: string;
2177
2177
  computedUntil: bigint;
2178
2178
  processingStarted: bigint;
2179
+ }[] | {
2180
+ error: string;
2181
+ details: import("database/api/.generated/runtime/library").JsonValue;
2182
+ status: import("../../../database/api/.generated").$Enums.RunStatus;
2183
+ campaignId: string;
2184
+ computedUntil: bigint;
2185
+ processingStarted: bigint;
2179
2186
  };
2180
2187
  };
2181
2188
  };
@@ -2158,6 +2158,13 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
2158
2158
  campaignId: string;
2159
2159
  computedUntil: bigint;
2160
2160
  processingStarted: bigint;
2161
+ }[] | {
2162
+ error: string;
2163
+ details: import("database/api/.generated/runtime/library").JsonValue;
2164
+ status: import("../../../database/api/.generated").$Enums.RunStatus;
2165
+ campaignId: string;
2166
+ computedUntil: bigint;
2167
+ processingStarted: bigint;
2161
2168
  };
2162
2169
  };
2163
2170
  };
@@ -2159,6 +2159,13 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
2159
2159
  campaignId: string;
2160
2160
  computedUntil: bigint;
2161
2161
  processingStarted: bigint;
2162
+ }[] | {
2163
+ error: string;
2164
+ details: import("database/api/.generated/runtime/library").JsonValue;
2165
+ status: import("../../../database/api/.generated").$Enums.RunStatus;
2166
+ campaignId: string;
2167
+ computedUntil: bigint;
2168
+ processingStarted: bigint;
2162
2169
  };
2163
2170
  };
2164
2171
  };
@@ -2161,6 +2161,13 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
2161
2161
  campaignId: string;
2162
2162
  computedUntil: bigint;
2163
2163
  processingStarted: bigint;
2164
+ }[] | {
2165
+ error: string;
2166
+ details: import("database/api/.generated/runtime/library").JsonValue;
2167
+ status: import("../../../database/api/.generated").$Enums.RunStatus;
2168
+ campaignId: string;
2169
+ computedUntil: bigint;
2170
+ processingStarted: bigint;
2164
2171
  };
2165
2172
  };
2166
2173
  };