@noya-ai/data-server-schemas 0.1.0

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 (85) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/dist/alternative/schemas.cjs +44 -0
  4. package/dist/alternative/schemas.d.cts +2 -0
  5. package/dist/alternative/schemas.d.ts +2 -0
  6. package/dist/alternative/schemas.js +11 -0
  7. package/dist/batch/schemas.cjs +73 -0
  8. package/dist/batch/schemas.d.cts +2 -0
  9. package/dist/batch/schemas.d.ts +2 -0
  10. package/dist/batch/schemas.js +17 -0
  11. package/dist/chunk-BWY4ZL7E.js +142 -0
  12. package/dist/chunk-C3YNWX7W.js +256 -0
  13. package/dist/chunk-DKMPZFSH.js +29 -0
  14. package/dist/chunk-KLRIACSR.js +162 -0
  15. package/dist/chunk-MECUVGQT.js +203 -0
  16. package/dist/chunk-MLKGABMK.js +9 -0
  17. package/dist/chunk-PHNEQDUP.js +89 -0
  18. package/dist/chunk-ROAH5BN3.js +58 -0
  19. package/dist/chunk-VK45O334.js +129 -0
  20. package/dist/chunk-W5SLY2ZT.js +134 -0
  21. package/dist/chunk-ZP2HSALI.js +150 -0
  22. package/dist/chunk-ZTOGXNAW.js +198 -0
  23. package/dist/coingecko/schemas.cjs +177 -0
  24. package/dist/coingecko/schemas.d.cts +2 -0
  25. package/dist/coingecko/schemas.d.ts +2 -0
  26. package/dist/coingecko/schemas.js +43 -0
  27. package/dist/coinglass/schemas.cjs +213 -0
  28. package/dist/coinglass/schemas.d.cts +2 -0
  29. package/dist/coinglass/schemas.d.ts +2 -0
  30. package/dist/coinglass/schemas.js +63 -0
  31. package/dist/composite/schemas.cjs +144 -0
  32. package/dist/composite/schemas.d.cts +2 -0
  33. package/dist/composite/schemas.d.ts +2 -0
  34. package/dist/composite/schemas.js +23 -0
  35. package/dist/cryptonews/schemas.cjs +104 -0
  36. package/dist/cryptonews/schemas.d.cts +2 -0
  37. package/dist/cryptonews/schemas.d.ts +2 -0
  38. package/dist/cryptonews/schemas.js +23 -0
  39. package/dist/defillama/schemas.cjs +157 -0
  40. package/dist/defillama/schemas.d.cts +2 -0
  41. package/dist/defillama/schemas.d.ts +2 -0
  42. package/dist/defillama/schemas.js +37 -0
  43. package/dist/geckoterminal/schemas.cjs +149 -0
  44. package/dist/geckoterminal/schemas.d.cts +2 -0
  45. package/dist/geckoterminal/schemas.d.ts +2 -0
  46. package/dist/geckoterminal/schemas.js +33 -0
  47. package/dist/index.cjs +1359 -0
  48. package/dist/index.d.cts +12 -0
  49. package/dist/index.d.ts +12 -0
  50. package/dist/index.js +47 -0
  51. package/dist/kaito/schemas.cjs +218 -0
  52. package/dist/kaito/schemas.d.cts +2 -0
  53. package/dist/kaito/schemas.d.ts +2 -0
  54. package/dist/kaito/schemas.js +45 -0
  55. package/dist/moralis/schemas.cjs +165 -0
  56. package/dist/moralis/schemas.d.cts +2 -0
  57. package/dist/moralis/schemas.d.ts +2 -0
  58. package/dist/moralis/schemas.js +29 -0
  59. package/dist/noya/schemas.cjs +271 -0
  60. package/dist/noya/schemas.d.cts +2 -0
  61. package/dist/noya/schemas.d.ts +2 -0
  62. package/dist/noya/schemas.js +57 -0
  63. package/dist/schemas-6ZorQZBC.d.cts +435 -0
  64. package/dist/schemas-6ZorQZBC.d.ts +435 -0
  65. package/dist/schemas-BMeKj9pe.d.cts +832 -0
  66. package/dist/schemas-BMeKj9pe.d.ts +832 -0
  67. package/dist/schemas-BYLoGYNO.d.cts +52 -0
  68. package/dist/schemas-BYLoGYNO.d.ts +52 -0
  69. package/dist/schemas-Bbz-itbI.d.cts +387 -0
  70. package/dist/schemas-Bbz-itbI.d.ts +387 -0
  71. package/dist/schemas-CAn6VbI-.d.cts +240 -0
  72. package/dist/schemas-CAn6VbI-.d.ts +240 -0
  73. package/dist/schemas-CNeb4DA4.d.cts +432 -0
  74. package/dist/schemas-CNeb4DA4.d.ts +432 -0
  75. package/dist/schemas-Cu7LkQN1.d.cts +466 -0
  76. package/dist/schemas-Cu7LkQN1.d.ts +466 -0
  77. package/dist/schemas-D4yPHF06.d.cts +481 -0
  78. package/dist/schemas-D4yPHF06.d.ts +481 -0
  79. package/dist/schemas-Doa7hG7U.d.cts +630 -0
  80. package/dist/schemas-Doa7hG7U.d.ts +630 -0
  81. package/dist/schemas-TYWQmRZI.d.cts +519 -0
  82. package/dist/schemas-TYWQmRZI.d.ts +519 -0
  83. package/dist/schemas-hrS1Vfcr.d.cts +255 -0
  84. package/dist/schemas-hrS1Vfcr.d.ts +255 -0
  85. package/package.json +93 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Noya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # @noya-ai/data-server-schemas
2
+
3
+ Shared [Zod](https://zod.dev) schemas for the Noya data-server API surface. Published as a runtime dependency of [`@noya-ai/sdk`](https://www.npmjs.com/package/@noya-ai/sdk), [`@noya-ai/cli`](https://www.npmjs.com/package/@noya-ai/cli), and [`@noya-ai/mcp`](https://www.npmjs.com/package/@noya-ai/mcp) — you generally don't depend on this directly.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @noya-ai/data-server-schemas
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Schemas are exported per data family via subpath imports:
14
+
15
+ ```ts
16
+ import { PriceBody, PriceResponse } from "@noya-ai/data-server-schemas/coingecko";
17
+
18
+ const parsed = PriceBody.parse({ tokenIds: ["bitcoin"] });
19
+ ```
20
+
21
+ Families: `alternative`, `batch`, `coingecko`, `coinglass`, `composite`, `cryptonews`, `defillama`, `geckoterminal`, `kaito`, `moralis`, `noya`. The root export re-exports all of them.
22
+
23
+ ## License
24
+
25
+ MIT
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/alternative/schemas.ts
21
+ var schemas_exports = {};
22
+ __export(schemas_exports, {
23
+ FearGreedBody: () => FearGreedBody,
24
+ FearGreedEntry: () => FearGreedEntry,
25
+ FearGreedResponse: () => FearGreedResponse
26
+ });
27
+ module.exports = __toCommonJS(schemas_exports);
28
+ var import_zod = require("zod");
29
+ var FearGreedBody = import_zod.z.object({
30
+ limit: import_zod.z.number().int().min(0).default(1).describe("Number of historical Fear & Greed entries to return (most recent first). 1 returns just the latest reading.")
31
+ });
32
+ var FearGreedEntry = import_zod.z.object({
33
+ value: import_zod.z.number(),
34
+ classification: import_zod.z.string(),
35
+ timestamp: import_zod.z.number(),
36
+ timeUntilUpdate: import_zod.z.number().nullable()
37
+ });
38
+ var FearGreedResponse = import_zod.z.array(FearGreedEntry);
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ FearGreedBody,
42
+ FearGreedEntry,
43
+ FearGreedResponse
44
+ });
@@ -0,0 +1,2 @@
1
+ import 'zod';
2
+ export { F as FearGreedBody, a as FearGreedEntry, b as FearGreedResponse } from '../schemas-BYLoGYNO.cjs';
@@ -0,0 +1,2 @@
1
+ import 'zod';
2
+ export { F as FearGreedBody, a as FearGreedEntry, b as FearGreedResponse } from '../schemas-BYLoGYNO.js';
@@ -0,0 +1,11 @@
1
+ import {
2
+ FearGreedBody,
3
+ FearGreedEntry,
4
+ FearGreedResponse
5
+ } from "../chunk-DKMPZFSH.js";
6
+ import "../chunk-MLKGABMK.js";
7
+ export {
8
+ FearGreedBody,
9
+ FearGreedEntry,
10
+ FearGreedResponse
11
+ };
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/batch/schemas.ts
21
+ var schemas_exports = {};
22
+ __export(schemas_exports, {
23
+ BatchBody: () => BatchBody,
24
+ BatchFailure: () => BatchFailure,
25
+ BatchItem: () => BatchItem,
26
+ BatchResponse: () => BatchResponse,
27
+ BatchResult: () => BatchResult,
28
+ BatchSuccess: () => BatchSuccess
29
+ });
30
+ module.exports = __toCommonJS(schemas_exports);
31
+ var import_zod = require("zod");
32
+ var BatchItem = import_zod.z.object({
33
+ name: import_zod.z.string().min(1).max(100).describe("Caller-chosen identifier for this sub-request \u2014 used to key the result in the response object. Must be unique within the batch."),
34
+ method: import_zod.z.enum(["GET", "POST"]).describe("HTTP method for the sub-request."),
35
+ path: import_zod.z.string().startsWith("/").min(2).describe("Server-relative path of the sub-request (e.g. `/coingecko/price`). Nested batch paths are forbidden."),
36
+ body: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("JSON body for POST sub-requests. Ignored for GET."),
37
+ query: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("Query-string parameters appended to the sub-request URL."),
38
+ timeoutMs: import_zod.z.number().int().positive().max(6e4).optional().describe("Per-request timeout override in milliseconds. Falls back to the batch's `defaultTimeoutMs`.")
39
+ }).refine(
40
+ (item) => !(item.path === "/batch" || item.path.startsWith("/batch/")),
41
+ { message: "nested batch requests are not allowed" }
42
+ );
43
+ var BatchBody = import_zod.z.object({
44
+ requests: import_zod.z.array(BatchItem).min(1).max(20).describe("Array of sub-requests to dispatch in parallel (1\u201320 items)."),
45
+ defaultTimeoutMs: import_zod.z.number().int().positive().max(6e4).optional().default(15e3).describe("Default timeout in milliseconds applied to any sub-request that doesn't set its own `timeoutMs`. Capped at 60s.")
46
+ }).refine(
47
+ (input) => new Set(input.requests.map((r) => r.name)).size === input.requests.length,
48
+ { message: "request names must be unique within a batch" }
49
+ );
50
+ var BatchSuccess = import_zod.z.object({
51
+ ok: import_zod.z.literal(true),
52
+ status: import_zod.z.number(),
53
+ data: import_zod.z.unknown(),
54
+ cache: import_zod.z.enum(["HIT", "MISS"]).optional()
55
+ });
56
+ var BatchFailure = import_zod.z.object({
57
+ ok: import_zod.z.literal(false),
58
+ status: import_zod.z.number(),
59
+ error: import_zod.z.string()
60
+ });
61
+ var BatchResult = import_zod.z.union([BatchSuccess, BatchFailure]);
62
+ var BatchResponse = import_zod.z.object({
63
+ results: import_zod.z.record(import_zod.z.string(), BatchResult)
64
+ });
65
+ // Annotate the CommonJS export names for ESM import in node:
66
+ 0 && (module.exports = {
67
+ BatchBody,
68
+ BatchFailure,
69
+ BatchItem,
70
+ BatchResponse,
71
+ BatchResult,
72
+ BatchSuccess
73
+ });
@@ -0,0 +1,2 @@
1
+ import 'zod';
2
+ export { B as BatchBody, a as BatchFailure, b as BatchItem, c as BatchResponse, d as BatchResult, e as BatchSuccess } from '../schemas-CAn6VbI-.cjs';
@@ -0,0 +1,2 @@
1
+ import 'zod';
2
+ export { B as BatchBody, a as BatchFailure, b as BatchItem, c as BatchResponse, d as BatchResult, e as BatchSuccess } from '../schemas-CAn6VbI-.js';
@@ -0,0 +1,17 @@
1
+ import {
2
+ BatchBody,
3
+ BatchFailure,
4
+ BatchItem,
5
+ BatchResponse,
6
+ BatchResult,
7
+ BatchSuccess
8
+ } from "../chunk-ROAH5BN3.js";
9
+ import "../chunk-MLKGABMK.js";
10
+ export {
11
+ BatchBody,
12
+ BatchFailure,
13
+ BatchItem,
14
+ BatchResponse,
15
+ BatchResult,
16
+ BatchSuccess
17
+ };
@@ -0,0 +1,142 @@
1
+ import {
2
+ __export
3
+ } from "./chunk-MLKGABMK.js";
4
+
5
+ // src/defillama/schemas.ts
6
+ var schemas_exports = {};
7
+ __export(schemas_exports, {
8
+ BridgeItem: () => BridgeItem,
9
+ BridgesBody: () => BridgesBody,
10
+ BridgesListResponse: () => BridgesListResponse,
11
+ BridgesResponse: () => BridgesResponse,
12
+ DexVolumesBody: () => DexVolumesBody,
13
+ DexVolumesResponse: () => DexVolumesResponse,
14
+ ProtocolFeesBody: () => ProtocolFeesBody,
15
+ ProtocolFeesResponse: () => ProtocolFeesResponse,
16
+ StablecoinsBody: () => StablecoinsBody,
17
+ StablecoinsResponse: () => StablecoinsResponse,
18
+ TvlBody: () => TvlBody,
19
+ TvlDataPoint: () => TvlDataPoint,
20
+ TvlResponse: () => TvlResponse,
21
+ YieldPoolItem: () => YieldPoolItem,
22
+ YieldsBody: () => YieldsBody,
23
+ YieldsResponse: () => YieldsResponse
24
+ });
25
+ import { z } from "zod";
26
+ var TvlBody = z.object({
27
+ protocol: z.string().optional().describe("DeFiLlama protocol slug (e.g. `aave-v3`). Mutually exclusive with `chain`."),
28
+ chain: z.string().optional().describe("Chain name (e.g. `Ethereum`, `Base`). Returns the chain's aggregate TVL."),
29
+ historical: z.boolean().default(false).describe("Include the full daily TVL time-series in the response.")
30
+ }).refine((d) => d.protocol || d.chain, "Provide either 'protocol' or 'chain'");
31
+ var TvlDataPoint = z.object({ date: z.number(), tvl: z.number() });
32
+ var TvlResponse = z.object({
33
+ type: z.enum(["protocol", "chain"]),
34
+ name: z.string(),
35
+ currentTvl: z.number().nullable(),
36
+ history: z.array(TvlDataPoint).nullable()
37
+ });
38
+ var YieldsBody = z.object({
39
+ chain: z.string().optional().describe("Filter pools to a single chain."),
40
+ token: z.string().optional().describe("Filter pools that include this token symbol (e.g. `USDC`)."),
41
+ protocol: z.string().optional().describe("Filter pools by protocol slug (e.g. `aave-v3`)."),
42
+ minTvl: z.number().optional().describe("Minimum pool TVL in USD \u2014 drop dust pools below this threshold."),
43
+ poolId: z.string().optional().describe("Specific DeFiLlama pool ID for a single-pool lookup. Wins over the other filters.")
44
+ });
45
+ var YieldPoolItem = z.object({
46
+ pool: z.string(),
47
+ chain: z.string(),
48
+ project: z.string(),
49
+ symbol: z.string(),
50
+ tvlUsd: z.number(),
51
+ apy: z.number().nullable(),
52
+ apyBase: z.number().nullable(),
53
+ apyReward: z.number().nullable(),
54
+ stablecoin: z.boolean(),
55
+ exposure: z.string().nullable(),
56
+ ilRisk: z.string().nullable(),
57
+ predictions: z.object({
58
+ predictedClass: z.string().nullable(),
59
+ binnedConfidence: z.number().nullable()
60
+ }).nullable()
61
+ });
62
+ var YieldsResponse = z.array(YieldPoolItem);
63
+ var ProtocolFeesBody = z.object({
64
+ protocol: z.string().min(1).describe("Protocol slug to pull fee/revenue data for."),
65
+ dataType: z.enum([
66
+ "dailyFees",
67
+ "dailyRevenue",
68
+ "dailyHoldersRevenue",
69
+ "dailySupplySideRevenue",
70
+ "dailyBribesRevenue",
71
+ "dailyTokenTaxes"
72
+ ]).default("dailyFees").describe("Which fee/revenue stream to fetch. `dailyFees` = total user fees, `dailyRevenue` = protocol's cut.")
73
+ });
74
+ var ProtocolFeesResponse = z.object({
75
+ name: z.string(),
76
+ category: z.string().nullable(),
77
+ chains: z.array(z.string()),
78
+ total24h: z.number().nullable(),
79
+ total7d: z.number().nullable(),
80
+ total30d: z.number().nullable(),
81
+ totalAllTime: z.number().nullable(),
82
+ change1d: z.number().nullable(),
83
+ change7d: z.number().nullable(),
84
+ change1m: z.number().nullable(),
85
+ dailyChart: z.array(z.object({ date: z.number(), value: z.number() })).nullable()
86
+ });
87
+ var DexVolumesBody = z.object({
88
+ protocol: z.string().optional().describe("Single-DEX detail mode (e.g. `uniswap`). Mutually exclusive with `chain`."),
89
+ chain: z.string().optional().describe("Filter aggregate volume to one chain (e.g. `Ethereum`). Omit both for the global summary.")
90
+ });
91
+ var DexVolumesResponse = z.union([
92
+ z.object({
93
+ total24h: z.number(),
94
+ total7d: z.number(),
95
+ protocols: z.array(z.unknown())
96
+ }).passthrough(),
97
+ z.object({
98
+ name: z.string(),
99
+ chains: z.array(z.string())
100
+ }).passthrough()
101
+ ]);
102
+ var StablecoinsBody = z.object({
103
+ chain: z.string().optional().describe("Filter circulating-supply data to one chain."),
104
+ stablecoinId: z.string().optional().describe("DeFiLlama stablecoin ID for a single-coin lookup (e.g. `1` for USDT).")
105
+ });
106
+ var StablecoinsResponse = z.unknown();
107
+ var BridgesBody = z.object({
108
+ chain: z.string().optional().describe("Filter bridge volume to one chain."),
109
+ bridgeId: z.number().optional().describe("DeFiLlama numeric bridge ID for a single-bridge detail view.")
110
+ });
111
+ var BridgeItem = z.object({
112
+ id: z.number(),
113
+ name: z.string(),
114
+ displayName: z.string(),
115
+ volumePrevDay: z.number(),
116
+ last24hVolume: z.number(),
117
+ weeklyVolume: z.number().nullable(),
118
+ monthlyVolume: z.number().nullable(),
119
+ chains: z.array(z.string()).optional()
120
+ });
121
+ var BridgesResponse = z.unknown();
122
+ var BridgesListResponse = z.array(BridgeItem);
123
+
124
+ export {
125
+ TvlBody,
126
+ TvlDataPoint,
127
+ TvlResponse,
128
+ YieldsBody,
129
+ YieldPoolItem,
130
+ YieldsResponse,
131
+ ProtocolFeesBody,
132
+ ProtocolFeesResponse,
133
+ DexVolumesBody,
134
+ DexVolumesResponse,
135
+ StablecoinsBody,
136
+ StablecoinsResponse,
137
+ BridgesBody,
138
+ BridgeItem,
139
+ BridgesResponse,
140
+ BridgesListResponse,
141
+ schemas_exports
142
+ };
@@ -0,0 +1,256 @@
1
+ import {
2
+ __export
3
+ } from "./chunk-MLKGABMK.js";
4
+
5
+ // src/noya/schemas.ts
6
+ var schemas_exports = {};
7
+ __export(schemas_exports, {
8
+ AnalysisEventHistoryBody: () => AnalysisEventHistoryBody,
9
+ AnalysisEventsBody: () => AnalysisEventsBody,
10
+ AnalysisLatestResponse: () => AnalysisLatestResponse,
11
+ AnalysisMarketHistoryBody: () => AnalysisMarketHistoryBody,
12
+ AnalysisTopBody: () => AnalysisTopBody,
13
+ AnalysisVersionsBody: () => AnalysisVersionsBody,
14
+ CryptoToken: () => CryptoToken,
15
+ PolymarketByEventBody: () => PolymarketByEventBody,
16
+ PolymarketEventsBody: () => PolymarketEventsBody,
17
+ PolymarketFilterBody: () => PolymarketFilterBody,
18
+ PolymarketFilterResponse: () => PolymarketFilterResponse,
19
+ PolymarketRecommendationsBody: () => PolymarketRecommendationsBody,
20
+ PolymarketResponse: () => PolymarketResponse,
21
+ PolymarketSearchBody: () => PolymarketSearchBody,
22
+ PolymarketSimilarBody: () => PolymarketSimilarBody,
23
+ PolymarketTagsBody: () => PolymarketTagsBody,
24
+ TokenDetailBody: () => TokenDetailBody,
25
+ TokenScores: () => TokenScores,
26
+ TokensByVersionBody: () => TokensByVersionBody,
27
+ TokensRecommendationsBody: () => TokensRecommendationsBody,
28
+ TokensSearchBody: () => TokensSearchBody,
29
+ TokensSearchResponse: () => TokensSearchResponse,
30
+ TokensSimilarBody: () => TokensSimilarBody,
31
+ TopMarketsByEvBody: () => TopMarketsByEvBody,
32
+ TopTokensByScoreBody: () => TopTokensByScoreBody,
33
+ VersionsResponse: () => VersionsResponse
34
+ });
35
+ import { z } from "zod";
36
+ var TokensSearchBody = z.object({
37
+ q: z.string().min(1).describe("Free-text search query \u2014 matches token symbol, name, or category."),
38
+ limit: z.number().int().min(1).max(100).default(10).describe("Max tokens to return (1\u2013100)."),
39
+ signal: z.string().optional().describe("Filter to tokens with a specific Noya signal (e.g. `strong_buy`)."),
40
+ risk: z.string().optional().describe("Filter to tokens at a specific risk tier (e.g. `low`, `medium`, `high`)."),
41
+ minFinalScore: z.number().optional().describe("Minimum AI final score (0\u2013100)."),
42
+ maxFinalScore: z.number().optional().describe("Maximum AI final score (0\u2013100)."),
43
+ minMarketCap: z.number().optional().describe("Minimum market cap in USD."),
44
+ maxMarketCap: z.number().optional().describe("Maximum market cap in USD."),
45
+ grades: z.string().optional().describe("Comma-separated grade filters (e.g. `A,A+`).")
46
+ });
47
+ var TokensSimilarBody = z.object({
48
+ tokenId: z.string().min(1).describe("Noya token ID to find similar tokens for."),
49
+ limit: z.number().int().min(1).max(100).default(10).describe("Max similar tokens to return.")
50
+ });
51
+ var TokensRecommendationsBody = z.object({
52
+ riskTolerance: z.enum(["conservative", "moderate", "aggressive"]).describe("Caller's risk profile \u2014 filters the recommendation set accordingly."),
53
+ minMarketCap: z.number().optional().describe("Minimum market cap in USD."),
54
+ maxMarketCap: z.number().optional().describe("Maximum market cap in USD."),
55
+ query: z.string().optional().describe("Optional free-text query to bias recommendations toward."),
56
+ limit: z.number().int().min(1).max(100).default(20).describe("Max tokens to recommend (1\u2013100).")
57
+ });
58
+ var TopTokensByScoreBody = z.object({
59
+ limit: z.number().int().min(1).max(100).default(20).describe("Number of top tokens to return."),
60
+ grades: z.string().optional().describe("Comma-separated grade filters (e.g. `A,A+`)."),
61
+ minCatalystScore: z.number().optional().describe("Minimum AI catalyst score (0\u2013100)."),
62
+ minMarketCap: z.number().optional().describe("Minimum market cap in USD."),
63
+ maxMarketCap: z.number().optional().describe("Maximum market cap in USD.")
64
+ });
65
+ var TokensByVersionBody = z.object({
66
+ versionId: z.number().int().min(1).optional().describe("Specific Noya analysis version ID. Defaults to the latest."),
67
+ signal: z.string().optional().describe("Filter to a specific signal value."),
68
+ risk: z.string().optional().describe("Filter to a specific risk tier."),
69
+ sort: z.string().optional().describe("Field name to sort by (e.g. `marketCap`, `aiFinal`)."),
70
+ order: z.enum(["asc", "desc"]).optional().describe("Sort direction.")
71
+ });
72
+ var TokenDetailBody = z.object({
73
+ versionId: z.number().int().min(1).optional().describe("Specific Noya analysis version. Defaults to the latest."),
74
+ symbol: z.string().min(1).describe("Token symbol (e.g. `BTC`, `ETH`).")
75
+ });
76
+ var TokenScores = z.object({
77
+ longTerm: z.number().nullable(),
78
+ shortTerm: z.number().nullable(),
79
+ aiFinal: z.number().nullable(),
80
+ aiMomentum: z.number().nullable(),
81
+ aiSentiment: z.number().nullable(),
82
+ aiCatalysts: z.number().nullable(),
83
+ aiFundamentals: z.number().nullable()
84
+ });
85
+ var CryptoToken = z.object({
86
+ symbol: z.string(),
87
+ name: z.string(),
88
+ overallGrade: z.string(),
89
+ overallScore: z.number(),
90
+ recommendation: z.string(),
91
+ marketCap: z.number(),
92
+ category: z.string(),
93
+ rank: z.number().nullable(),
94
+ price: z.number().nullable(),
95
+ volume24h: z.number().nullable(),
96
+ scores: TokenScores,
97
+ riskLevel: z.string().nullable(),
98
+ timeHorizon: z.string().nullable(),
99
+ aiSummary: z.string().nullable(),
100
+ catalystCount: z.number(),
101
+ hasWebContext: z.boolean()
102
+ });
103
+ var TokensSearchResponse = z.object({
104
+ total: z.number(),
105
+ limit: z.number(),
106
+ versionId: z.number(),
107
+ data: z.array(
108
+ z.object({ token: CryptoToken, score: z.number(), tokenId: z.string() })
109
+ )
110
+ });
111
+ var VersionsResponse = z.object({
112
+ count: z.number(),
113
+ versions: z.array(
114
+ z.object({
115
+ id: z.number(),
116
+ runAt: z.string(),
117
+ status: z.string(),
118
+ tokenCount: z.number()
119
+ })
120
+ )
121
+ });
122
+ var PolymarketSearchBody = z.object({
123
+ q: z.string().min(1).describe("Free-text search query \u2014 matches market question, description, and tags."),
124
+ limit: z.number().int().min(1).max(100).default(10).describe("Max markets to return (1\u2013100).")
125
+ });
126
+ var PolymarketSimilarBody = z.object({
127
+ conditionId: z.string().min(1).describe("Polymarket condition ID (or event ID, depending on `type`) to find similar items for."),
128
+ limit: z.number().int().min(1).max(100).default(10).describe("Max similar items to return."),
129
+ type: z.enum(["market", "event"]).default("market").describe("Whether `conditionId` refers to a market or an event.")
130
+ });
131
+ var PolymarketRecommendationsBody = z.object({
132
+ riskTolerance: z.enum(["conservative", "moderate", "aggressive"]).describe("Caller's risk profile."),
133
+ preferredTags: z.array(z.string()).optional().describe("Bias toward markets carrying any of these tags."),
134
+ preferredCategories: z.array(z.string()).optional().describe("Bias toward markets in these categories."),
135
+ minDaysUntilClose: z.number().optional().describe("Minimum days until the market resolves."),
136
+ maxDaysUntilClose: z.number().optional().describe("Maximum days until the market resolves."),
137
+ minLiquidity: z.number().optional().describe("Minimum on-book liquidity in USD."),
138
+ minVolume24h: z.number().optional().describe("Minimum 24h volume in USD."),
139
+ query: z.string().optional().describe("Optional free-text query to bias recommendations toward."),
140
+ limit: z.number().int().min(1).max(100).default(20).describe("Max markets to recommend.")
141
+ });
142
+ var TopMarketsByEvBody = z.object({
143
+ limit: z.number().int().min(1).max(100).default(20).describe("Number of top markets to return."),
144
+ minLiquidity: z.number().optional().describe("Minimum on-book liquidity in USD."),
145
+ minVolume24h: z.number().optional().describe("Minimum 24h volume in USD."),
146
+ tags: z.string().optional().describe("Comma-separated tag filter.")
147
+ });
148
+ var PolymarketFilterBody = z.object({
149
+ q: z.string().min(1).describe("Free-text search query \u2014 required by the upstream filter endpoint."),
150
+ limit: z.number().int().min(1).max(100).default(20).describe("Max results."),
151
+ tags: z.string().optional().describe("Comma-separated tag filter."),
152
+ category: z.string().optional().describe("Restrict to a single category."),
153
+ active: z.boolean().optional().describe("Filter to active (non-resolved) markets."),
154
+ minLiquidity: z.number().optional().describe("Minimum on-book liquidity in USD."),
155
+ minVolume24h: z.number().optional().describe("Minimum 24h volume in USD.")
156
+ });
157
+ var PolymarketFilterResponse = z.object({
158
+ metadata: z.object({
159
+ query: z.string(),
160
+ type: z.string(),
161
+ total: z.number(),
162
+ limit: z.number(),
163
+ filters: z.record(z.string(), z.unknown()),
164
+ duration: z.number()
165
+ }),
166
+ data: z.array(
167
+ z.object({
168
+ score: z.number(),
169
+ id: z.string(),
170
+ payload: z.unknown()
171
+ })
172
+ )
173
+ });
174
+ var PolymarketEventsBody = z.object({
175
+ limit: z.number().int().min(1).max(200).default(100).describe("Max events to return (1\u2013200).")
176
+ });
177
+ var PolymarketByEventBody = z.object({
178
+ eventSlug: z.string().min(1).describe("Polymarket event slug (URL fragment, e.g. `2024-presidential-election`)."),
179
+ limit: z.number().int().min(1).max(100).default(50).describe("Max markets per event to return.")
180
+ });
181
+ var PolymarketTagsBody = z.object({
182
+ type: z.enum(["market", "event"]).optional().describe("Restrict tag list to those used on markets or events. Returns both when omitted.")
183
+ });
184
+ var PolymarketResponse = z.object({
185
+ total: z.number(),
186
+ limit: z.number(),
187
+ data: z.array(z.unknown())
188
+ });
189
+ var VersionParam = z.union([z.literal("latest"), z.number().int().positive()]).describe("Analysis batch version. `latest` for the most recent run, or a numeric version ID for a specific batch.");
190
+ var AnalysisSignal = z.enum(["strong_buy", "buy", "hold", "sell", "strong_sell", "none"]).describe("Noya analysis signal classification.");
191
+ var AnalysisVersionsBody = z.object({
192
+ limit: z.number().int().min(1).max(100).default(20).describe("Max versions to list."),
193
+ offset: z.number().int().min(0).default(0).describe("Pagination offset.")
194
+ });
195
+ var AnalysisEventsBody = z.object({
196
+ version: VersionParam.default("latest"),
197
+ tag: z.string().optional().describe("Filter events to those carrying a specific tag."),
198
+ signal: AnalysisSignal.optional(),
199
+ limit: z.number().int().min(1).max(200).default(50).describe("Max events to return."),
200
+ offset: z.number().int().min(0).default(0).describe("Pagination offset.")
201
+ });
202
+ var AnalysisEventHistoryBody = z.object({
203
+ eventId: z.string().min(1).describe("Polymarket event ID to fetch the analysis history for.")
204
+ });
205
+ var AnalysisMarketHistoryBody = z.object({
206
+ conditionId: z.string().min(1).describe("Polymarket condition ID to fetch the analysis history for.")
207
+ });
208
+ var AnalysisTopBody = z.object({
209
+ version: VersionParam.default("latest"),
210
+ by: z.enum(["ev_percentage", "confidence", "signal_strength"]).default("ev_percentage").describe("Ranking metric."),
211
+ signal: AnalysisSignal.optional(),
212
+ limit: z.number().int().min(1).max(200).default(20).describe("Max markets to return.")
213
+ });
214
+ var AnalysisLatestResponse = z.object({
215
+ batch: z.object({
216
+ version: z.number(),
217
+ createdAt: z.string(),
218
+ model: z.string(),
219
+ tags: z.array(z.string()),
220
+ eventCount: z.number(),
221
+ marketCount: z.number(),
222
+ sourceFile: z.string(),
223
+ notes: z.string().nullable()
224
+ }).nullable(),
225
+ signalHistogram: z.record(z.string(), z.number())
226
+ });
227
+
228
+ export {
229
+ TokensSearchBody,
230
+ TokensSimilarBody,
231
+ TokensRecommendationsBody,
232
+ TopTokensByScoreBody,
233
+ TokensByVersionBody,
234
+ TokenDetailBody,
235
+ TokenScores,
236
+ CryptoToken,
237
+ TokensSearchResponse,
238
+ VersionsResponse,
239
+ PolymarketSearchBody,
240
+ PolymarketSimilarBody,
241
+ PolymarketRecommendationsBody,
242
+ TopMarketsByEvBody,
243
+ PolymarketFilterBody,
244
+ PolymarketFilterResponse,
245
+ PolymarketEventsBody,
246
+ PolymarketByEventBody,
247
+ PolymarketTagsBody,
248
+ PolymarketResponse,
249
+ AnalysisVersionsBody,
250
+ AnalysisEventsBody,
251
+ AnalysisEventHistoryBody,
252
+ AnalysisMarketHistoryBody,
253
+ AnalysisTopBody,
254
+ AnalysisLatestResponse,
255
+ schemas_exports
256
+ };
@@ -0,0 +1,29 @@
1
+ import {
2
+ __export
3
+ } from "./chunk-MLKGABMK.js";
4
+
5
+ // src/alternative/schemas.ts
6
+ var schemas_exports = {};
7
+ __export(schemas_exports, {
8
+ FearGreedBody: () => FearGreedBody,
9
+ FearGreedEntry: () => FearGreedEntry,
10
+ FearGreedResponse: () => FearGreedResponse
11
+ });
12
+ import { z } from "zod";
13
+ var FearGreedBody = z.object({
14
+ limit: z.number().int().min(0).default(1).describe("Number of historical Fear & Greed entries to return (most recent first). 1 returns just the latest reading.")
15
+ });
16
+ var FearGreedEntry = z.object({
17
+ value: z.number(),
18
+ classification: z.string(),
19
+ timestamp: z.number(),
20
+ timeUntilUpdate: z.number().nullable()
21
+ });
22
+ var FearGreedResponse = z.array(FearGreedEntry);
23
+
24
+ export {
25
+ FearGreedBody,
26
+ FearGreedEntry,
27
+ FearGreedResponse,
28
+ schemas_exports
29
+ };