@merkl/api 0.10.154 → 0.10.155

Sign up to get free protection for your applications and to get access to all the features.
@@ -1226,7 +1226,7 @@ declare const eden: {
1226
1226
  get: (options: {
1227
1227
  headers?: Record<string, unknown> | undefined;
1228
1228
  query: {
1229
- chainId: number | number[];
1229
+ chainId: number[];
1230
1230
  };
1231
1231
  fetch?: RequestInit | undefined;
1232
1232
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
@@ -3319,7 +3319,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
3319
3319
  address: string;
3320
3320
  };
3321
3321
  query: {
3322
- chainId: number | number[];
3322
+ chainId: number[];
3323
3323
  };
3324
3324
  headers: unknown;
3325
3325
  response: {
@@ -5185,7 +5185,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5185
5185
  get: (options: {
5186
5186
  headers?: Record<string, unknown> | undefined;
5187
5187
  query: {
5188
- chainId: number | number[];
5188
+ chainId: number[];
5189
5189
  };
5190
5190
  fetch?: RequestInit | undefined;
5191
5191
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
@@ -1557,7 +1557,7 @@ declare const app: Elysia<"", false, {
1557
1557
  address: string;
1558
1558
  };
1559
1559
  query: {
1560
- chainId: number | number[];
1560
+ chainId: number[];
1561
1561
  };
1562
1562
  headers: unknown;
1563
1563
  response: {
package/dist/src/index.js CHANGED
@@ -32,34 +32,10 @@ const app = new Elysia({
32
32
  version: "1.0.1",
33
33
  },
34
34
  },
35
- exclude: [/engine\/*/, /v1\/.*/, /v2\/.*/],
35
+ exclude: [/engine\/*/, /v1\/.*/, /v2\/.*/, /full\/*/],
36
36
  }))
37
37
  .use(cors())
38
38
  .get("/", () => "Merkl API")
39
- .use(swagger({
40
- path: "/docs",
41
- documentation: {
42
- info: {
43
- contact: {
44
- email: "contact@angle.money",
45
- name: "Angle Labs",
46
- },
47
- description: "API to access data related to merkl campaigns, built and maintained by Angle Labs. This API is provided as is, without any warranty of any kind.",
48
- license: {
49
- name: "UNLICENSED",
50
- },
51
- title: "Merkl API v4 (in development)",
52
- version: "1.0.1",
53
- },
54
- tags: [
55
- {
56
- name: "Participate",
57
- description: "Interact with opportunities on-chain",
58
- },
59
- ],
60
- },
61
- exclude: [/v1\/.*/, /v2\/.*/, /v3\/.*/, /docs.*/, "/"],
62
- }))
63
39
  .use(v4)
64
40
  .use(autoroutes({
65
41
  routesDir: `${import.meta.dir}/routes`,
@@ -12,7 +12,7 @@ export declare const ChainUniqueDto: import("@sinclair/typebox").TObject<{
12
12
  chainId: import("@sinclair/typebox").TNumber;
13
13
  }>;
14
14
  export declare const ChainArrayDto: import("@sinclair/typebox").TObject<{
15
- chainId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>;
15
+ chainId: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>, number[]>;
16
16
  }>;
17
17
  export declare const CreateChainExplorerDto: import("@sinclair/typebox").TObject<{
18
18
  type: import("@sinclair/typebox").TEnum<{
@@ -8,7 +8,10 @@ export const ChainUniqueDto = t.Object({
8
8
  chainId: t.Numeric(),
9
9
  });
10
10
  export const ChainArrayDto = t.Object({
11
- chainId: t.Union([t.Numeric(), t.Array(t.Numeric())]),
11
+ chainId: t
12
+ .Transform(t.Union([t.String(), t.Array(t.Numeric())]))
13
+ .Decode(value => (typeof value === "string" ? value.split(",").map(v => Number.parseInt(v)) : value))
14
+ .Encode(value => [...value]),
12
15
  });
13
16
  export const CreateChainExplorerDto = t.Object({
14
17
  type: t.Enum(ExplorerType),
@@ -1539,7 +1539,7 @@ export declare const v4: Elysia<"/v4", false, {
1539
1539
  address: string;
1540
1540
  };
1541
1541
  query: {
1542
- chainId: number | number[];
1542
+ chainId: number[];
1543
1543
  };
1544
1544
  headers: unknown;
1545
1545
  response: {
@@ -191,7 +191,7 @@ export declare const UserController: Elysia<"/users", false, {
191
191
  address: string;
192
192
  };
193
193
  query: {
194
- chainId: number | number[];
194
+ chainId: number[];
195
195
  };
196
196
  headers: unknown;
197
197
  response: {
@@ -1565,7 +1565,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1565
1565
  address: string;
1566
1566
  };
1567
1567
  query: {
1568
- chainId: number | number[];
1568
+ chainId: number[];
1569
1569
  };
1570
1570
  headers: unknown;
1571
1571
  response: {
@@ -1563,7 +1563,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1563
1563
  address: string;
1564
1564
  };
1565
1565
  query: {
1566
- chainId: number | number[];
1566
+ chainId: number[];
1567
1567
  };
1568
1568
  headers: unknown;
1569
1569
  response: {
@@ -1566,7 +1566,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1566
1566
  address: string;
1567
1567
  };
1568
1568
  query: {
1569
- chainId: number | number[];
1569
+ chainId: number[];
1570
1570
  };
1571
1571
  headers: unknown;
1572
1572
  response: {
@@ -2204,7 +2204,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
2204
2204
  body: unknown;
2205
2205
  params: {};
2206
2206
  query: {
2207
- types?: string | number | string[] | number[] | undefined;
2207
+ types?: string | number | number[] | string[] | undefined;
2208
2208
  live?: boolean | undefined;
2209
2209
  chainIds?: string | string[] | undefined;
2210
2210
  creatorTag?: string | undefined;
@@ -1557,7 +1557,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1557
1557
  address: string;
1558
1558
  };
1559
1559
  query: {
1560
- chainId: number | number[];
1560
+ chainId: number[];
1561
1561
  };
1562
1562
  headers: unknown;
1563
1563
  response: {
@@ -1562,7 +1562,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1562
1562
  address: string;
1563
1563
  };
1564
1564
  query: {
1565
- chainId: number | number[];
1565
+ chainId: number[];
1566
1566
  };
1567
1567
  headers: unknown;
1568
1568
  response: {
@@ -1580,7 +1580,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1580
1580
  address: string;
1581
1581
  };
1582
1582
  query: {
1583
- chainId: number | number[];
1583
+ chainId: number[];
1584
1584
  };
1585
1585
  headers: unknown;
1586
1586
  response: {
@@ -1581,7 +1581,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1581
1581
  address: string;
1582
1582
  };
1583
1583
  query: {
1584
- chainId: number | number[];
1584
+ chainId: number[];
1585
1585
  };
1586
1586
  headers: unknown;
1587
1587
  response: {
@@ -1563,7 +1563,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1563
1563
  address: string;
1564
1564
  };
1565
1565
  query: {
1566
- chainId: number | number[];
1566
+ chainId: number[];
1567
1567
  };
1568
1568
  headers: unknown;
1569
1569
  response: {
@@ -1564,7 +1564,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1564
1564
  address: string;
1565
1565
  };
1566
1566
  query: {
1567
- chainId: number | number[];
1567
+ chainId: number[];
1568
1568
  };
1569
1569
  headers: unknown;
1570
1570
  response: {
@@ -1566,7 +1566,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1566
1566
  address: string;
1567
1567
  };
1568
1568
  query: {
1569
- chainId: number | number[];
1569
+ chainId: number[];
1570
1570
  };
1571
1571
  headers: unknown;
1572
1572
  response: {