@merkl/api 0.17.30 → 0.17.31
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.
package/dist/src/eden/index.d.ts
CHANGED
@@ -6922,9 +6922,7 @@ declare const eden: {
|
|
6922
6922
|
};
|
6923
6923
|
fetch?: RequestInit | undefined;
|
6924
6924
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
6925
|
-
200:
|
6926
|
-
message: string;
|
6927
|
-
};
|
6925
|
+
200: unknown;
|
6928
6926
|
}>>;
|
6929
6927
|
};
|
6930
6928
|
campaigns: {
|
@@ -11778,9 +11776,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
11778
11776
|
};
|
11779
11777
|
headers: unknown;
|
11780
11778
|
response: {
|
11781
|
-
200:
|
11782
|
-
message: string;
|
11783
|
-
};
|
11779
|
+
200: unknown;
|
11784
11780
|
};
|
11785
11781
|
};
|
11786
11782
|
};
|
@@ -19400,9 +19396,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
19400
19396
|
};
|
19401
19397
|
fetch?: RequestInit | undefined;
|
19402
19398
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
19403
|
-
200:
|
19404
|
-
message: string;
|
19405
|
-
};
|
19399
|
+
200: unknown;
|
19406
19400
|
}>>;
|
19407
19401
|
};
|
19408
19402
|
campaigns: {
|
package/dist/src/index.d.ts
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
import type Elysia from "elysia";
|
2
|
+
/**
|
3
|
+
* @deprecated
|
4
|
+
* This whole file is deprecated but is still used by Pancakeswap to populate their db so we can't remove it yet.
|
5
|
+
*/
|
2
6
|
export declare const query: import("@sinclair/typebox").TObject<{
|
3
7
|
campaignId: import("@sinclair/typebox").TString;
|
4
8
|
chainId: import("@sinclair/typebox").TNumber;
|
@@ -28,9 +32,7 @@ declare const _default: (app: Elysia) => Elysia<"", false, {
|
|
28
32
|
};
|
29
33
|
headers: unknown;
|
30
34
|
response: {
|
31
|
-
200:
|
32
|
-
message: string;
|
33
|
-
};
|
35
|
+
200: unknown;
|
34
36
|
};
|
35
37
|
};
|
36
38
|
};
|
@@ -1,14 +1,28 @@
|
|
1
1
|
import checkQueryChainIdValidity from "../../hooks/checkQueryChainIdValidity";
|
2
|
+
import { engineDbClient } from "../../utils/prisma";
|
3
|
+
import { Prisma } from "../../../database/engine/.generated";
|
2
4
|
import { t } from "elysia";
|
5
|
+
/**
|
6
|
+
* @deprecated
|
7
|
+
* This whole file is deprecated but is still used by Pancakeswap to populate their db so we can't remove it yet.
|
8
|
+
*/
|
3
9
|
export const query = t.Object({
|
4
10
|
campaignId: t.String(),
|
5
11
|
chainId: t.Numeric(),
|
6
12
|
byReason: t.Optional(t.BooleanString()),
|
7
13
|
});
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
14
|
+
const CLAIMS_OVER_TIME = (chainId, campaignId) => Prisma.sql `
|
15
|
+
SELECT timestamp, recipient, reason, claimed
|
16
|
+
FROM "ClaimsOverTime"
|
17
|
+
WHERE
|
18
|
+
"chainId"=${chainId} AND
|
19
|
+
"campaignId"=${campaignId}
|
20
|
+
ORDER BY timestamp ASC
|
21
|
+
`;
|
22
|
+
export default (app) => app.use(checkQueryChainIdValidity()).get("/campaignClaims", async ({ query }) => {
|
23
|
+
const campaignId = query.campaignId;
|
24
|
+
const chainId = query.chainId;
|
25
|
+
return await engineDbClient.$queryRaw(CLAIMS_OVER_TIME(chainId, campaignId));
|
12
26
|
}, {
|
13
27
|
query,
|
14
28
|
tags: ["Campaigns"],
|