@vayolabs/core-sdk 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.
@@ -0,0 +1,322 @@
1
+ // src/errors.ts
2
+ var VayoApiError = class _VayoApiError extends Error {
3
+ constructor(statusCode, message, code = null, correlationId = null) {
4
+ super(message);
5
+ this.statusCode = statusCode;
6
+ this.code = code;
7
+ this.correlationId = correlationId;
8
+ Object.setPrototypeOf(this, _VayoApiError.prototype);
9
+ }
10
+ statusCode;
11
+ code;
12
+ correlationId;
13
+ name = "VayoApiError";
14
+ /**
15
+ * Factory used by the internal HTTP wrapper. Tolerant of malformed bodies —
16
+ * if the server returns HTML or empty content, we still construct a useful
17
+ * error from the status alone.
18
+ */
19
+ static fromBody(statusCode, statusText, body) {
20
+ const message = (body?.message && body.message.length > 0 ? body.message : null) ?? (statusText && statusText.length > 0 ? statusText : null) ?? `HTTP ${statusCode}`;
21
+ return new _VayoApiError(
22
+ statusCode,
23
+ message,
24
+ body?.code ?? null,
25
+ body?.correlationId ?? null
26
+ );
27
+ }
28
+ };
29
+
30
+ // src/http.ts
31
+ var MUTATING_METHODS = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
32
+ var NO_BODY_STATUSES = /* @__PURE__ */ new Set([204, 205, 304]);
33
+ function buildUrl(baseURL, url, params) {
34
+ const fullUrl = [baseURL, url].filter(Boolean).join("");
35
+ if (!params || typeof params !== "object") return fullUrl;
36
+ const searchParams = new URLSearchParams();
37
+ for (const [key, value] of Object.entries(
38
+ params
39
+ )) {
40
+ if (value === void 0 || value === null) continue;
41
+ if (Array.isArray(value)) {
42
+ searchParams.append(key, value.join(","));
43
+ } else {
44
+ searchParams.append(key, String(value));
45
+ }
46
+ }
47
+ const queryString = searchParams.toString();
48
+ return queryString ? `${fullUrl}?${queryString}` : fullUrl;
49
+ }
50
+ function normalizeHeaders(headers) {
51
+ if (!headers) return {};
52
+ if (Array.isArray(headers)) return Object.fromEntries(headers);
53
+ return { ...headers };
54
+ }
55
+ function defaultIdempotencyKey() {
56
+ if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
57
+ return crypto.randomUUID();
58
+ }
59
+ return `idem-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 12)}`;
60
+ }
61
+ async function client(config) {
62
+ const ctx = config.context;
63
+ if (!ctx) {
64
+ throw new Error(
65
+ "[vayo/core-sdk] internal: RequestConfig.context is missing. Generated clients must be invoked through createVayoPartnerClient()."
66
+ );
67
+ }
68
+ const baseURL = config.baseURL ?? ctx.baseUrl;
69
+ const url = buildUrl(baseURL, config.url, config.params);
70
+ const headers = normalizeHeaders(config.headers);
71
+ const method = (config.method ?? "GET").toUpperCase();
72
+ headers["x-api-key"] = ctx.apiKey;
73
+ if (MUTATING_METHODS.has(method) && !headers["Idempotency-Key"]) {
74
+ headers["Idempotency-Key"] = ctx.idempotencyKey ?? (ctx.generateIdempotencyKey ?? defaultIdempotencyKey)();
75
+ }
76
+ if (!headers["Content-Type"] && !(config.data instanceof FormData)) {
77
+ headers["Content-Type"] = "application/json";
78
+ }
79
+ let body;
80
+ if (config.data instanceof FormData) {
81
+ body = config.data;
82
+ } else if (config.data !== void 0) {
83
+ body = JSON.stringify(config.data);
84
+ }
85
+ const fetchImpl = ctx.fetch ?? fetch;
86
+ const response = await fetchImpl(url, {
87
+ method,
88
+ headers,
89
+ body,
90
+ signal: config.signal,
91
+ // Default to 'omit' (not 'include') because partners never share cookies
92
+ // cross-origin with Vayo. The webapp uses 'include' for first-party flows
93
+ // — partners use header auth.
94
+ credentials: config.credentials ?? "omit"
95
+ });
96
+ let data;
97
+ if (NO_BODY_STATUSES.has(response.status)) {
98
+ data = {};
99
+ } else {
100
+ data = await response.json().catch(() => ({}));
101
+ }
102
+ if (!response.ok) {
103
+ throw VayoApiError.fromBody(
104
+ response.status,
105
+ response.statusText,
106
+ data
107
+ );
108
+ }
109
+ return {
110
+ data,
111
+ status: response.status,
112
+ statusText: response.statusText,
113
+ headers: response.headers
114
+ };
115
+ }
116
+ var http_default = client;
117
+
118
+ // src/generated/clients/getHealthModeS.ts
119
+ function getGetHealthModeSUrl() {
120
+ const res = { method: "GET", url: `/health/mode-s` };
121
+ return res;
122
+ }
123
+ async function getHealthModeS(config = {}) {
124
+ const { client: request = http_default, ...requestConfig } = config;
125
+ const res = await request({ method: "GET", url: getGetHealthModeSUrl().url.toString(), ...requestConfig });
126
+ return res.data;
127
+ }
128
+
129
+ // src/generated/clients/getV1DashboardAllowlist.ts
130
+ function getGetV1DashboardAllowlistUrl() {
131
+ const res = { method: "GET", url: `/v1/dashboard/allowlist` };
132
+ return res;
133
+ }
134
+ async function getV1DashboardAllowlist(config = {}) {
135
+ const { client: request = http_default, ...requestConfig } = config;
136
+ const res = await request({ method: "GET", url: getGetV1DashboardAllowlistUrl().url.toString(), ...requestConfig });
137
+ return res.data;
138
+ }
139
+
140
+ // src/generated/clients/getV1DashboardApiKeys.ts
141
+ function getGetV1DashboardApiKeysUrl() {
142
+ const res = { method: "GET", url: `/v1/dashboard/api-keys` };
143
+ return res;
144
+ }
145
+ async function getV1DashboardApiKeys(config = {}) {
146
+ const { client: request = http_default, ...requestConfig } = config;
147
+ const res = await request({ method: "GET", url: getGetV1DashboardApiKeysUrl().url.toString(), ...requestConfig });
148
+ return res.data;
149
+ }
150
+
151
+ // src/generated/clients/getV1DashboardConsumption.ts
152
+ function getGetV1DashboardConsumptionUrl() {
153
+ const res = { method: "GET", url: `/v1/dashboard/consumption` };
154
+ return res;
155
+ }
156
+ async function getV1DashboardConsumption(config = {}) {
157
+ const { client: request = http_default, ...requestConfig } = config;
158
+ const res = await request({ method: "GET", url: getGetV1DashboardConsumptionUrl().url.toString(), ...requestConfig });
159
+ return res.data;
160
+ }
161
+
162
+ // src/generated/clients/getV1DashboardInvestmentPerformance.ts
163
+ function getGetV1DashboardInvestmentPerformanceUrl() {
164
+ const res = { method: "GET", url: `/v1/dashboard/investment-performance` };
165
+ return res;
166
+ }
167
+ async function getV1DashboardInvestmentPerformance(config = {}) {
168
+ const { client: request = http_default, ...requestConfig } = config;
169
+ const res = await request({ method: "GET", url: getGetV1DashboardInvestmentPerformanceUrl().url.toString(), ...requestConfig });
170
+ return res.data;
171
+ }
172
+
173
+ // src/generated/clients/getV1DashboardOverview.ts
174
+ function getGetV1DashboardOverviewUrl() {
175
+ const res = { method: "GET", url: `/v1/dashboard/overview` };
176
+ return res;
177
+ }
178
+ async function getV1DashboardOverview(config = {}) {
179
+ const { client: request = http_default, ...requestConfig } = config;
180
+ const res = await request({ method: "GET", url: getGetV1DashboardOverviewUrl().url.toString(), ...requestConfig });
181
+ return res.data;
182
+ }
183
+
184
+ // src/generated/clients/getV1DashboardPartnerFees.ts
185
+ function getGetV1DashboardPartnerFeesUrl() {
186
+ const res = { method: "GET", url: `/v1/dashboard/partner-fees` };
187
+ return res;
188
+ }
189
+ async function getV1DashboardPartnerFees(config = {}) {
190
+ const { client: request = http_default, ...requestConfig } = config;
191
+ const res = await request({ method: "GET", url: getGetV1DashboardPartnerFeesUrl().url.toString(), ...requestConfig });
192
+ return res.data;
193
+ }
194
+
195
+ // src/generated/clients/getV1DashboardPartnerFeesPayouts.ts
196
+ function getGetV1DashboardPartnerFeesPayoutsUrl() {
197
+ const res = { method: "GET", url: `/v1/dashboard/partner-fees/payouts` };
198
+ return res;
199
+ }
200
+ async function getV1DashboardPartnerFeesPayouts(params, config = {}) {
201
+ const { client: request = http_default, ...requestConfig } = config;
202
+ const res = await request({ method: "GET", url: getGetV1DashboardPartnerFeesPayoutsUrl().url.toString(), params, ...requestConfig });
203
+ return res.data;
204
+ }
205
+
206
+ // src/generated/clients/getV1DashboardPerformanceFees.ts
207
+ function getGetV1DashboardPerformanceFeesUrl() {
208
+ const res = { method: "GET", url: `/v1/dashboard/performance-fees` };
209
+ return res;
210
+ }
211
+ async function getV1DashboardPerformanceFees(config = {}) {
212
+ const { client: request = http_default, ...requestConfig } = config;
213
+ const res = await request({ method: "GET", url: getGetV1DashboardPerformanceFeesUrl().url.toString(), ...requestConfig });
214
+ return res.data;
215
+ }
216
+
217
+ // src/generated/clients/getV1DashboardTransactions.ts
218
+ function getGetV1DashboardTransactionsUrl() {
219
+ const res = { method: "GET", url: `/v1/dashboard/transactions` };
220
+ return res;
221
+ }
222
+ async function getV1DashboardTransactions(params, config = {}) {
223
+ const { client: request = http_default, ...requestConfig } = config;
224
+ const res = await request({ method: "GET", url: getGetV1DashboardTransactionsUrl().url.toString(), params, ...requestConfig });
225
+ return res.data;
226
+ }
227
+
228
+ // src/generated/clients/getV1DashboardUsers.ts
229
+ function getGetV1DashboardUsersUrl() {
230
+ const res = { method: "GET", url: `/v1/dashboard/users` };
231
+ return res;
232
+ }
233
+ async function getV1DashboardUsers(params, config = {}) {
234
+ const { client: request = http_default, ...requestConfig } = config;
235
+ const res = await request({ method: "GET", url: getGetV1DashboardUsersUrl().url.toString(), params, ...requestConfig });
236
+ return res.data;
237
+ }
238
+
239
+ // src/generated/clients/getV1LendingMarkets.ts
240
+ function getGetV1LendingMarketsUrl() {
241
+ const res = { method: "GET", url: `/v1/lending/markets` };
242
+ return res;
243
+ }
244
+ async function getV1LendingMarkets(config = {}) {
245
+ const { client: request = http_default, ...requestConfig } = config;
246
+ const res = await request({ method: "GET", url: getGetV1LendingMarketsUrl().url.toString(), ...requestConfig });
247
+ return res.data;
248
+ }
249
+
250
+ // src/generated/clients/getV1LendingMarketsAvailable.ts
251
+ function getGetV1LendingMarketsAvailableUrl() {
252
+ const res = { method: "GET", url: `/v1/lending/markets/available` };
253
+ return res;
254
+ }
255
+ async function getV1LendingMarketsAvailable(config = {}) {
256
+ const { client: request = http_default, ...requestConfig } = config;
257
+ const res = await request({ method: "GET", url: getGetV1LendingMarketsAvailableUrl().url.toString(), ...requestConfig });
258
+ return res.data;
259
+ }
260
+
261
+ // src/generated/clients/getV1LendingReserves.ts
262
+ function getGetV1LendingReservesUrl() {
263
+ const res = { method: "GET", url: `/v1/lending/reserves` };
264
+ return res;
265
+ }
266
+ async function getV1LendingReserves(params, config = {}) {
267
+ const { client: request = http_default, ...requestConfig } = config;
268
+ const res = await request({ method: "GET", url: getGetV1LendingReservesUrl().url.toString(), params, ...requestConfig });
269
+ return res.data;
270
+ }
271
+
272
+ // src/generated/clients/postV1LendingOperationsRedeemAllocatedBuild.ts
273
+ function getPostV1LendingOperationsRedeemAllocatedBuildUrl() {
274
+ const res = { method: "POST", url: `/v1/lending-operations/redeem-allocated/build` };
275
+ return res;
276
+ }
277
+ async function postV1LendingOperationsRedeemAllocatedBuild(data, params, config = {}) {
278
+ const { client: request = http_default, ...requestConfig } = config;
279
+ const requestData = data;
280
+ const res = await request({ method: "POST", url: getPostV1LendingOperationsRedeemAllocatedBuildUrl().url.toString(), params, data: requestData, ...requestConfig });
281
+ return res.data;
282
+ }
283
+
284
+ // src/generated/clients/postV1LendingOperationsRedeemAllocatedSubmit.ts
285
+ function getPostV1LendingOperationsRedeemAllocatedSubmitUrl() {
286
+ const res = { method: "POST", url: `/v1/lending-operations/redeem-allocated/submit` };
287
+ return res;
288
+ }
289
+ async function postV1LendingOperationsRedeemAllocatedSubmit(data, config = {}) {
290
+ const { client: request = http_default, ...requestConfig } = config;
291
+ const requestData = data;
292
+ const res = await request({ method: "POST", url: getPostV1LendingOperationsRedeemAllocatedSubmitUrl().url.toString(), data: requestData, ...requestConfig });
293
+ return res.data;
294
+ }
295
+
296
+ // src/generated/clients/postV1RebalanceOperationsByPendingOperationIdConfirm.ts
297
+ function getPostV1RebalanceOperationsByPendingOperationIdConfirmUrl(pendingOperationId) {
298
+ const res = { method: "POST", url: `/v1/rebalance/operations/${pendingOperationId}/confirm` };
299
+ return res;
300
+ }
301
+ async function postV1RebalanceOperationsByPendingOperationIdConfirm(pendingOperationId, data, config = {}) {
302
+ const { client: request = http_default, ...requestConfig } = config;
303
+ const requestData = data;
304
+ const res = await request({ method: "POST", url: getPostV1RebalanceOperationsByPendingOperationIdConfirmUrl(pendingOperationId).url.toString(), data: requestData, ...requestConfig });
305
+ return res.data;
306
+ }
307
+
308
+ // src/generated/clients/putV1DashboardAllowlist.ts
309
+ function getPutV1DashboardAllowlistUrl() {
310
+ const res = { method: "PUT", url: `/v1/dashboard/allowlist` };
311
+ return res;
312
+ }
313
+ async function putV1DashboardAllowlist(data, config = {}) {
314
+ const { client: request = http_default, ...requestConfig } = config;
315
+ const requestData = data;
316
+ const res = await request({ method: "PUT", url: getPutV1DashboardAllowlistUrl().url.toString(), data: requestData, ...requestConfig });
317
+ return res.data;
318
+ }
319
+
320
+ export { getHealthModeS, getV1DashboardAllowlist, getV1DashboardApiKeys, getV1DashboardConsumption, getV1DashboardInvestmentPerformance, getV1DashboardOverview, getV1DashboardPartnerFees, getV1DashboardPartnerFeesPayouts, getV1DashboardPerformanceFees, getV1DashboardTransactions, getV1DashboardUsers, getV1LendingMarkets, getV1LendingMarketsAvailable, getV1LendingReserves, postV1LendingOperationsRedeemAllocatedBuild, postV1LendingOperationsRedeemAllocatedSubmit, postV1RebalanceOperationsByPendingOperationIdConfirm, putV1DashboardAllowlist };
321
+ //# sourceMappingURL=index.js.map
322
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/errors.ts","../../src/http.ts","../../src/generated/clients/getHealthModeS.ts","../../src/generated/clients/getV1DashboardAllowlist.ts","../../src/generated/clients/getV1DashboardApiKeys.ts","../../src/generated/clients/getV1DashboardConsumption.ts","../../src/generated/clients/getV1DashboardInvestmentPerformance.ts","../../src/generated/clients/getV1DashboardOverview.ts","../../src/generated/clients/getV1DashboardPartnerFees.ts","../../src/generated/clients/getV1DashboardPartnerFeesPayouts.ts","../../src/generated/clients/getV1DashboardPerformanceFees.ts","../../src/generated/clients/getV1DashboardTransactions.ts","../../src/generated/clients/getV1DashboardUsers.ts","../../src/generated/clients/getV1LendingMarkets.ts","../../src/generated/clients/getV1LendingMarketsAvailable.ts","../../src/generated/clients/getV1LendingReserves.ts","../../src/generated/clients/postV1LendingOperationsRedeemAllocatedBuild.ts","../../src/generated/clients/postV1LendingOperationsRedeemAllocatedSubmit.ts","../../src/generated/clients/postV1RebalanceOperationsByPendingOperationIdConfirm.ts","../../src/generated/clients/putV1DashboardAllowlist.ts"],"names":[],"mappings":";AAmBO,IAAM,YAAA,GAAN,MAAM,aAAA,SAAqB,KAAA,CAAM;AAAA,EAGvC,YAEU,UAAA,EAET,OAAA,EAES,IAAA,GAAsB,IAAA,EAEtB,gBAA+B,IAAA,EACvC;AACD,IAAA,KAAA,CAAM,OAAO,CAAA;AARJ,IAAA,IAAA,CAAA,UAAA,GAAA,UAAA;AAIA,IAAA,IAAA,CAAA,IAAA,GAAA,IAAA;AAEA,IAAA,IAAA,CAAA,aAAA,GAAA,aAAA;AAIT,IAAA,MAAA,CAAO,cAAA,CAAe,IAAA,EAAM,aAAA,CAAa,SAAS,CAAA;AAAA,EACnD;AAAA,EAXU,UAAA;AAAA,EAIA,IAAA;AAAA,EAEA,aAAA;AAAA,EAVQ,IAAA,GAAO,cAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAsBzB,OAAO,QAAA,CACN,UAAA,EACA,UAAA,EACA,IAAA,EACe;AAEf,IAAA,MAAM,WACJ,IAAA,EAAM,OAAA,IAAW,IAAA,CAAK,OAAA,CAAQ,SAAS,CAAA,GAAI,IAAA,CAAK,OAAA,GAAU,IAAA,MAC1D,cAAc,UAAA,CAAW,MAAA,GAAS,IAAI,UAAA,GAAa,IAAA,CAAA,IACpD,QAAQ,UAAU,CAAA,CAAA;AACnB,IAAA,OAAO,IAAI,aAAA;AAAA,MACV,UAAA;AAAA,MACA,OAAA;AAAA,MACA,MAAM,IAAA,IAAQ,IAAA;AAAA,MACd,MAAM,aAAA,IAAiB;AAAA,KACxB;AAAA,EACD;AACD,CAAA;;;ACpCA,IAAM,gBAAA,uBAAuB,GAAA,CAAI,CAAC,QAAQ,KAAA,EAAO,OAAA,EAAS,QAAQ,CAAC,CAAA;AACnE,IAAM,mC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MAAA,EAAQ,KAAA,EAAO,KAAK,CAAA,uBAAA,CAAA,EAAmC;AACrE,EAAA,OAAO,GAAA;AACT;AAMA,eAAsB,uBAAA,CAAwB,IAAA,EAA8C,MAAA,GAA+F,EAAC,EAAG;AAC7L,EAAA,MAAM,EAAE,MAAA,EAAQ,OAAA,GAAU,YAAA,EAAO,GAAG,eAAc,GAAI,MAAA;AAEtD,EAAA,MAAM,WAAA,GAAc,IAAA;AAEpB,EAAA,MAAM,MAAM,MAAM,OAAA,CAAqH,EAAE,MAAA,EAAS,OAAO,GAAA,EAAM,6BAAA,EAA8B,CAAE,GAAA,CAAI,UAAS,EAAG,IAAA,EAAO,WAAA,EAAa,GAAI,eAAe,CAAA;AACtP,EAAA,OAAO,GAAA,CAAI,IAAA;AACb","file":"index.js","sourcesContent":["// Copyright 2026 Vayo Finance Labs\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Structured error thrown by the SDK on any non-2xx response. Partners can\n * `catch (err) { if (err instanceof VayoApiError) ... }` to discriminate from\n * arbitrary network/runtime failures.\n *\n * Mirrors the error envelope returned by the Vayo API's central\n * `errorHandler` middleware: `{ statusCode, message, code?, correlationId? }`.\n */\n\nexport interface VayoErrorBody {\n\tstatusCode?: number;\n\tmessage?: string;\n\tcode?: string | null;\n\tcorrelationId?: string | null;\n}\n\nexport class VayoApiError extends Error {\n\toverride readonly name = \"VayoApiError\";\n\n\tconstructor(\n\t\t/** HTTP status code from the response. */\n\t\treadonly statusCode: number,\n\t\t/** Server-provided message, or a fallback HTTP status text. */\n\t\tmessage: string,\n\t\t/** Server-provided error code (e.g. `INVALID_API_KEY`), if present. */\n\t\treadonly code: string | null = null,\n\t\t/** Server-side correlation id for grepping logs. */\n\t\treadonly correlationId: string | null = null,\n\t) {\n\t\tsuper(message);\n\t\t// Ensure `instanceof VayoApiError` works after transpilation.\n\t\tObject.setPrototypeOf(this, VayoApiError.prototype);\n\t}\n\n\t/**\n\t * Factory used by the internal HTTP wrapper. Tolerant of malformed bodies —\n\t * if the server returns HTML or empty content, we still construct a useful\n\t * error from the status alone.\n\t */\n\tstatic fromBody(\n\t\tstatusCode: number,\n\t\tstatusText: string,\n\t\tbody: VayoErrorBody | null,\n\t): VayoApiError {\n\t\t// Treat empty strings as missing — `??` only handles null/undefined.\n\t\tconst message =\n\t\t\t(body?.message && body.message.length > 0 ? body.message : null) ??\n\t\t\t(statusText && statusText.length > 0 ? statusText : null) ??\n\t\t\t`HTTP ${statusCode}`;\n\t\treturn new VayoApiError(\n\t\t\tstatusCode,\n\t\t\tmessage,\n\t\t\tbody?.code ?? null,\n\t\t\tbody?.correlationId ?? null,\n\t\t);\n\t}\n}\n","// Copyright 2026 Vayo Finance Labs\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Internal fetch wrapper consumed by the kubb-generated client functions in\n * `src/generated/clients/`. The shape (`client`, `Client`, `RequestConfig`,\n * `ResponseConfig`, `ResponseErrorConfig`) is dictated by the kubb plugin —\n * generated files import these exact names.\n *\n * Adapted from `apps/web/src/shared/api/kubb-client.ts`. Differences:\n * - Parameterized over a `ClientContext` (baseUrl + apiKey + custom fetch +\n * idempotency-key generator) supplied by `createVayoPartnerClient()`.\n * The context is threaded through `RequestConfig.context`.\n * - Injects `x-api-key` instead of `Authorization: Bearer` for partner auth\n * - Auto-generates `Idempotency-Key` for mutating routes when not provided\n * - Throws a structured `VayoApiError` instead of the raw response body\n *\n * This module is NOT a public export — partners interact with the high-level\n * `createVayoPartnerClient()` from `src/client.ts`.\n */\n\nimport { VayoApiError, type VayoErrorBody } from \"./errors\";\n\nconst MUTATING_METHODS = new Set([\"POST\", \"PUT\", \"PATCH\", \"DELETE\"]);\nconst NO_BODY_STATUSES = new Set([204, 205, 304]);\n\n/**\n * Per-request context injected by `createVayoPartnerClient()` into every\n * generated client call via `RequestConfig.context`. Holds connection\n * details, auth, and fetch overrides.\n */\nexport interface ClientContext {\n\tbaseUrl: string;\n\tapiKey: string;\n\t/** Per-call idempotency key. Auto-generated for mutating routes if absent. */\n\tidempotencyKey?: string;\n\t/** Custom fetch (e.g. for Node 18-, edge runtimes, instrumentation). */\n\tfetch?: typeof fetch;\n\t/** Override the default UUID v4 generator (useful for deterministic tests). */\n\tgenerateIdempotencyKey?: () => string;\n}\n\nexport type RequestConfig<TData = unknown> = {\n\tbaseURL?: string;\n\turl?: string;\n\tmethod?: \"GET\" | \"PUT\" | \"PATCH\" | \"POST\" | \"DELETE\" | \"OPTIONS\" | \"HEAD\";\n\tparams?: unknown;\n\tdata?: TData | FormData;\n\tresponseType?:\n\t\t| \"arraybuffer\"\n\t\t| \"blob\"\n\t\t| \"document\"\n\t\t| \"json\"\n\t\t| \"text\"\n\t\t| \"stream\";\n\tsignal?: AbortSignal;\n\theaders?: [string, string][] | Record<string, string>;\n\tcredentials?: RequestCredentials;\n\t/**\n\t * Per-call SDK context. Injected by `createVayoPartnerClient()` — not part\n\t * of the kubb-generated function signatures, partners never set this\n\t * directly.\n\t */\n\tcontext?: ClientContext;\n};\n\nexport type ResponseConfig<TData = unknown> = {\n\tdata: TData;\n\tstatus: number;\n\tstatusText: string;\n\theaders: Headers;\n};\n\nexport type ResponseErrorConfig<TError = unknown> = TError;\n\nfunction buildUrl(baseURL: string, url?: string, params?: unknown): string {\n\tconst fullUrl = [baseURL, url].filter(Boolean).join(\"\");\n\tif (!params || typeof params !== \"object\") return fullUrl;\n\tconst searchParams = new URLSearchParams();\n\tfor (const [key, value] of Object.entries(\n\t\tparams as Record<string, unknown>,\n\t)) {\n\t\tif (value === undefined || value === null) continue;\n\t\tif (Array.isArray(value)) {\n\t\t\t// Comma-join arrays — matches the spec's `?mints=a,b,c` style.\n\t\t\tsearchParams.append(key, value.join(\",\"));\n\t\t} else {\n\t\t\tsearchParams.append(key, String(value));\n\t\t}\n\t}\n\tconst queryString = searchParams.toString();\n\treturn queryString ? `${fullUrl}?${queryString}` : fullUrl;\n}\n\nfunction normalizeHeaders(\n\theaders?: [string, string][] | Record<string, string>,\n): Record<string, string> {\n\tif (!headers) return {};\n\tif (Array.isArray(headers)) return Object.fromEntries(headers);\n\treturn { ...headers };\n}\n\nfunction defaultIdempotencyKey(): string {\n\t// Browsers and Node 19+ expose `crypto.randomUUID`. Fall back to a\n\t// pseudo-random value for older Node — partners can override via\n\t// `generateIdempotencyKey` in `createVayoPartnerClient` options.\n\tif (\n\t\ttypeof crypto !== \"undefined\" &&\n\t\ttypeof crypto.randomUUID === \"function\"\n\t) {\n\t\treturn crypto.randomUUID();\n\t}\n\treturn `idem-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 12)}`;\n}\n\nexport async function client<\n\tTResponseData,\n\t_TError = unknown,\n\tTRequestData = unknown,\n>(config: RequestConfig<TRequestData>): Promise<ResponseConfig<TResponseData>> {\n\tconst ctx = config.context;\n\tif (!ctx) {\n\t\tthrow new Error(\n\t\t\t\"[vayo/core-sdk] internal: RequestConfig.context is missing. \" +\n\t\t\t\t\"Generated clients must be invoked through createVayoPartnerClient().\",\n\t\t);\n\t}\n\n\tconst baseURL = config.baseURL ?? ctx.baseUrl;\n\tconst url = buildUrl(baseURL, config.url, config.params);\n\tconst headers = normalizeHeaders(config.headers);\n\tconst method = (config.method ?? \"GET\").toUpperCase();\n\n\t// Always inject the partner API key.\n\theaders[\"x-api-key\"] = ctx.apiKey;\n\n\t// Idempotency-Key — required by the partner v1 mutating routes. Honor an\n\t// explicit caller-provided value (so retries can replay), otherwise auto-\n\t// generate one for mutating methods only (reads never need it).\n\tif (MUTATING_METHODS.has(method) && !headers[\"Idempotency-Key\"]) {\n\t\theaders[\"Idempotency-Key\"] =\n\t\t\tctx.idempotencyKey ??\n\t\t\t(ctx.generateIdempotencyKey ?? defaultIdempotencyKey)();\n\t}\n\n\tif (!headers[\"Content-Type\"] && !(config.data instanceof FormData)) {\n\t\theaders[\"Content-Type\"] = \"application/json\";\n\t}\n\n\tlet body: BodyInit | undefined;\n\tif (config.data instanceof FormData) {\n\t\tbody = config.data;\n\t} else if (config.data !== undefined) {\n\t\tbody = JSON.stringify(config.data);\n\t}\n\n\tconst fetchImpl = ctx.fetch ?? fetch;\n\tconst response = await fetchImpl(url, {\n\t\tmethod,\n\t\theaders,\n\t\tbody,\n\t\tsignal: config.signal,\n\t\t// Default to 'omit' (not 'include') because partners never share cookies\n\t\t// cross-origin with Vayo. The webapp uses 'include' for first-party flows\n\t\t// — partners use header auth.\n\t\tcredentials: config.credentials ?? \"omit\",\n\t});\n\n\tlet data: unknown;\n\tif (NO_BODY_STATUSES.has(response.status)) {\n\t\tdata = {};\n\t} else {\n\t\tdata = await response.json().catch(() => ({}));\n\t}\n\n\tif (!response.ok) {\n\t\tthrow VayoApiError.fromBody(\n\t\t\tresponse.status,\n\t\t\tresponse.statusText,\n\t\t\tdata as VayoErrorBody | null,\n\t\t);\n\t}\n\n\treturn {\n\t\tdata: data as TResponseData,\n\t\tstatus: response.status,\n\t\tstatusText: response.statusText,\n\t\theaders: response.headers,\n\t};\n}\n\nexport type Client = typeof client;\n\nexport default client;\n","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetHealthModeSQueryResponse } from \"../types/GetHealthModeS.ts\";\n\nfunction getGetHealthModeSUrl() {\n const res = { method: 'GET', url: `/health/mode-s` as const }\n return res\n}\n\n/**\n * {@link /health/mode-s}\n */\nexport async function getHealthModeS(config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetHealthModeSQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetHealthModeSUrl().url.toString(), ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1DashboardAllowlistQueryResponse } from \"../types/GetV1DashboardAllowlist.ts\";\n\nfunction getGetV1DashboardAllowlistUrl() {\n const res = { method: 'GET', url: `/v1/dashboard/allowlist` as const }\n return res\n}\n\n/**\n * @summary Read-only view of the partner's effective market/reserve allowlist\n * {@link /v1/dashboard/allowlist}\n */\nexport async function getV1DashboardAllowlist(config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1DashboardAllowlistQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1DashboardAllowlistUrl().url.toString(), ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1DashboardApiKeysQueryResponse } from \"../types/GetV1DashboardApiKeys.ts\";\n\nfunction getGetV1DashboardApiKeysUrl() {\n const res = { method: 'GET', url: `/v1/dashboard/api-keys` as const }\n return res\n}\n\n/**\n * @summary Partner's own API keys (prefix + metadata only, never plaintext)\n * {@link /v1/dashboard/api-keys}\n */\nexport async function getV1DashboardApiKeys(config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1DashboardApiKeysQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1DashboardApiKeysUrl().url.toString(), ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1DashboardConsumptionQueryResponse } from \"../types/GetV1DashboardConsumption.ts\";\n\nfunction getGetV1DashboardConsumptionUrl() {\n const res = { method: 'GET', url: `/v1/dashboard/consumption` as const }\n return res\n}\n\n/**\n * @summary API consumption metrics (requests 24h/7d/30d, rate limit config, recent logs)\n * {@link /v1/dashboard/consumption}\n */\nexport async function getV1DashboardConsumption(config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1DashboardConsumptionQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1DashboardConsumptionUrl().url.toString(), ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1DashboardInvestmentPerformanceQueryResponse } from \"../types/GetV1DashboardInvestmentPerformance.ts\";\n\nfunction getGetV1DashboardInvestmentPerformanceUrl() {\n const res = { method: 'GET', url: `/v1/dashboard/investment-performance` as const }\n return res\n}\n\n/**\n * @summary Aggregated investment performance — total yield, volume, user count across windows (NOT performance fees)\n * {@link /v1/dashboard/investment-performance}\n */\nexport async function getV1DashboardInvestmentPerformance(config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1DashboardInvestmentPerformanceQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1DashboardInvestmentPerformanceUrl().url.toString(), ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1DashboardOverviewQueryResponse } from \"../types/GetV1DashboardOverview.ts\";\n\nfunction getGetV1DashboardOverviewUrl() {\n const res = { method: 'GET', url: `/v1/dashboard/overview` as const }\n return res\n}\n\n/**\n * @summary Partner dashboard home — users, volume, fees, consumption at a glance\n * {@link /v1/dashboard/overview}\n */\nexport async function getV1DashboardOverview(config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1DashboardOverviewQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1DashboardOverviewUrl().url.toString(), ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1DashboardPartnerFeesQueryResponse } from \"../types/GetV1DashboardPartnerFees.ts\";\n\nfunction getGetV1DashboardPartnerFeesUrl() {\n const res = { method: 'GET', url: `/v1/dashboard/partner-fees` as const }\n return res\n}\n\n/**\n * @summary Partner's earned fee share (NOT investment performance) — current model, bps, totals across windows\n * {@link /v1/dashboard/partner-fees}\n */\nexport async function getV1DashboardPartnerFees(config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1DashboardPartnerFeesQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1DashboardPartnerFeesUrl().url.toString(), ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1DashboardPartnerFeesPayoutsQueryResponse, GetV1DashboardPartnerFeesPayoutsQueryParams } from \"../types/GetV1DashboardPartnerFeesPayouts.ts\";\n\nfunction getGetV1DashboardPartnerFeesPayoutsUrl() {\n const res = { method: 'GET', url: `/v1/dashboard/partner-fees/payouts` as const }\n return res\n}\n\n/**\n * @summary Paginated partner fee payout history (row-level detail)\n * {@link /v1/dashboard/partner-fees/payouts}\n */\nexport async function getV1DashboardPartnerFeesPayouts(params?: GetV1DashboardPartnerFeesPayoutsQueryParams, config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1DashboardPartnerFeesPayoutsQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1DashboardPartnerFeesPayoutsUrl().url.toString(), params, ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1DashboardPerformanceFeesQueryResponse } from \"../types/GetV1DashboardPerformanceFees.ts\";\n\nfunction getGetV1DashboardPerformanceFeesUrl() {\n const res = { method: 'GET', url: `/v1/dashboard/performance-fees` as const }\n return res\n}\n\n/**\n * @summary Legacy alias of /partner-fees — performance fees collected from the partner's users\n * {@link /v1/dashboard/performance-fees}\n */\nexport async function getV1DashboardPerformanceFees(config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1DashboardPerformanceFeesQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1DashboardPerformanceFeesUrl().url.toString(), ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1DashboardTransactionsQueryResponse, GetV1DashboardTransactionsQueryParams } from \"../types/GetV1DashboardTransactions.ts\";\n\nfunction getGetV1DashboardTransactionsUrl() {\n const res = { method: 'GET', url: `/v1/dashboard/transactions` as const }\n return res\n}\n\n/**\n * @summary Paginated transactions across the partner's user base (filter by type/status)\n * {@link /v1/dashboard/transactions}\n */\nexport async function getV1DashboardTransactions(params?: GetV1DashboardTransactionsQueryParams, config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1DashboardTransactionsQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1DashboardTransactionsUrl().url.toString(), params, ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1DashboardUsersQueryResponse, GetV1DashboardUsersQueryParams } from \"../types/GetV1DashboardUsers.ts\";\n\nfunction getGetV1DashboardUsersUrl() {\n const res = { method: 'GET', url: `/v1/dashboard/users` as const }\n return res\n}\n\n/**\n * @summary Paginated list of the partner's users\n * {@link /v1/dashboard/users}\n */\nexport async function getV1DashboardUsers(params?: GetV1DashboardUsersQueryParams, config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1DashboardUsersQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1DashboardUsersUrl().url.toString(), params, ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1LendingMarketsQueryResponse } from \"../types/GetV1LendingMarkets.ts\";\n\nfunction getGetV1LendingMarketsUrl() {\n const res = { method: 'GET', url: `/v1/lending/markets` as const }\n return res\n}\n\n/**\n * @summary List lending markets — filtered by the partner's allowlist (intersection with global)\n * {@link /v1/lending/markets}\n */\nexport async function getV1LendingMarkets(config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1LendingMarketsQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1LendingMarketsUrl().url.toString(), ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1LendingMarketsAvailableQueryResponse } from \"../types/GetV1LendingMarketsAvailable.ts\";\n\nfunction getGetV1LendingMarketsAvailableUrl() {\n const res = { method: 'GET', url: `/v1/lending/markets/available` as const }\n return res\n}\n\n/**\n * @summary List all Vayo-approved markets (global whitelist) — ignores the partner allowlist\n * {@link /v1/lending/markets/available}\n */\nexport async function getV1LendingMarketsAvailable(config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1LendingMarketsAvailableQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1LendingMarketsAvailableUrl().url.toString(), ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { GetV1LendingReservesQueryResponse, GetV1LendingReservesQueryParams } from \"../types/GetV1LendingReserves.ts\";\n\nfunction getGetV1LendingReservesUrl() {\n const res = { method: 'GET', url: `/v1/lending/reserves` as const }\n return res\n}\n\n/**\n * @summary Flat list of reserves across markets — filtered by partner allowlist\n * {@link /v1/lending/reserves}\n */\nexport async function getV1LendingReserves(params?: GetV1LendingReservesQueryParams, config: Partial<RequestConfig> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n\n\n const res = await request<GetV1LendingReservesQueryResponse, ResponseErrorConfig<Error>, unknown>({ method : \"GET\", url : getGetV1LendingReservesUrl().url.toString(), params, ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { PostV1LendingOperationsRedeemAllocatedBuildMutationRequest, PostV1LendingOperationsRedeemAllocatedBuildMutationResponse, PostV1LendingOperationsRedeemAllocatedBuildQueryParams } from \"../types/PostV1LendingOperationsRedeemAllocatedBuild.ts\";\n\nfunction getPostV1LendingOperationsRedeemAllocatedBuildUrl() {\n const res = { method: 'POST', url: `/v1/lending-operations/redeem-allocated/build` as const }\n return res\n}\n\n/**\n * @description Builds a Kamino redeem transaction with the witness cosignature attached. The partner deserializes, adds the user wallet authority signature via their own Privy SDK, and submits via /submit (or directly to their own RPC).\n * @summary Mode S — build a partially-signed redeem tx\n * {@link /v1/lending-operations/redeem-allocated/build}\n */\nexport async function postV1LendingOperationsRedeemAllocatedBuild(data: PostV1LendingOperationsRedeemAllocatedBuildMutationRequest, params?: PostV1LendingOperationsRedeemAllocatedBuildQueryParams, config: Partial<RequestConfig<PostV1LendingOperationsRedeemAllocatedBuildMutationRequest>> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n const requestData = data\n\n const res = await request<PostV1LendingOperationsRedeemAllocatedBuildMutationResponse, ResponseErrorConfig<Error>, PostV1LendingOperationsRedeemAllocatedBuildMutationRequest>({ method : \"POST\", url : getPostV1LendingOperationsRedeemAllocatedBuildUrl().url.toString(), params, data : requestData, ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { PostV1LendingOperationsRedeemAllocatedSubmitMutationRequest, PostV1LendingOperationsRedeemAllocatedSubmitMutationResponse } from \"../types/PostV1LendingOperationsRedeemAllocatedSubmit.ts\";\n\nfunction getPostV1LendingOperationsRedeemAllocatedSubmitUrl() {\n const res = { method: 'POST', url: `/v1/lending-operations/redeem-allocated/submit` as const }\n return res\n}\n\n/**\n * @description Verifies the witness/Kora cosignatures are still intact (Defense 2b — message hash re-verification) and submits to RPC. Optional: partners may submit directly to their own RPC instead and skip this endpoint entirely. The cryptographic anti-bypass guarantee holds either way.\n * @summary Mode S — submit a fully-signed redeem tx (optional)\n * {@link /v1/lending-operations/redeem-allocated/submit}\n */\nexport async function postV1LendingOperationsRedeemAllocatedSubmit(data: PostV1LendingOperationsRedeemAllocatedSubmitMutationRequest, config: Partial<RequestConfig<PostV1LendingOperationsRedeemAllocatedSubmitMutationRequest>> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n const requestData = data\n\n const res = await request<PostV1LendingOperationsRedeemAllocatedSubmitMutationResponse, ResponseErrorConfig<Error>, PostV1LendingOperationsRedeemAllocatedSubmitMutationRequest>({ method : \"POST\", url : getPostV1LendingOperationsRedeemAllocatedSubmitUrl().url.toString(), data : requestData, ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { PostV1RebalanceOperationsByPendingOperationIdConfirmMutationRequest, PostV1RebalanceOperationsByPendingOperationIdConfirmMutationResponse, PostV1RebalanceOperationsByPendingOperationIdConfirmPathParams, PostV1RebalanceOperationsByPendingOperationIdConfirm401, PostV1RebalanceOperationsByPendingOperationIdConfirm403, PostV1RebalanceOperationsByPendingOperationIdConfirm422 } from \"../types/PostV1RebalanceOperationsByPendingOperationIdConfirm.ts\";\n\nfunction getPostV1RebalanceOperationsByPendingOperationIdConfirmUrl(pendingOperationId: PostV1RebalanceOperationsByPendingOperationIdConfirmPathParams[\"pendingOperationId\"]) {\n const res = { method: 'POST', url: `/v1/rebalance/operations/${pendingOperationId}/confirm` as const }\n return res\n}\n\n/**\n * @description Signing proxy reports the result of submitting the atomic rebalance tx. Authenticated with a scoped API key (scope: `rebalance:operation:confirm`) and requires an `Idempotency-Key` header. Vayo independently verifies the reported signature on-chain before trusting confirmations.\n * @summary Confirm the outcome of an async rebalance operation\n * {@link /v1/rebalance/operations/:pendingOperationId/confirm}\n */\nexport async function postV1RebalanceOperationsByPendingOperationIdConfirm(pendingOperationId: PostV1RebalanceOperationsByPendingOperationIdConfirmPathParams[\"pendingOperationId\"], data: PostV1RebalanceOperationsByPendingOperationIdConfirmMutationRequest, config: Partial<RequestConfig<PostV1RebalanceOperationsByPendingOperationIdConfirmMutationRequest>> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n const requestData = data\n\n const res = await request<PostV1RebalanceOperationsByPendingOperationIdConfirmMutationResponse, ResponseErrorConfig<PostV1RebalanceOperationsByPendingOperationIdConfirm401 | PostV1RebalanceOperationsByPendingOperationIdConfirm403 | PostV1RebalanceOperationsByPendingOperationIdConfirm422>, PostV1RebalanceOperationsByPendingOperationIdConfirmMutationRequest>({ method : \"POST\", url : getPostV1RebalanceOperationsByPendingOperationIdConfirmUrl(pendingOperationId).url.toString(), data : requestData, ... requestConfig })\n return res.data\n}","/**\n* Generated by Kubb (https://kubb.dev/).\n* Do not edit manually.\n*/\n\nimport fetch from \"../../http\";\nimport type { Client, RequestConfig, ResponseErrorConfig } from \"../../http\";\nimport type { PutV1DashboardAllowlistMutationRequest, PutV1DashboardAllowlistMutationResponse } from \"../types/PutV1DashboardAllowlist.ts\";\n\nfunction getPutV1DashboardAllowlistUrl() {\n const res = { method: 'PUT', url: `/v1/dashboard/allowlist` as const }\n return res\n}\n\n/**\n * @summary Update the partner's market/reserve allowlist (subset of the Vayo global whitelist)\n * {@link /v1/dashboard/allowlist}\n */\nexport async function putV1DashboardAllowlist(data: PutV1DashboardAllowlistMutationRequest, config: Partial<RequestConfig<PutV1DashboardAllowlistMutationRequest>> & { client?: Client } = {}) {\n const { client: request = fetch, ...requestConfig } = config\n\n const requestData = data\n\n const res = await request<PutV1DashboardAllowlistMutationResponse, ResponseErrorConfig<Error>, PutV1DashboardAllowlistMutationRequest>({ method : \"PUT\", url : getPutV1DashboardAllowlistUrl().url.toString(), data : requestData, ... requestConfig })\n return res.data\n}"]}