@eyettea/zeta-backend 0.0.1-rc.12 → 0.0.1-rc.4

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.
Files changed (33) hide show
  1. package/dist/types/api/index.d.ts +3 -4
  2. package/dist/types/api/index.d.ts.map +1 -1
  3. package/dist/types/app.d.ts +270 -485
  4. package/dist/types/app.d.ts.map +1 -1
  5. package/dist/types/database/mints.d.ts +1 -1
  6. package/dist/types/database/mints.d.ts.map +1 -1
  7. package/dist/types/lib/errors.d.ts +3 -86
  8. package/dist/types/lib/errors.d.ts.map +1 -1
  9. package/dist/types/lib/logger.d.ts +1 -1
  10. package/dist/types/lib/logger.d.ts.map +1 -1
  11. package/dist/types/routes/compute.d.ts +17 -38
  12. package/dist/types/routes/compute.d.ts.map +1 -1
  13. package/dist/types/routes/ohlcv.d.ts +9 -19
  14. package/dist/types/routes/ohlcv.d.ts.map +1 -1
  15. package/dist/types/routes/pools.d.ts +66 -174
  16. package/dist/types/routes/pools.d.ts.map +1 -1
  17. package/dist/types/routes/response.d.ts +16 -63
  18. package/dist/types/routes/response.d.ts.map +1 -1
  19. package/dist/types/services/Services.d.ts +1 -1
  20. package/dist/types/services/Services.d.ts.map +1 -1
  21. package/dist/types/services/computeService.d.ts +2 -2
  22. package/dist/types/services/computeService.d.ts.map +1 -1
  23. package/dist/types/services/poolEventsHandler.d.ts +1 -1
  24. package/dist/types/services/poolEventsHandler.d.ts.map +1 -1
  25. package/dist/types/services/poolEventsSubscriptionService.d.ts +1 -1
  26. package/dist/types/services/poolEventsSubscriptionService.d.ts.map +1 -1
  27. package/dist/types/services/poolService.d.ts +42 -16
  28. package/dist/types/services/poolService.d.ts.map +1 -1
  29. package/dist/types/services/poolStatsService.d.ts +2 -15
  30. package/dist/types/services/poolStatsService.d.ts.map +1 -1
  31. package/dist/types/services/priceService.d.ts +1 -1
  32. package/dist/types/services/priceService.d.ts.map +1 -1
  33. package/package.json +5 -12
@@ -1 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAc,CAAC;AAC/B,MAAM,MAAM,GAAG,GAAG,OAAO,GAAG,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { type SqlClient } from '../config/database';
2
- import type { ClmmPoolTypes } from '@eyettea/typescript-sdk';
2
+ import type { ClmmPoolTypes } from '@h0ngcha0/typescript-sdk';
3
3
  import type { ClmmPositionRow } from './types';
4
4
  export declare function insertMints(params: {
5
5
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"mints.d.ts","sourceRoot":"","sources":["../../../src/database/mints.ts"],"names":[],"mappings":"AAAA,OAAY,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,wBAAsB,WAAW,CAC/B,MAAM,EAAE;IACN,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,IAAI,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AgB,CACpC,UAAU,EAAE,MAAM,EAAE,EACpB,MAAM,GAAE,SAAe,GACtB,OAAO,CAAC,eAAe,EAAE,CAAC,CAwB5B"}
@@ -1,91 +1,8 @@
1
- import { z } from 'zod';
2
- export declare abstract class BaseError extends Error {
3
- message: string;
4
- details?: Record<string, unknown> | undefined;
5
- abstract status: number;
6
- abstract error: string;
7
- constructor(message: string, details?: Record<string, unknown> | undefined);
8
- toResponse(): Response;
9
- }
10
- export declare const BadRequestStatus = 400;
11
- export declare class BadRequest extends BaseError {
12
- status: number;
1
+ export declare class ValidationError extends Error {
13
2
  constructor(message: string);
14
- error: "Bad request";
15
- static getSchema(): z.ZodObject<{
16
- message: z.ZodString;
17
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
18
- } & {
19
- error: z.ZodLiteral<"Bad request">;
20
- }, "strip", z.ZodTypeAny, {
21
- message: string;
22
- error: "Bad request";
23
- details?: Record<string, unknown> | undefined;
24
- }, {
25
- message: string;
26
- error: "Bad request";
27
- details?: Record<string, unknown> | undefined;
28
- }>;
29
- }
30
- export declare const NotFoundStatus = 404;
31
- export declare class NotFound extends BaseError {
32
- status: number;
33
- error: "Resource not found";
34
- constructor(subject: string);
35
- static getSchema(): z.ZodObject<{
36
- message: z.ZodString;
37
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
38
- } & {
39
- error: z.ZodLiteral<"Resource not found">;
40
- }, "strip", z.ZodTypeAny, {
41
- message: string;
42
- error: "Resource not found";
43
- details?: Record<string, unknown> | undefined;
44
- }, {
45
- message: string;
46
- error: "Resource not found";
47
- details?: Record<string, unknown> | undefined;
48
- }>;
49
- }
50
- export declare const ValidationErrorStatus = 422;
51
- export declare class ValidationError extends BaseError {
52
- status: number;
53
- error: "Validation error";
54
- constructor(message: string, details?: Record<string, unknown>);
55
- static getSchema(): z.ZodObject<{
56
- message: z.ZodString;
57
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
58
- } & {
59
- error: z.ZodLiteral<"Validation error">;
60
- }, "strip", z.ZodTypeAny, {
61
- message: string;
62
- error: "Validation error";
63
- details?: Record<string, unknown> | undefined;
64
- }, {
65
- message: string;
66
- error: "Validation error";
67
- details?: Record<string, unknown> | undefined;
68
- }>;
69
3
  }
70
- export declare const InternalServerErrorStatus = 500;
71
- export declare class InternalServerError extends BaseError {
72
- status: number;
73
- error: "Internal server error";
4
+ export declare function isValidationError(error: unknown): error is ValidationError;
5
+ export declare class DataParsingError extends Error {
74
6
  constructor(message: string);
75
- static getSchema(): z.ZodObject<{
76
- message: z.ZodString;
77
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
78
- } & {
79
- error: z.ZodLiteral<"Internal server error">;
80
- }, "strip", z.ZodTypeAny, {
81
- message: string;
82
- error: "Internal server error";
83
- details?: Record<string, unknown> | undefined;
84
- }, {
85
- message: string;
86
- error: "Internal server error";
87
- details?: Record<string, unknown> | undefined;
88
- }>;
89
7
  }
90
- export declare function convertElysiaError(code: string | number, error: any): BaseError;
91
8
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,8BAAsB,SAAU,SAAQ,KAAK;IAKlC,OAAO,EAAE,MAAM;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAL1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;gBAGb,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;IAM1C,UAAU,IAAI,QAAQ;CAavB;AAED,eAAO,MAAM,gBAAgB,MAAM,CAAA;AACnC,qBAAa,UAAW,SAAQ,SAAS;IACvC,MAAM,SAAmB;gBACb,OAAO,EAAE,MAAM;IAG3B,KAAK,gBAAgD;IACrD,MAAM,CAAC,SAAS;;;;;;;;;;;;;;CAKjB;AAED,eAAO,MAAM,cAAc,MAAM,CAAA;AACjC,qBAAa,QAAS,SAAQ,SAAS;IACrC,MAAM,SAAiB;IACvB,KAAK,uBAA8C;gBACvC,OAAO,EAAE,MAAM;IAG3B,MAAM,CAAC,SAAS;;;;;;;;;;;;;;CAKjB;AAED,eAAO,MAAM,qBAAqB,MAAM,CAAA;AACxC,qBAAa,eAAgB,SAAQ,SAAS;IAC5C,MAAM,SAAwB;IAC9B,KAAK,qBAAqD;gBAC9C,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAG9D,MAAM,CAAC,SAAS;;;;;;;;;;;;;;CAKjB;AAED,eAAO,MAAM,yBAAyB,MAAM,CAAA;AAC5C,qBAAa,mBAAoB,SAAQ,SAAS;IAChD,MAAM,SAA4B;IAClC,KAAK,0BAAyD;gBAClD,OAAO,EAAE,MAAM;IAG3B,MAAM,CAAC,SAAS;;;;;;;;;;;;;;CAKjB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,SAAS,CAuB/E"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI5B;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B"}
@@ -1,2 +1,2 @@
1
- export declare const logger: import("@eyettea/typescript-sdk").Logger;
1
+ export declare const logger: import("@h0ngcha0/typescript-sdk").Logger;
2
2
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/lib/logger.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,MAAM,0CAA4B,CAAC"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/lib/logger.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,MAAM,2CAA4B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { Elysia } from 'elysia';
2
2
  import type { SwapComputeResult } from '../services/computeService';
3
+ import type { ApiResponse } from './response';
3
4
  export interface SwapComputeError {
4
5
  id: string;
5
6
  success: false;
@@ -43,27 +44,16 @@ export declare const computeRouter: Elysia<"/compute", {
43
44
  };
44
45
  headers: unknown;
45
46
  response: {
46
- 400: {
47
- message: string;
48
- error: "Bad request";
49
- details?: Record<string, unknown> | undefined;
50
- };
51
- 404: {
52
- message: string;
53
- error: "Resource not found";
54
- details?: Record<string, unknown> | undefined;
55
- };
47
+ 200: ApiResponse<SwapComputeResult>;
56
48
  422: {
57
- message: string;
58
- error: "Validation error";
59
- details?: Record<string, unknown> | undefined;
60
- };
61
- 500: {
62
- message: string;
63
- error: "Internal server error";
64
- details?: Record<string, unknown> | undefined;
49
+ type: "validation";
50
+ on: string;
51
+ summary?: string;
52
+ message?: string;
53
+ found?: unknown;
54
+ property?: string;
55
+ expected?: string;
65
56
  };
66
- 200: SwapComputeResult;
67
57
  };
68
58
  };
69
59
  };
@@ -83,27 +73,16 @@ export declare const computeRouter: Elysia<"/compute", {
83
73
  };
84
74
  headers: unknown;
85
75
  response: {
86
- 400: {
87
- message: string;
88
- error: "Bad request";
89
- details?: Record<string, unknown> | undefined;
90
- };
91
- 404: {
92
- message: string;
93
- error: "Resource not found";
94
- details?: Record<string, unknown> | undefined;
95
- };
76
+ 200: ApiResponse<SwapComputeResult>;
96
77
  422: {
97
- message: string;
98
- error: "Validation error";
99
- details?: Record<string, unknown> | undefined;
100
- };
101
- 500: {
102
- message: string;
103
- error: "Internal server error";
104
- details?: Record<string, unknown> | undefined;
78
+ type: "validation";
79
+ on: string;
80
+ summary?: string;
81
+ message?: string;
82
+ found?: unknown;
83
+ property?: string;
84
+ expected?: string;
105
85
  };
106
- 200: SwapComputeResult;
107
86
  };
108
87
  };
109
88
  };
@@ -1 +1 @@
1
- {"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../../../src/routes/compute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAK,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAMlE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,KAAK,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;IACd,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,GAAG,gBAAgB,CAAC;AAIxE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuFvB,CAAC"}
1
+ {"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../../../src/routes/compute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAK,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAI9C,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,KAAK,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;IACd,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,GAAG,gBAAgB,CAAC;AAIxE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqFvB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { Elysia } from 'elysia';
2
+ import type { ApiResponse } from './response';
2
3
  import type { OHLVCResult } from '../services/poolStatsService';
3
4
  export declare const ohlcvRouter: Elysia<"/api/v1/ohlcv", {
4
5
  decorator: {};
@@ -32,27 +33,16 @@ export declare const ohlcvRouter: Elysia<"/api/v1/ohlcv", {
32
33
  };
33
34
  headers: unknown;
34
35
  response: {
35
- 400: {
36
- message: string;
37
- error: "Bad request";
38
- details?: Record<string, unknown> | undefined;
39
- };
40
- 404: {
41
- message: string;
42
- error: "Resource not found";
43
- details?: Record<string, unknown> | undefined;
44
- };
36
+ 200: ApiResponse<OHLVCResult>;
45
37
  422: {
46
- message: string;
47
- error: "Validation error";
48
- details?: Record<string, unknown> | undefined;
49
- };
50
- 500: {
51
- message: string;
52
- error: "Internal server error";
53
- details?: Record<string, unknown> | undefined;
38
+ type: "validation";
39
+ on: string;
40
+ summary?: string;
41
+ message?: string;
42
+ found?: unknown;
43
+ property?: string;
44
+ expected?: string;
54
45
  };
55
- 200: OHLVCResult;
56
46
  };
57
47
  };
58
48
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ohlcv.d.ts","sourceRoot":"","sources":["../../../src/routes/ohlcv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAK,MAAM,QAAQ,CAAC;AAInC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI/D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsGvB,CAAC"}
1
+ {"version":3,"file":"ohlcv.d.ts","sourceRoot":"","sources":["../../../src/routes/ohlcv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAK,MAAM,QAAQ,CAAC;AAGnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI/D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGvB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Elysia } from 'elysia';
2
- import { PaginatedApiResponse } from './response';
2
+ import type { ApiResponse } from './response';
3
3
  import type { LiquidityLineData } from '../services/poolStatsService';
4
4
  import type { TokenPrice } from '../services/priceService';
5
5
  import type { TokenInfo } from '@alephium/token-list';
@@ -60,27 +60,7 @@ export declare const poolsRouter: Elysia<"/pools", {
60
60
  query: unknown;
61
61
  headers: unknown;
62
62
  response: {
63
- 400: {
64
- message: string;
65
- error: "Bad request";
66
- details?: Record<string, unknown> | undefined;
67
- };
68
- 404: {
69
- message: string;
70
- error: "Resource not found";
71
- details?: Record<string, unknown> | undefined;
72
- };
73
- 422: {
74
- message: string;
75
- error: "Validation error";
76
- details?: Record<string, unknown> | undefined;
77
- };
78
- 500: {
79
- message: string;
80
- error: "Internal server error";
81
- details?: Record<string, unknown> | undefined;
82
- };
83
- 200: TokenListResponse;
63
+ 200: ApiResponse<TokenListResponse>;
84
64
  };
85
65
  };
86
66
  };
@@ -97,27 +77,16 @@ export declare const poolsRouter: Elysia<"/pools", {
97
77
  };
98
78
  headers: unknown;
99
79
  response: {
100
- 400: {
101
- message: string;
102
- error: "Bad request";
103
- details?: Record<string, unknown> | undefined;
104
- };
105
- 404: {
106
- message: string;
107
- error: "Resource not found";
108
- details?: Record<string, unknown> | undefined;
109
- };
80
+ 200: ApiResponse<ClmmLiquidityLinePayload>;
110
81
  422: {
111
- message: string;
112
- error: "Validation error";
113
- details?: Record<string, unknown> | undefined;
114
- };
115
- 500: {
116
- message: string;
117
- error: "Internal server error";
118
- details?: Record<string, unknown> | undefined;
82
+ type: "validation";
83
+ on: string;
84
+ summary?: string;
85
+ message?: string;
86
+ found?: unknown;
87
+ property?: string;
88
+ expected?: string;
119
89
  };
120
- 200: ClmmLiquidityLinePayload;
121
90
  };
122
91
  };
123
92
  };
@@ -135,27 +104,16 @@ export declare const poolsRouter: Elysia<"/pools", {
135
104
  };
136
105
  headers: unknown;
137
106
  response: {
138
- 400: {
139
- message: string;
140
- error: "Bad request";
141
- details?: Record<string, unknown> | undefined;
142
- };
143
- 404: {
144
- message: string;
145
- error: "Resource not found";
146
- details?: Record<string, unknown> | undefined;
147
- };
107
+ 200: ApiResponse<TokenPricesResponse>;
148
108
  422: {
149
- message: string;
150
- error: "Validation error";
151
- details?: Record<string, unknown> | undefined;
109
+ type: "validation";
110
+ on: string;
111
+ summary?: string;
112
+ message?: string;
113
+ found?: unknown;
114
+ property?: string;
115
+ expected?: string;
152
116
  };
153
- 500: {
154
- message: string;
155
- error: "Internal server error";
156
- details?: Record<string, unknown> | undefined;
157
- };
158
- 200: TokenPricesResponse;
159
117
  };
160
118
  };
161
119
  };
@@ -176,27 +134,16 @@ export declare const poolsRouter: Elysia<"/pools", {
176
134
  };
177
135
  headers: unknown;
178
136
  response: {
179
- 400: {
180
- message: string;
181
- error: "Bad request";
182
- details?: Record<string, unknown> | undefined;
183
- };
184
- 404: {
185
- message: string;
186
- error: "Resource not found";
187
- details?: Record<string, unknown> | undefined;
188
- };
137
+ 200: ApiResponse<PoolListResponse>;
189
138
  422: {
190
- message: string;
191
- error: "Validation error";
192
- details?: Record<string, unknown> | undefined;
193
- };
194
- 500: {
195
- message: string;
196
- error: "Internal server error";
197
- details?: Record<string, unknown> | undefined;
139
+ type: "validation";
140
+ on: string;
141
+ summary?: string;
142
+ message?: string;
143
+ found?: unknown;
144
+ property?: string;
145
+ expected?: string;
198
146
  };
199
- 200: PaginatedApiResponse<PoolListResponse>;
200
147
  };
201
148
  };
202
149
  };
@@ -214,27 +161,16 @@ export declare const poolsRouter: Elysia<"/pools", {
214
161
  };
215
162
  headers: unknown;
216
163
  response: {
217
- 400: {
218
- message: string;
219
- error: "Bad request";
220
- details?: Record<string, unknown> | undefined;
221
- };
222
- 404: {
223
- message: string;
224
- error: "Resource not found";
225
- details?: Record<string, unknown> | undefined;
226
- };
164
+ 200: ApiResponse<PoolListFromIdsResponse>;
227
165
  422: {
228
- message: string;
229
- error: "Validation error";
230
- details?: Record<string, unknown> | undefined;
231
- };
232
- 500: {
233
- message: string;
234
- error: "Internal server error";
235
- details?: Record<string, unknown> | undefined;
166
+ type: "validation";
167
+ on: string;
168
+ summary?: string;
169
+ message?: string;
170
+ found?: unknown;
171
+ property?: string;
172
+ expected?: string;
236
173
  };
237
- 200: PoolListFromIdsResponse;
238
174
  };
239
175
  };
240
176
  };
@@ -252,27 +188,16 @@ export declare const poolsRouter: Elysia<"/pools", {
252
188
  };
253
189
  headers: unknown;
254
190
  response: {
255
- 400: {
256
- message: string;
257
- error: "Bad request";
258
- details?: Record<string, unknown> | undefined;
259
- };
260
- 404: {
261
- message: string;
262
- error: "Resource not found";
263
- details?: Record<string, unknown> | undefined;
264
- };
191
+ 200: ApiResponse<Events>;
265
192
  422: {
266
- message: string;
267
- error: "Validation error";
268
- details?: Record<string, unknown> | undefined;
193
+ type: "validation";
194
+ on: string;
195
+ summary?: string;
196
+ message?: string;
197
+ found?: unknown;
198
+ property?: string;
199
+ expected?: string;
269
200
  };
270
- 500: {
271
- message: string;
272
- error: "Internal server error";
273
- details?: Record<string, unknown> | undefined;
274
- };
275
- 200: Events;
276
201
  };
277
202
  };
278
203
  };
@@ -290,27 +215,16 @@ export declare const poolsRouter: Elysia<"/pools", {
290
215
  };
291
216
  headers: unknown;
292
217
  response: {
293
- 400: {
294
- message: string;
295
- error: "Bad request";
296
- details?: Record<string, unknown> | undefined;
297
- };
298
- 404: {
299
- message: string;
300
- error: "Resource not found";
301
- details?: Record<string, unknown> | undefined;
302
- };
218
+ 200: ApiResponse<ClmmPosition[]>;
303
219
  422: {
304
- message: string;
305
- error: "Validation error";
306
- details?: Record<string, unknown> | undefined;
220
+ type: "validation";
221
+ on: string;
222
+ summary?: string;
223
+ message?: string;
224
+ found?: unknown;
225
+ property?: string;
226
+ expected?: string;
307
227
  };
308
- 500: {
309
- message: string;
310
- error: "Internal server error";
311
- details?: Record<string, unknown> | undefined;
312
- };
313
- 200: ClmmPosition[];
314
228
  };
315
229
  };
316
230
  };
@@ -331,27 +245,16 @@ export declare const poolsRouter: Elysia<"/pools", {
331
245
  };
332
246
  headers: unknown;
333
247
  response: {
334
- 400: {
335
- message: string;
336
- error: "Bad request";
337
- details?: Record<string, unknown> | undefined;
338
- };
339
- 404: {
340
- message: string;
341
- error: "Resource not found";
342
- details?: Record<string, unknown> | undefined;
343
- };
248
+ 200: ApiResponse<PoolListResponse>;
344
249
  422: {
345
- message: string;
346
- error: "Validation error";
347
- details?: Record<string, unknown> | undefined;
348
- };
349
- 500: {
350
- message: string;
351
- error: "Internal server error";
352
- details?: Record<string, unknown> | undefined;
250
+ type: "validation";
251
+ on: string;
252
+ summary?: string;
253
+ message?: string;
254
+ found?: unknown;
255
+ property?: string;
256
+ expected?: string;
353
257
  };
354
- 200: PaginatedApiResponse<PoolListResponse>;
355
258
  };
356
259
  };
357
260
  };
@@ -371,27 +274,16 @@ export declare const poolsRouter: Elysia<"/pools", {
371
274
  };
372
275
  headers: unknown;
373
276
  response: {
374
- 400: {
375
- message: string;
376
- error: "Bad request";
377
- details?: Record<string, unknown> | undefined;
378
- };
379
- 404: {
380
- message: string;
381
- error: "Resource not found";
382
- details?: Record<string, unknown> | undefined;
383
- };
277
+ 200: ApiResponse<LiquidityLineData>;
384
278
  422: {
385
- message: string;
386
- error: "Validation error";
387
- details?: Record<string, unknown> | undefined;
388
- };
389
- 500: {
390
- message: string;
391
- error: "Internal server error";
392
- details?: Record<string, unknown> | undefined;
279
+ type: "validation";
280
+ on: string;
281
+ summary?: string;
282
+ message?: string;
283
+ found?: unknown;
284
+ property?: string;
285
+ expected?: string;
393
286
  };
394
- 200: LiquidityLineData;
395
287
  };
396
288
  };
397
289
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pools.d.ts","sourceRoot":"","sources":["../../../src/routes/pools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAK,MAAM,QAAQ,CAAC;AAGnC,OAAO,EAA+B,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAE/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAGV,aAAa,EACb,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAMjD,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AAEvD,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,uBAAuB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,aAAa,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IAC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