From 025fcb20ce0f0401ae9e5d0dd679271d642ae967 Mon Sep 17 00:00:00 2001 From: Petar Todorovic Date: Wed, 16 Sep 2026 11:51:30 +0200 Subject: [PATCH] fix(widget): permit null in validator provider revshare and update openapi generation - Permit null in ValidatorProviderDto.revshare decoding (OpenAPI spec patch, regenerated schemas, and domain regression tests). - Target production API doc endpoints (api.stakek.it, api.yield.xyz, and borrow.yield.xyz) for OpenAPI generation. - Strip _v1 operation ID suffixes emitted by NestJS URI versioning so client methods and DTOs retain stable names. - Close unannotated OpenAPI object schemas in prepareSpecContents so Effect rc.115 generates Schema.Struct preserving .fields access. - Support "supplyAndBorrow" action and "BUNDLE" transaction types in SKBorrowTxMeta. - Add blueBundleOriginationFeeBps to borrow test mock fixtures. --- .../generated-api/generate-effect-openapi.ts | 75 +- .../widget/src/generated/api/borrow-client.ts | 386 +- packages/widget/src/generated/api/borrow.ts | 495 +- .../widget/src/generated/api/legacy-schema.ts | 5839 +++++++---- packages/widget/src/generated/api/legacy.ts | 8308 +++++++++++----- .../widget/src/generated/api/yield-schema.ts | 8632 +++++++++-------- packages/widget/src/generated/api/yield.ts | 2037 ++-- packages/widget/src/public-api/types.ts | 6 +- .../borrow/action-preparation/prepare.test.ts | 1 + .../wallet-balances.test.ts | 1 + .../borrow/architecture/api-boundary.test.ts | 1 + .../tests/borrow/borrow-entry/atoms.test.ts | 1 + .../borrow/borrow-entry/market-groups.test.ts | 1 + .../tests/borrow/domain/catalog.test.ts | 1 + .../tests/borrow/domain/risk-position.test.ts | 1 + .../action-preparation-atoms.test.ts | 1 + .../borrow/positions/borrow-positions.test.ts | 1 + .../borrow/positions/resource-atoms.test.ts | 1 + .../widget/tests/domain/earn-models.test.ts | 52 + .../features/semantic-invalidation.test.ts | 1 + ...-position-action-wallet-scope.dom.test.tsx | 1 + .../borrow-position-details.browser.test.tsx | 1 + .../renders-initial-page.browser.test.tsx | 3 + 23 files changed, 16384 insertions(+), 9462 deletions(-) diff --git a/packages/widget/scripts/generated-api/generate-effect-openapi.ts b/packages/widget/scripts/generated-api/generate-effect-openapi.ts index b718c908a..b2d3629a0 100644 --- a/packages/widget/scripts/generated-api/generate-effect-openapi.ts +++ b/packages/widget/scripts/generated-api/generate-effect-openapi.ts @@ -85,6 +85,11 @@ const specs: SpecConfig[] = [ schemaOnly: true, }, ], + // NestJS URI versioning appends `_v1` to Swagger operationIds + // (e.g. `TokenController_getTokens_v1`). Strip the suffix so openapigen + // generates stable client method and DTO names without `V1` suffixes. + prepareSpec: (contents) => + contents.replace(/operationId:\s*(.+?)_v\d+\b/g, "operationId: $1"), patches: [ // Upstream currently declares regionCode as an object, but production // payloads and widget geo-block handling use it as a string. @@ -97,8 +102,7 @@ const specs: SpecConfig[] = [ }, { name: "YieldApi", - url: - process.env.YIELD_API_SPEC_URL ?? "https://api.stg.yield.xyz/docs.yaml", + url: process.env.YIELD_API_SPEC_URL ?? "https://api.yield.xyz/docs.yaml", specFileName: "yield-api.yaml", outputs: [ { @@ -111,6 +115,11 @@ const specs: SpecConfig[] = [ schemaOnly: true, }, ], + // NestJS URI versioning appends `_v1` to Swagger operationIds + // (e.g. `YieldsController_getYields_v1`). Strip the suffix so openapigen + // generates stable client method and DTO names without `V1` suffixes. + prepareSpec: (contents) => + contents.replace(/operationId:\s*(.+?)_v\d+\b/g, "operationId: $1"), patches: [ // These DTO properties have concrete scalar types in the Yield API // source, but their Swagger decorators omit the explicit property type. @@ -171,6 +180,17 @@ const specs: SpecConfig[] = [ description: "Total TVL across the entire provider in USD", example: "10,200,000", }), + { + op: "replace", + path: "/components/schemas/ValidatorProviderDto/properties/revshare", + value: { + description: "Revenue sharing details by tier", + oneOf: [ + { $ref: "#/components/schemas/RevShareTiersDto" }, + { type: "null" }, + ], + }, + }, nullableScalarPatch({ schema: "CuratorDto", property: "name", @@ -351,6 +371,25 @@ const specs: SpecConfig[] = [ description: "When the transaction was broadcasted to the network", }, }, + { + op: "replace", + path: "/components/schemas/TransactionDto/properties/unsignedTransaction", + value: { + description: + "The unsigned transaction data to be signed by the wallet", + nullable: true, + oneOf: [ + { type: "string", description: "Serialized transaction data" }, + { + type: "object", + description: "Transaction object (for non-EVM chains)", + }, + { type: "null" }, + ], + example: + "0x02f87082012a022f2f83018000947a250d5630b4cf539739df2c5dacb4c659f2488d880de0b6b3a764000080c080a0ef0de6c7b46fc75dd6cb86dccc3cfd731c2bdf6f3d736557240c3646c6fe01a6a07cd60b58dfe01847249dfdd7950ba0d045dded5bbe410b07a015a0ed34e5e00d", + }, + }, { op: "replace", path: "/components/schemas/ActionDto/properties/completedAt", @@ -448,9 +487,41 @@ const fetchSpec = async (spec: SpecConfig) => { return response.text(); }; +/** + * In Effect rc.115, openapigen emits `Schema.StructWithRest` for OpenAPI objects + * that omit `additionalProperties`. Explicitly closing objects that declare + * `properties` ensures openapigen emits `Schema.Struct`, preserving direct + * `.fields` access across widget domain models. + */ +const closeOpenApiObjectSchemas = (document: unknown): void => { + const isJsonObject = (value: unknown): value is Record => + typeof value === "object" && value !== null && !Array.isArray(value); + + const visit = (value: unknown): void => { + if (Array.isArray(value)) { + for (const item of value) visit(item); + return; + } + if (!isJsonObject(value)) return; + + if ( + value.type === "object" && + value.additionalProperties === undefined && + isJsonObject(value.properties) + ) { + value.additionalProperties = false; + } + + for (const child of Object.values(value)) visit(child); + }; + + visit(document); +}; + const prepareSpecContents = (spec: SpecConfig, contents: string) => { const document = parse(spec.prepareSpec?.(contents) ?? contents) as unknown; normalizeOpenApiUnionObjects(document); + closeOpenApiObjectSchemas(document); return spec.specFileName.endsWith(".json") ? `${JSON.stringify(document, null, 2)}\n` diff --git a/packages/widget/src/generated/api/borrow-client.ts b/packages/widget/src/generated/api/borrow-client.ts index ff435ee7e..8a6d5b636 100644 --- a/packages/widget/src/generated/api/borrow-client.ts +++ b/packages/widget/src/generated/api/borrow-client.ts @@ -13,13 +13,13 @@ export type IntegrationMetadataDto = { readonly logoURI: string; }; export type ArgumentSchemaDto = { - readonly type?: {}; - readonly properties?: {}; + readonly type?: { readonly [x: string]: unknown }; + readonly properties?: { readonly [x: string]: unknown }; readonly required?: ReadonlyArray; - readonly additionalProperties?: {}; - readonly items?: {}; + readonly additionalProperties?: { readonly [x: string]: unknown }; + readonly items?: { readonly [x: string]: unknown }; readonly enum?: ReadonlyArray; - readonly default?: {}; + readonly default?: { readonly [x: string]: unknown }; readonly notes?: string; }; export type TokenDto = { @@ -47,27 +47,6 @@ export type ArgumentsDto = { readonly targetLtv?: string; readonly marketId: string; }; -export type RepaidDebtDto = { - readonly tokenAddress: string; - readonly tokenSymbol: string; - readonly amount: string; - readonly amountRaw: string; - readonly amountUsd: string | null; - readonly shares: string; -}; -export type SeizedCollateralDto = { - readonly tokenAddress: string; - readonly tokenSymbol: string; - readonly amount: string; - readonly amountRaw: string; - readonly amountUsd: string | null; -}; -export type BadDebtDto = { - readonly amountRaw: string; - readonly amount: string; - readonly amountUsd: string | null; - readonly shares: string; -}; export type TransactionDto = { readonly id: string; readonly network: @@ -92,6 +71,7 @@ export type TransactionDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -185,7 +165,8 @@ export type TransactionDto = { | "REPAY" | "WITHDRAW" | "ENABLE_COLLATERAL" - | "DISABLE_COLLATERAL"; + | "DISABLE_COLLATERAL" + | "BUNDLE"; readonly status: | "NOT_FOUND" | "CREATED" @@ -239,7 +220,7 @@ export type SubmitTransactionResponseDto = { | "FAILED" | "SKIPPED"; readonly error?: string; - readonly details?: {}; + readonly details?: { readonly [x: string]: unknown }; }; export type HealthStatus = "OK" | "FAIL"; export type ActionDefinitionDto = { @@ -249,7 +230,8 @@ export type ActionDefinitionDto = { | "repay" | "withdraw" | "enableCollateral" - | "disableCollateral"; + | "disableCollateral" + | "supplyAndBorrow"; readonly label: string; readonly schema: ArgumentSchemaDto; }; @@ -268,7 +250,8 @@ export type BorrowPendingActionDto = { | "repay" | "withdraw" | "enableCollateral" - | "disableCollateral"; + | "disableCollateral" + | "supplyAndBorrow"; readonly label: string; readonly args: ArgumentsDto; }; @@ -280,132 +263,11 @@ export type ActionRequestDto = { | "repay" | "withdraw" | "enableCollateral" - | "disableCollateral"; + | "disableCollateral" + | "supplyAndBorrow"; readonly address: string; readonly args: ArgumentsDto; }; -export type LiquidationDto = { - readonly id: string; - readonly integrationId: string; - readonly network: - | "ethereum" - | "ethereum-goerli" - | "ethereum-holesky" - | "ethereum-sepolia" - | "ethereum-hoodi" - | "arbitrum" - | "base" - | "base-sepolia" - | "gnosis" - | "optimism" - | "polygon" - | "polygon-amoy" - | "starknet" - | "zksync" - | "linea" - | "unichain" - | "plume" - | "monad-testnet" - | "monad" - | "robinhood" - | "robinhood-testnet" - | "avalanche-c" - | "avalanche-c-atomic" - | "avalanche-p" - | "binance" - | "celo" - | "fantom" - | "harmony" - | "moonriver" - | "okc" - | "viction" - | "core" - | "sonic" - | "plasma" - | "katana" - | "hyperevm" - | "tempo" - | "pharos" - | "agoric" - | "akash" - | "axelar" - | "band-protocol" - | "bitsong" - | "canto" - | "chihuahua" - | "comdex" - | "coreum" - | "cosmos" - | "crescent" - | "cronos" - | "cudos" - | "desmos" - | "dydx" - | "evmos" - | "fetch-ai" - | "gravity-bridge" - | "injective" - | "irisnet" - | "juno" - | "kava" - | "ki-network" - | "mars-protocol" - | "nym" - | "okex-chain" - | "onomy" - | "osmosis" - | "persistence" - | "quicksilver" - | "regen" - | "secret" - | "sentinel" - | "sommelier" - | "stafi" - | "stargaze" - | "stride" - | "teritori" - | "tgrade" - | "umee" - | "sei" - | "mantra" - | "celestia" - | "saga" - | "zetachain" - | "dymension" - | "humansai" - | "neutron" - | "polkadot" - | "kusama" - | "westend" - | "bittensor" - | "aptos" - | "binancebeacon" - | "cardano" - | "near" - | "solana" - | "solana-devnet" - | "stellar" - | "stellar-testnet" - | "sui" - | "tezos" - | "tron" - | "ton" - | "ton-testnet" - | "hyperliquid"; - readonly address: string; - readonly marketId: string; - readonly type: "partial" | "full" | null; - readonly realizedBadDebt: boolean; - readonly occurredAt: string; - readonly blockNumber: number; - readonly transactionHash: string; - readonly transactionLink: string; - readonly liquidator: string; - readonly repaidDebt: RepaidDebtDto; - readonly seizedCollateral: SeizedCollateralDto; - readonly badDebt: BadDebtDto; - readonly lif: string; -}; export type ActionDto = { readonly id: string; readonly integrationId: string; @@ -415,7 +277,8 @@ export type ActionDto = { | "repay" | "withdraw" | "enableCollateral" - | "disableCollateral"; + | "disableCollateral" + | "supplyAndBorrow"; readonly address: string; readonly status: | "CANCELED" @@ -463,6 +326,7 @@ export type IntegrationDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -575,6 +439,7 @@ export type MarketDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -676,6 +541,7 @@ export type MarketDto = { readonly feeWrapperAddress: string | null; readonly originationFeeBps: string; readonly originationFeeWrapperAddress: string | null; + readonly blueBundleOriginationFeeBps: string | null; readonly minLoan: string | null; }; export type SupplyBalanceDto = { @@ -725,6 +591,7 @@ export type PositionDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -871,6 +738,7 @@ export type MarketsControllerGetMarketsV1Params = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -960,7 +828,7 @@ export type MarketsControllerGetMarketsV1200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export type MarketsControllerGetMarketsV1401 = { readonly message?: string; @@ -1009,6 +877,7 @@ export type PositionsControllerGetPositionsV1Params = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -1132,6 +1001,7 @@ export type PositionsControllerGetLiquidationsV1Params = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -1222,7 +1092,7 @@ export type PositionsControllerGetLiquidationsV1200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export type PositionsControllerGetLiquidationsV1401 = { readonly message?: string; @@ -1246,7 +1116,8 @@ export type ActionsControllerGetActionsV1Params = { | "repay" | "withdraw" | "enableCollateral" - | "disableCollateral"; + | "disableCollateral" + | "supplyAndBorrow"; readonly status?: | "CANCELED" | "CREATED" @@ -1269,7 +1140,7 @@ export type ActionsControllerGetActionsV1200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export type ActionsControllerGetActionsV1401 = { readonly message?: string; @@ -1416,6 +1287,51 @@ export const make = ( : (request) => Effect.flatMap(httpClient.execute(request), withOptionalResponse); }; + const __encodePathParam = encodeURIComponent; + const __makePathRequest = ( + method: (url: string) => HttpClientRequest.HttpClientRequest, + parameters: ReadonlyArray, + getPath: () => string + ) => + Effect.suspend(() => { + const fail = (description: string, cause?: unknown) => + Effect.fail( + new HttpClientError.HttpClientError({ + reason: new HttpClientError.InvalidUrlError({ + request: method(""), + cause, + description, + }), + }) + ); + if ( + parameters.some( + (value) => value === "" || /^(?:\.|%2e){1,2}$/i.test(value) + ) + ) { + return fail( + "Path parameters must be non-empty and cannot be dot segments" + ); + } + let path: string; + try { + path = getPath(); + } catch (cause) { + return fail("Failed to encode path parameter", cause); + } + if ( + path.split("/").some((segment) => /^(?:\.|%2e){1,2}$/i.test(segment)) + ) { + return fail("Request paths cannot contain dot segments"); + } + return Effect.succeed(method(path)); + }); + const decodeBinary = (response: HttpClientResponse.HttpClientResponse) => + Effect.map(response.arrayBuffer, (buffer) => new Uint8Array(buffer)); + const decodeVoidError = + (tag: Tag) => + (response: HttpClientResponse.HttpClientResponse) => + Effect.fail(BorrowApiError(tag, undefined, response)); const decodeSuccess = (response: HttpClientResponse.HttpClientResponse) => response.json as Effect.Effect; const decodeVoid = (_response: HttpClientResponse.HttpClientResponse) => @@ -1436,7 +1352,12 @@ export const make = ( (config: Config | undefined) => ( successCodes: ReadonlyArray, - errorCodes?: Record + errorCodes?: Record, + responseCodes: { + readonly binary: ReadonlyArray; + readonly voidSuccess: ReadonlyArray; + readonly voidError: ReadonlyArray; + } = { binary: [], voidSuccess: [], voidError: [] } ) => { const cases: any = { orElse: unexpectedStatus }; for (const code of successCodes) { @@ -1447,7 +1368,20 @@ export const make = ( cases[code] = decodeError(tag); } } - if (successCodes.length === 0) { + for (const code of responseCodes.binary) { + cases[code] = decodeBinary; + } + for (const code of responseCodes.voidSuccess) { + cases[code] = decodeVoid; + } + for (const code of responseCodes.voidError) { + cases[code] = decodeVoidError(code); + } + if ( + successCodes.length === 0 && + responseCodes.binary.length === 0 && + responseCodes.voidSuccess.length === 0 + ) { cases["2xx"] = decodeVoid; } return withResponse(config)(HttpClientResponse.matchStatus(cases) as any); @@ -1455,21 +1389,33 @@ export const make = ( return { httpClient, IntegrationsControllerGetIntegrationsV1: (options) => - HttpClientRequest.get(`/v1/integrations`).pipe( + HttpClientRequest.get("/v1/integrations").pipe( onRequest(options?.config)(["2xx"], { "401": "IntegrationsControllerGetIntegrationsV1401", "429": "IntegrationsControllerGetIntegrationsV1429", }) ), IntegrationsControllerGetIntegrationV1: (integrationId, options) => - HttpClientRequest.get(`/v1/integrations/${integrationId}`).pipe( - onRequest(options?.config)(["2xx"], { - "401": "IntegrationsControllerGetIntegrationV1401", - "429": "IntegrationsControllerGetIntegrationV1429", - }) + __makePathRequest( + HttpClientRequest.get, + [integrationId], + () => "/v1/integrations/" + __encodePathParam(integrationId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "401": "IntegrationsControllerGetIntegrationV1401", + "429": "IntegrationsControllerGetIntegrationV1429", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), MarketsControllerGetMarketsV1: (options) => - HttpClientRequest.get(`/v1/markets`).pipe( + HttpClientRequest.get("/v1/markets").pipe( HttpClientRequest.setUrlParams({ offset: options?.params?.["offset"] as any, limit: options?.params?.["limit"] as any, @@ -1483,14 +1429,26 @@ export const make = ( }) ), MarketsControllerGetMarketByIdV1: (marketId, options) => - HttpClientRequest.get(`/v1/markets/${marketId}`).pipe( - onRequest(options?.config)(["2xx"], { - "401": "MarketsControllerGetMarketByIdV1401", - "429": "MarketsControllerGetMarketByIdV1429", - }) + __makePathRequest( + HttpClientRequest.get, + [marketId], + () => "/v1/markets/" + __encodePathParam(marketId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "401": "MarketsControllerGetMarketByIdV1401", + "429": "MarketsControllerGetMarketByIdV1429", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), PositionsControllerGetPositionsV1: (options) => - HttpClientRequest.get(`/v1/positions`).pipe( + HttpClientRequest.get("/v1/positions").pipe( HttpClientRequest.setUrlParams({ integrationId: options.params["integrationId"] as any, network: options.params["network"] as any, @@ -1502,7 +1460,7 @@ export const make = ( }) ), PositionsControllerGetLiquidationsV1: (options) => - HttpClientRequest.get(`/v1/positions/liquidations`).pipe( + HttpClientRequest.get("/v1/positions/liquidations").pipe( HttpClientRequest.setUrlParams({ offset: options.params["offset"] as any, limit: options.params["limit"] as any, @@ -1517,7 +1475,7 @@ export const make = ( }) ), ActionsControllerGetActionsV1: (options) => - HttpClientRequest.get(`/v1/actions`).pipe( + HttpClientRequest.get("/v1/actions").pipe( HttpClientRequest.setUrlParams({ offset: options.params["offset"] as any, limit: options.params["limit"] as any, @@ -1533,7 +1491,7 @@ export const make = ( }) ), ActionsControllerExecuteActionV1: (options) => - HttpClientRequest.post(`/v1/actions`).pipe( + HttpClientRequest.post("/v1/actions").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"], { "401": "ActionsControllerExecuteActionV1401", @@ -1541,29 +1499,65 @@ export const make = ( }) ), ActionsControllerGetActionV1: (id, options) => - HttpClientRequest.get(`/v1/actions/${id}`).pipe( - onRequest(options?.config)(["2xx"], { - "401": "ActionsControllerGetActionV1401", - "429": "ActionsControllerGetActionV1429", - }) + __makePathRequest( + HttpClientRequest.get, + [id], + () => "/v1/actions/" + __encodePathParam(id) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "401": "ActionsControllerGetActionV1401", + "429": "ActionsControllerGetActionV1429", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), ActionsControllerStepV1: (id, options) => - HttpClientRequest.post(`/v1/actions/${id}/step`).pipe( - onRequest(options?.config)(["2xx"], { - "401": "ActionsControllerStepV1401", - "429": "ActionsControllerStepV1429", - }) + __makePathRequest( + HttpClientRequest.post, + [id], + () => "/v1/actions/" + __encodePathParam(id) + "/step" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "401": "ActionsControllerStepV1401", + "429": "ActionsControllerStepV1429", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), TransactionsControllerSubmitTransactionV1: (transactionId, options) => - HttpClientRequest.post(`/v1/transactions/${transactionId}/submit`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "401": "TransactionsControllerSubmitTransactionV1401", - "429": "TransactionsControllerSubmitTransactionV1429", - }) + __makePathRequest( + HttpClientRequest.post, + [transactionId], + () => "/v1/transactions/" + __encodePathParam(transactionId) + "/submit" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)( + ["2xx"], + { + "401": "TransactionsControllerSubmitTransactionV1401", + "429": "TransactionsControllerSubmitTransactionV1429", + }, + { binary: [], voidSuccess: [], voidError: ["403", "404"] } + ) + ) + ) ), HealthControllerHealth: (options) => - HttpClientRequest.get(`/health`).pipe( + HttpClientRequest.get("/health").pipe( onRequest(options?.config)(["2xx"]) ), }; @@ -1609,6 +1603,7 @@ export interface BorrowApi { "IntegrationsControllerGetIntegrationV1429", IntegrationsControllerGetIntegrationV1429 > + | BorrowApiError<"404", undefined> >; /** * Retrieve a paginated list of available lending markets across all supported integrations and networks. Each market represents a token that can be supplied or borrowed. @@ -1649,6 +1644,7 @@ export interface BorrowApi { "MarketsControllerGetMarketByIdV1429", MarketsControllerGetMarketByIdV1429 > + | BorrowApiError<"404", undefined> >; /** * Retrieve all supply and borrow positions for a user address across specified integration and network. @@ -1747,6 +1743,7 @@ export interface BorrowApi { "ActionsControllerGetActionV1429", ActionsControllerGetActionV1429 > + | BorrowApiError<"404", undefined> >; /** * For async multi-step actions (e.g., cross-chain bridges, delayed withdrawals), retrieve the next transaction(s) after the previous step has been confirmed on-chain. Call this when hasNextStep is true on the action response. @@ -1759,6 +1756,7 @@ export interface BorrowApi { | HttpClientError.HttpClientError | BorrowApiError<"ActionsControllerStepV1401", ActionsControllerStepV1401> | BorrowApiError<"ActionsControllerStepV1429", ActionsControllerStepV1429> + | BorrowApiError<"404", undefined> >; /** * Submit a signed transaction. Provide signedPayload to have us broadcast it to the blockchain, or transactionHash if already submitted by the client. @@ -1782,6 +1780,8 @@ export interface BorrowApi { "TransactionsControllerSubmitTransactionV1429", TransactionsControllerSubmitTransactionV1429 > + | BorrowApiError<"403", undefined> + | BorrowApiError<"404", undefined> >; /** * Get the health status of the borrow API with current timestamp diff --git a/packages/widget/src/generated/api/borrow.ts b/packages/widget/src/generated/api/borrow.ts index 04f2543a2..abd262ae2 100644 --- a/packages/widget/src/generated/api/borrow.ts +++ b/packages/widget/src/generated/api/borrow.ts @@ -24,24 +24,27 @@ export const IntegrationMetadataDto = Schema.Struct({ }), }).annotate({ identifier: "IntegrationMetadataDto" }); export type ArgumentSchemaDto = { - readonly type?: {}; - readonly properties?: {}; + readonly type?: { readonly [x: string]: Schema.Json }; + readonly properties?: { readonly [x: string]: Schema.Json }; readonly required?: ReadonlyArray; - readonly additionalProperties?: {}; - readonly items?: {}; + readonly additionalProperties?: { readonly [x: string]: Schema.Json }; + readonly items?: { readonly [x: string]: Schema.Json }; readonly enum?: ReadonlyArray; - readonly default?: {}; + readonly default?: { readonly [x: string]: Schema.Json }; readonly notes?: string; }; export const ArgumentSchemaDto = Schema.Struct({ type: Schema.optionalKey( - Schema.Struct({}).annotate({ - description: "Schema type", - examples: ["object"], - }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Schema type" }) ), properties: Schema.optionalKey( - Schema.Struct({}).annotate({ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Schema properties (fields)", examples: [ { @@ -62,19 +65,25 @@ export const ArgumentSchemaDto = Schema.Struct({ }) ), additionalProperties: Schema.optionalKey( - Schema.Struct({}).annotate({ - description: "Allow additional properties", - examples: [false], - }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Allow additional properties" }) ), items: Schema.optionalKey( - Schema.Struct({}).annotate({ description: "Array items schema" }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Array items schema" }) ), enum: Schema.optionalKey( Schema.Array(Schema.String).annotate({ description: "Enum values" }) ), default: Schema.optionalKey( - Schema.Struct({}).annotate({ description: "Default value" }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Default value" }) ), notes: Schema.optionalKey( Schema.String.annotate({ @@ -223,98 +232,6 @@ export const ArgumentsDto = Schema.Struct({ examples: ["morpho-blue-borrow-base-cbbtc-usdc-86"], }), }).annotate({ identifier: "ArgumentsDto" }); -export type RepaidDebtDto = { - readonly tokenAddress: string; - readonly tokenSymbol: string; - readonly amount: string; - readonly amountRaw: string; - readonly amountUsd: string | null; - readonly shares: string; -}; -export const RepaidDebtDto = Schema.Struct({ - tokenAddress: Schema.String.annotate({ - description: "Repaid debt token contract address (the market loan token)", - examples: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"], - }), - tokenSymbol: Schema.String.annotate({ - description: "Repaid debt token symbol", - examples: ["USDC"], - }), - amount: Schema.String.annotate({ - description: "Repaid debt in human-readable token units", - examples: ["1500.000000"], - }), - amountRaw: Schema.String.annotate({ - description: "Repaid debt in raw token units", - examples: ["1500000000"], - }), - amountUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Repaid debt value in USD, priced at the liquidation block. Null when no historical price is available.", - examples: ["1500.00"], - }), - shares: Schema.String.annotate({ - description: "Repaid debt in borrow shares", - examples: ["1487123456789012345678"], - }), -}).annotate({ identifier: "RepaidDebtDto" }); -export type SeizedCollateralDto = { - readonly tokenAddress: string; - readonly tokenSymbol: string; - readonly amount: string; - readonly amountRaw: string; - readonly amountUsd: string | null; -}; -export const SeizedCollateralDto = Schema.Struct({ - tokenAddress: Schema.String.annotate({ - description: - "Seized collateral token contract address (the market collateral token)", - examples: ["0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf"], - }), - tokenSymbol: Schema.String.annotate({ - description: "Seized collateral token symbol", - examples: ["cbBTC"], - }), - amount: Schema.String.annotate({ - description: "Seized collateral in human-readable token units", - examples: ["0.02356500"], - }), - amountRaw: Schema.String.annotate({ - description: "Seized collateral in raw token units", - examples: ["2356500"], - }), - amountUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Seized collateral value in USD, priced at the liquidation block. Null when no historical price is available.", - examples: ["1567.34"], - }), -}).annotate({ identifier: "SeizedCollateralDto" }); -export type BadDebtDto = { - readonly amountRaw: string; - readonly amount: string; - readonly amountUsd: string | null; - readonly shares: string; -}; -export const BadDebtDto = Schema.Struct({ - amountRaw: Schema.String.annotate({ - description: - "Bad debt in raw loan-token units. Non-zero only when the liquidation realized bad debt.", - examples: ["0"], - }), - amount: Schema.String.annotate({ - description: "Bad debt in human-readable loan-token units", - examples: ["0"], - }), - amountUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Bad debt value in USD, priced at the liquidation block. Null when no historical price is available.", - examples: ["0.00"], - }), - shares: Schema.String.annotate({ - description: "Bad debt in borrow shares", - examples: ["0"], - }), -}).annotate({ identifier: "BadDebtDto" }); export type TransactionDto = { readonly id: string; readonly network: @@ -339,6 +256,7 @@ export type TransactionDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -432,7 +350,8 @@ export type TransactionDto = { | "REPAY" | "WITHDRAW" | "ENABLE_COLLATERAL" - | "DISABLE_COLLATERAL"; + | "DISABLE_COLLATERAL" + | "BUNDLE"; readonly status: | "NOT_FOUND" | "CREATED" @@ -479,6 +398,7 @@ export const TransactionDto = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -574,6 +494,7 @@ export const TransactionDto = Schema.Struct({ "WITHDRAW", "ENABLE_COLLATERAL", "DISABLE_COLLATERAL", + "BUNDLE", ]).annotate({ description: "Transaction type", examples: ["SUPPLY"] }), status: Schema.Literals([ "NOT_FOUND", @@ -747,7 +668,7 @@ export type SubmitTransactionResponseDto = { | "FAILED" | "SKIPPED"; readonly error?: string; - readonly details?: {}; + readonly details?: { readonly [x: string]: Schema.Json }; }; export const SubmitTransactionResponseDto = Schema.Struct({ transactionHash: Schema.optionalKey( @@ -781,7 +702,10 @@ export const SubmitTransactionResponseDto = Schema.Struct({ }) ), details: Schema.optionalKey( - Schema.Struct({}).annotate({ description: "Additional details" }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Additional details" }) ), }).annotate({ identifier: "SubmitTransactionResponseDto" }); export type HealthStatus = "OK" | "FAIL"; @@ -796,7 +720,8 @@ export type ActionDefinitionDto = { | "repay" | "withdraw" | "enableCollateral" - | "disableCollateral"; + | "disableCollateral" + | "supplyAndBorrow"; readonly label: string; readonly schema: ArgumentSchemaDto; }; @@ -808,6 +733,7 @@ export const ActionDefinitionDto = Schema.Struct({ "withdraw", "enableCollateral", "disableCollateral", + "supplyAndBorrow", ]).annotate({ description: "Action identifier", examples: ["supply"] }), label: Schema.String.annotate({ description: "Human-readable action label", @@ -861,7 +787,8 @@ export type BorrowPendingActionDto = { | "repay" | "withdraw" | "enableCollateral" - | "disableCollateral"; + | "disableCollateral" + | "supplyAndBorrow"; readonly label: string; readonly args: ArgumentsDto; }; @@ -873,6 +800,7 @@ export const BorrowPendingActionDto = Schema.Struct({ "withdraw", "enableCollateral", "disableCollateral", + "supplyAndBorrow", ]).annotate({ description: "Action type — pass this value to POST /v1/actions as the action field", @@ -894,7 +822,8 @@ export type ActionRequestDto = { | "repay" | "withdraw" | "enableCollateral" - | "disableCollateral"; + | "disableCollateral" + | "supplyAndBorrow"; readonly address: string; readonly args: ArgumentsDto; }; @@ -910,6 +839,7 @@ export const ActionRequestDto = Schema.Struct({ "withdraw", "enableCollateral", "disableCollateral", + "supplyAndBorrow", ]).annotate({ description: "Action to execute", examples: ["supply"] }), address: Schema.String.annotate({ description: "User wallet address", @@ -919,300 +849,6 @@ export const ActionRequestDto = Schema.Struct({ { description: "Action arguments" } ), }).annotate({ identifier: "ActionRequestDto" }); -export type LiquidationDto = { - readonly id: string; - readonly integrationId: string; - readonly network: - | "ethereum" - | "ethereum-goerli" - | "ethereum-holesky" - | "ethereum-sepolia" - | "ethereum-hoodi" - | "arbitrum" - | "base" - | "base-sepolia" - | "gnosis" - | "optimism" - | "polygon" - | "polygon-amoy" - | "starknet" - | "zksync" - | "linea" - | "unichain" - | "plume" - | "monad-testnet" - | "monad" - | "robinhood" - | "robinhood-testnet" - | "avalanche-c" - | "avalanche-c-atomic" - | "avalanche-p" - | "binance" - | "celo" - | "fantom" - | "harmony" - | "moonriver" - | "okc" - | "viction" - | "core" - | "sonic" - | "plasma" - | "katana" - | "hyperevm" - | "tempo" - | "pharos" - | "agoric" - | "akash" - | "axelar" - | "band-protocol" - | "bitsong" - | "canto" - | "chihuahua" - | "comdex" - | "coreum" - | "cosmos" - | "crescent" - | "cronos" - | "cudos" - | "desmos" - | "dydx" - | "evmos" - | "fetch-ai" - | "gravity-bridge" - | "injective" - | "irisnet" - | "juno" - | "kava" - | "ki-network" - | "mars-protocol" - | "nym" - | "okex-chain" - | "onomy" - | "osmosis" - | "persistence" - | "quicksilver" - | "regen" - | "secret" - | "sentinel" - | "sommelier" - | "stafi" - | "stargaze" - | "stride" - | "teritori" - | "tgrade" - | "umee" - | "sei" - | "mantra" - | "celestia" - | "saga" - | "zetachain" - | "dymension" - | "humansai" - | "neutron" - | "polkadot" - | "kusama" - | "westend" - | "bittensor" - | "aptos" - | "binancebeacon" - | "cardano" - | "near" - | "solana" - | "solana-devnet" - | "stellar" - | "stellar-testnet" - | "sui" - | "tezos" - | "tron" - | "ton" - | "ton-testnet" - | "hyperliquid"; - readonly address: string; - readonly marketId: string; - readonly type: "partial" | "full" | null; - readonly realizedBadDebt: boolean; - readonly occurredAt: string; - readonly blockNumber: number; - readonly transactionHash: string; - readonly transactionLink: string; - readonly liquidator: string; - readonly repaidDebt: RepaidDebtDto; - readonly seizedCollateral: SeizedCollateralDto; - readonly badDebt: BadDebtDto; - readonly lif: string; -}; -export const LiquidationDto = Schema.Struct({ - id: Schema.String.annotate({ - description: "Stable liquidation event id", - examples: ["liq_0b3f..."], - }), - integrationId: Schema.String.annotate({ - description: "Integration ID", - examples: ["morpho-blue-borrow"], - }), - network: Schema.Literals([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "plume", - "monad-testnet", - "monad", - "robinhood", - "robinhood-testnet", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "tempo", - "pharos", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "aptos", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", - ]).annotate({ description: "Network", examples: ["ethereum"] }), - address: Schema.String.annotate({ - description: "The liquidated borrower address", - examples: ["0x742d35Cc6634C0532925a3b844Bc9e7595f8fB28"], - }), - marketId: Schema.String.annotate({ - description: "Market ID", - examples: ["morpho-blue-borrow-ethereum-cbbtc-usdc-0x0c6b..."], - }), - type: Schema.Union([ - Schema.Literal("partial"), - Schema.Literal("full"), - Schema.Null, - ]).annotate({ - description: - "Whether the borrower's entire debt in the market was cleared by this liquidation. `full` when no borrow shares remained afterwards (the debt was fully repaid or written off as bad debt); `partial` when debt remained. Null when closure could not be determined — e.g. a liquidation indexed before this was captured, or a failed position read.", - examples: ["partial"], - }), - realizedBadDebt: Schema.Boolean.annotate({ - description: - "Whether the liquidation realized bad debt: true when the seized collateral was exhausted while the position was still underwater, so the protocol socialized the residual loss to suppliers; false when the seized collateral covered the repaid debt. This is independent of `type` — a `full` liquidation can clear all debt with no bad debt.", - examples: [false], - }), - occurredAt: Schema.String.annotate({ - description: "Block timestamp of the liquidation (ISO 8601)", - examples: ["2026-05-21T14:08:12.000Z"], - }), - blockNumber: Schema.Number.annotate({ - description: "Block number of the liquidation", - examples: [22118447], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - transactionHash: Schema.String.annotate({ - description: "Transaction hash of the liquidation", - examples: ["0x8a3f..."], - }), - transactionLink: Schema.String.annotate({ - description: "Block explorer URL for the liquidation transaction", - examples: ["https://etherscan.io/tx/0x8a3f..."], - }), - liquidator: Schema.String.annotate({ - description: "Address that performed the liquidation", - examples: ["0x..."], - }), - repaidDebt: Schema.suspend( - (): Schema.Codec => RepaidDebtDto - ).annotate({ description: "Debt repaid by the liquidator" }), - seizedCollateral: Schema.suspend( - (): Schema.Codec => SeizedCollateralDto - ).annotate({ description: "Collateral seized from the borrower" }), - badDebt: Schema.suspend((): Schema.Codec => BadDebtDto).annotate({ - description: - "Bad debt socialized by the protocol. Non-zero only when the liquidation realized bad debt.", - }), - lif: Schema.String.annotate({ - description: "The market's liquidation incentive factor (LIF).", - examples: ["1.0449"], - }), -}).annotate({ identifier: "LiquidationDto" }); export type ActionDto = { readonly id: string; readonly integrationId: string; @@ -1222,7 +858,8 @@ export type ActionDto = { | "repay" | "withdraw" | "enableCollateral" - | "disableCollateral"; + | "disableCollateral" + | "supplyAndBorrow"; readonly address: string; readonly status: | "CANCELED" @@ -1256,6 +893,7 @@ export const ActionDto = Schema.Struct({ "withdraw", "enableCollateral", "disableCollateral", + "supplyAndBorrow", ]).annotate({ description: "Action type executed", examples: ["supply"] }), address: Schema.String.annotate({ description: "User wallet address", @@ -1348,6 +986,7 @@ export type IntegrationDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -1471,6 +1110,7 @@ export const IntegrationDto = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -1593,6 +1233,7 @@ export type MarketDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -1694,6 +1335,7 @@ export type MarketDto = { readonly feeWrapperAddress: string | null; readonly originationFeeBps: string; readonly originationFeeWrapperAddress: string | null; + readonly blueBundleOriginationFeeBps: string | null; readonly minLoan: string | null; }; export const MarketDto = Schema.Struct({ @@ -1727,6 +1369,7 @@ export const MarketDto = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -1879,7 +1522,7 @@ export const MarketDto = Schema.Struct({ }), originationFeeBps: Schema.String.annotate({ description: - 'Origination fee charged on borrow, in basis points (1 bp = 0.01%; 100 = 1%). This is the wrapper default; a per-market override, where one is set, is applied by the borrow action. "0" when no origination wrapper is configured for the (project, integration) pair.', + 'Origination fee for plain borrow (allocator wrapper default), in basis points (1 bp = 0.01%). When no wrapper is set, mirrors blueBundleOriginationFeeBps if BlueBundle is configured, else "0".', examples: ["100"], }), originationFeeWrapperAddress: Schema.Union([ @@ -1890,6 +1533,14 @@ export const MarketDto = Schema.Struct({ "Address of the wrapper contract charging the origination fee for the requesting project. null when no origination wrapper is configured.", examples: ["0x3C778911B9e36eA8CE53dBF211a203e3300939b6"], }), + blueBundleOriginationFeeBps: Schema.Union([ + Schema.String, + Schema.Null, + ]).annotate({ + description: + "BlueBundle origination fee for supplyAndBorrow, in basis points. null when not configured.", + examples: ["50"], + }), minLoan: Schema.Union([Schema.String, Schema.Null]).annotate({ description: "Minimum borrowable amount in human-readable loan-token units. Borrows that would leave debt below this floor, and partial repays that leave remaining debt below it, revert on-chain. null when the market enforces no minimum (e.g. non-Lista integrations).", @@ -2021,6 +1672,7 @@ export type PositionDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -2146,6 +1798,7 @@ export const PositionDto = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -2389,6 +2042,7 @@ export type MarketsControllerGetMarketsV1Params = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -2524,6 +2178,7 @@ export const MarketsControllerGetMarketsV1Params = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -2620,7 +2275,7 @@ export type MarketsControllerGetMarketsV1200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export const MarketsControllerGetMarketsV1200 = Schema.Struct({ total: Schema.Number.annotate({ @@ -2635,7 +2290,7 @@ export const MarketsControllerGetMarketsV1200 = Schema.Struct({ description: "Limit of the current page", examples: [100], }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - items: Schema.optionalKey(Schema.Array(MarketDto)), + items: Schema.optionalKey(Schema.Never), }); export type MarketsControllerGetMarketsV1401 = { readonly message?: string; @@ -2747,6 +2402,7 @@ export type PositionsControllerGetPositionsV1Params = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -2856,6 +2512,7 @@ export const PositionsControllerGetPositionsV1Params = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -3014,6 +2671,7 @@ export type PositionsControllerGetLiquidationsV1Params = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -3147,6 +2805,7 @@ export const PositionsControllerGetLiquidationsV1Params = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -3244,7 +2903,7 @@ export type PositionsControllerGetLiquidationsV1200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export const PositionsControllerGetLiquidationsV1200 = Schema.Struct({ total: Schema.Number.annotate({ @@ -3259,7 +2918,7 @@ export const PositionsControllerGetLiquidationsV1200 = Schema.Struct({ description: "Limit of the current page", examples: [100], }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - items: Schema.optionalKey(Schema.Array(LiquidationDto)), + items: Schema.optionalKey(Schema.Never), }); export type PositionsControllerGetLiquidationsV1401 = { readonly message?: string; @@ -3314,7 +2973,8 @@ export type ActionsControllerGetActionsV1Params = { | "repay" | "withdraw" | "enableCollateral" - | "disableCollateral"; + | "disableCollateral" + | "supplyAndBorrow"; readonly status?: | "CANCELED" | "CREATED" @@ -3371,6 +3031,7 @@ export const ActionsControllerGetActionsV1Params = Schema.Struct({ "withdraw", "enableCollateral", "disableCollateral", + "supplyAndBorrow", ]).annotate({ examples: ["supply"] }) ), status: Schema.optionalKey( @@ -3402,7 +3063,7 @@ export type ActionsControllerGetActionsV1200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export const ActionsControllerGetActionsV1200 = Schema.Struct({ total: Schema.Number.annotate({ @@ -3417,7 +3078,7 @@ export const ActionsControllerGetActionsV1200 = Schema.Struct({ description: "Limit of the current page", examples: [100], }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - items: Schema.optionalKey(Schema.Array(ActionDto)), + items: Schema.optionalKey(Schema.Never), }); export type ActionsControllerGetActionsV1401 = { readonly message?: string; diff --git a/packages/widget/src/generated/api/legacy-schema.ts b/packages/widget/src/generated/api/legacy-schema.ts index 63d9d2021..455b91c2a 100644 --- a/packages/widget/src/generated/api/legacy-schema.ts +++ b/packages/widget/src/generated/api/legacy-schema.ts @@ -1,6 +1,7 @@ // @ts-nocheck // biome-ignore-all lint: generated by Effect OpenAPI import * as Schema from "effect/Schema"; +import * as Stream from "effect/Stream"; // non-recursive definitions export type AuthRequestLoginCodeDto = { readonly email: string }; export const AuthRequestLoginCodeDto = Schema.Struct({ @@ -52,13 +53,10 @@ export const AuthUpdateDto = Schema.Struct({ name: Schema.String.annotate({ examples: ["John"] }), surname: Schema.String.annotate({ examples: ["Doe"] }), }).annotate({ identifier: "AuthUpdateDto" }); -export type CampaignStatus = "draft" | "active" | "paused" | "ended"; -export const CampaignStatus = Schema.Literals([ - "draft", - "active", - "paused", - "ended", -]).annotate({ identifier: "CampaignStatus" }); +export type CampaignStatus = "draft" | "active"; +export const CampaignStatus = Schema.Literals(["draft", "active"]).annotate({ + identifier: "CampaignStatus", +}); export type Networks = | "ethereum" | "ethereum-goerli" @@ -81,6 +79,7 @@ export type Networks = | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -186,6 +185,7 @@ export const Networks = Schema.Literals([ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -298,7 +298,7 @@ export const CampaignBudgetSpendStrategy = Schema.Literals([ "spend_full_budget", ]).annotate({ description: - "Controls how unspent budget is handled. spend_full_budget redistributes carry-forward across the remaining campaign duration; allow_underspend uses a fixed rate and may leave unspent budget at campaign end.", + "Controls how unspent hourly budget is handled. spend_full_budget redistributes carry-forward across remaining hours; allow_underspend uses a fixed rate and may leave unspent budget at campaign end.", identifier: "CampaignBudgetSpendStrategy", }); export type CampaignQualificationType = "min_token_amount"; @@ -309,7 +309,7 @@ export type StakeKitErrorDto = { readonly message: string; readonly code: number; readonly type?: string; - readonly details?: {}; + readonly details?: { readonly [x: string]: Schema.Json }; readonly path?: string; }; export const StakeKitErrorDto = Schema.Struct({ @@ -321,9 +321,10 @@ export const StakeKitErrorDto = Schema.Struct({ Schema.String.annotate({ examples: ["Bad Request"] }) ), details: Schema.optionalKey( - Schema.Struct({}).annotate({ - examples: [{ reason: 'Argument "amount" is required.' }], - }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ examples: [{ reason: 'Argument "amount" is required.' }] }) ), path: Schema.optionalKey( Schema.String.annotate({ examples: ["/v1/actions/enter"] }) @@ -863,7 +864,11 @@ export const CampaignConfigurationRequestType = Schema.Literals([ "create_campaign", "update_configuration", "end_campaign", -]).annotate({ identifier: "CampaignConfigurationRequestType" }); +]).annotate({ + description: + "create_campaign (no campaignId required), update_configuration (requires campaignId), or end_campaign (requires campaignId).", + identifier: "CampaignConfigurationRequestType", +}); export type AcceptCampaignConfigurationRequestDto = { readonly safeAddress?: string; }; @@ -977,6 +982,16 @@ export const CampaignV2MilestoneItemDto = Schema.Struct({ }) ), }).annotate({ identifier: "CampaignV2MilestoneItemDto" }); +export type ResumeCampaignV2Dto = { readonly backfillPausedWindows?: boolean }; +export const ResumeCampaignV2Dto = Schema.Struct({ + backfillPausedWindows: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "Re-emit points for the paused span: deletes the pause checkpoints and rewinds the accrual cursor so the cron re-processes those windows as Active. Until it catches up, TVL stats and unlock evaluation read as-of the rewound cursor, and end-of-campaign payouts wait for the replay to complete. Rejected (412) if campaign configuration changed during the pause.", + default: false, + }) + ), +}).annotate({ identifier: "ResumeCampaignV2Dto" }); export type CampaignV2AlertFlagsDto = { readonly lowBudget: boolean; readonly noQualifyingUsers: boolean; @@ -1308,6 +1323,144 @@ export const BlacklistedAddressV2Dto = Schema.Struct({ "Live token estimate of the unpaid claim. Re-priced at payout.", }), }).annotate({ identifier: "BlacklistedAddressV2Dto" }); +export type CampaignSimulationRunDto = { + readonly id: string; + readonly sourceCampaignId: string | null; + readonly simulationCampaignId: string | null; + readonly mode: "forecast" | "replay" | "synthetic"; + readonly days: number; + readonly scenario: string | null; + readonly params: { readonly [x: string]: Schema.Json } | null; + readonly status: "pending" | "running" | "completed" | "failed"; + readonly lastError: string | null; + readonly resultSummary: { readonly [x: string]: Schema.Json } | null; + readonly startedAt: string | null; + readonly completedAt: string | null; + readonly createdAt: string; +}; +export const CampaignSimulationRunDto = Schema.Struct({ + id: Schema.String.annotate({ format: "uuid" }), + sourceCampaignId: Schema.Union([Schema.String, Schema.Null]).annotate({ + format: "uuid", + }), + simulationCampaignId: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "The isSimulation=true campaign clone being driven; null for synthetic runs", + format: "uuid", + }), + mode: Schema.Literals(["forecast", "replay", "synthetic"]), + days: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + scenario: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Scenario name for synthetic runs", + }), + params: Schema.Union([ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), + Schema.Null, + ]).annotate({ description: "Synthetic run params (users/seed/trials)" }), + status: Schema.Literals(["pending", "running", "completed", "failed"]), + lastError: Schema.Union([Schema.String, Schema.Null]), + resultSummary: Schema.Union([ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), + Schema.Null, + ]).annotate({ + description: + "Compact result summary (campaign budgets, metrics, totals) once completed", + }), + startedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ + format: "date-time", + }), + completedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ + format: "date-time", + }), + createdAt: Schema.String.annotate({ format: "date-time" }), +}).annotate({ identifier: "CampaignSimulationRunDto" }); +export type CampaignSimulationRewardTokenDto = { + readonly network: string; + readonly address: string; + readonly decimals: number; + readonly symbol: string; + readonly name: string; +}; +export const CampaignSimulationRewardTokenDto = Schema.Struct({ + network: Schema.String.annotate({ + description: "EVM network of the reward token", + examples: ["ethereum"], + }), + address: Schema.String.annotate({ + description: "Reward token contract address", + }), + decimals: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + .check( + Schema.isLessThanOrEqualTo(18).annotate({ + expected: "a value less than or equal to 18", + }) + ), + symbol: Schema.String, + name: Schema.String, +}).annotate({ identifier: "CampaignSimulationRewardTokenDto" }); +export type CampaignSimulationBalanceEventDto = { + readonly atHour: number; + readonly userIndex: number; + readonly deltaTokens: string; +}; +export const CampaignSimulationBalanceEventDto = Schema.Struct({ + atHour: Schema.Number.annotate({ + description: "Simulated hour the event applies at", + }) + .check(Schema.isFinite().annotate({ expected: "a finite number" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ), + userIndex: Schema.Number.annotate({ + description: "0-based user index (< users)", + }) + .check(Schema.isFinite().annotate({ expected: "a finite number" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ), + deltaTokens: Schema.String.annotate({ + description: "Signed token amount; negative = withdrawal", + examples: ["250.5"], + }), +}).annotate({ identifier: "CampaignSimulationBalanceEventDto" }); +export type CampaignSimulationBudgetInjectionDto = { + readonly atHour: number; + readonly addBudget: string; +}; +export const CampaignSimulationBudgetInjectionDto = Schema.Struct({ + atHour: Schema.Number.annotate({ + description: "Simulated hour the injection lands at", + }) + .check(Schema.isFinite().annotate({ expected: "a finite number" })) + .check( + Schema.isGreaterThanOrEqualTo(1).annotate({ + expected: "a value greater than or equal to 1", + }) + ), + addBudget: Schema.String.annotate({ + description: "Reward tokens added to totalBudget", + examples: ["10000"], + }), +}).annotate({ identifier: "CampaignSimulationBudgetInjectionDto" }); export type CampaignV2PointsRunDto = { readonly runId: string; readonly status: string; @@ -1376,55 +1529,6 @@ export const UnlockCampaignV2MilestoneDto = Schema.Struct({ ], }), }).annotate({ identifier: "UnlockCampaignV2MilestoneDto" }); -export type WindowAccrualSummaryDto = { - readonly windowStart: string; - readonly windowEnd: string; - readonly qualifyingUserCount: number; - readonly totalQualifyingTvl: string; - readonly windowBudgetAllocated: string; - readonly windowBudgetDistributed: string; - readonly ceilingActive: boolean; - readonly calculatedApr: number | null; - readonly pricePerShare: string | null; -}; -export const WindowAccrualSummaryDto = Schema.Struct({ - windowStart: Schema.String.annotate({ - description: "Window start (inclusive).", - format: "date-time", - }), - windowEnd: Schema.String.annotate({ - description: "Window end (exclusive).", - format: "date-time", - }), - qualifyingUserCount: Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - totalQualifyingTvl: Schema.String.annotate({ - description: "Total qualifying balance in input token units.", - }), - windowBudgetAllocated: Schema.String.annotate({ - description: - "Effective emission baseline for the window before ceiling. For spend_full_budget campaigns this is the dynamic baseline reconstructed from prior distributed emissions and remaining duration; for other strategies this is the configured rate scaled to the window duration.", - }), - windowBudgetDistributed: Schema.String.annotate({ - description: "Actual emission after ceiling logic.", - }), - ceilingActive: Schema.Boolean.annotate({ - description: "True when the APY ceiling capped this window.", - }), - calculatedApr: Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - Schema.Null, - ]).annotate({ - description: - "Annualised rate: distributed / TVL scaled by the window duration. Null when TVL is zero.", - }), - pricePerShare: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Null for non-share-based campaigns.", - }), -}).annotate({ identifier: "WindowAccrualSummaryDto" }); export type AccrualWindowSortField = "allocatedReward"; export const AccrualWindowSortField = Schema.Literal( "allocatedReward" @@ -1660,11 +1764,12 @@ export type Team = { readonly updatedAt: string; readonly activated: boolean; readonly deletedAt: string | null; - readonly contactDetails: {}; + readonly contactDetails: { readonly [x: string]: Schema.Json }; readonly category: "pro" | "standard" | "trial"; readonly name: string; readonly serviceConditionsAcceptedAt: string | null; readonly type: "provider" | "integrator"; + readonly clientType: "channelPartner" | "directConsumer" | "endClient"; readonly providerId: string | null; readonly oavEnabled: boolean; readonly isMfaEnforced: boolean; @@ -1673,6 +1778,7 @@ export type Team = { readonly borrowRevokeAuthorizationEnabled: boolean; readonly referredBy: string | null; readonly referralCode: string | null; + readonly parentTeamId: string | null; }; export const Team = Schema.Struct({ id: Schema.String, @@ -1682,7 +1788,10 @@ export const Team = Schema.Struct({ deletedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ format: "date-time", }), - contactDetails: Schema.Struct({}), + contactDetails: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), category: Schema.Literals(["pro", "standard", "trial"]), name: Schema.String, serviceConditionsAcceptedAt: Schema.Union([ @@ -1690,6 +1799,15 @@ export const Team = Schema.Struct({ Schema.Null, ]).annotate({ format: "date-time" }), type: Schema.Literals(["provider", "integrator"]), + clientType: Schema.Literals([ + "channelPartner", + "directConsumer", + "endClient", + ]).annotate({ + description: + "Client classification: channel partner, direct consumer, or end client (a tenant owned by a partner).", + default: "directConsumer", + }), providerId: Schema.Union([Schema.String, Schema.Null]), oavEnabled: Schema.Boolean.annotate({ description: "Whether the team can access OAV functionality", @@ -1716,6 +1834,10 @@ export const Team = Schema.Struct({ }), referredBy: Schema.Union([Schema.String, Schema.Null]), referralCode: Schema.Union([Schema.String, Schema.Null]), + parentTeamId: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Parent partner team that owns this end-client team. Null for root teams.", + }), }).annotate({ identifier: "Team" }); export type AuditLogDto = { readonly id: string; @@ -1751,6 +1873,15 @@ export const KeyCategory = Schema.Literals([ "standard", "trial", ]).annotate({ identifier: "KeyCategory" }); +export type ClientType = "channelPartner" | "directConsumer" | "endClient"; +export const ClientType = Schema.Literals([ + "channelPartner", + "directConsumer", + "endClient", +]).annotate({ + description: "Client classification. Only super admins may change this.", + identifier: "ClientType", +}); export type Project = { readonly id: string; readonly createdAt: string; @@ -1932,7 +2063,7 @@ export const IndexingOwnerDto = Schema.Struct({ export type CreatePayoutAddressDto = { readonly address: string; readonly network: string; - readonly scope?: "yield" | "trade" | null; + readonly scope?: "yield" | "trade"; readonly providerId?: string | null; readonly note?: string | null; }; @@ -1942,11 +2073,7 @@ export const CreatePayoutAddressDto = Schema.Struct({ }), network: Schema.String.annotate({ examples: ["ethereum"] }), scope: Schema.optionalKey( - Schema.Union([ - Schema.Literal("yield"), - Schema.Literal("trade"), - Schema.Null, - ]).annotate({ + Schema.Literals(["yield", "trade"]).annotate({ description: "'yield' or 'trade' only. 'all' is no longer allowed.", }) ), @@ -2003,116 +2130,383 @@ export const PayoutAddressDto = Schema.Struct({ examples: [false], }), }).annotate({ identifier: "PayoutAddressDto" }); -export type ReferralDto = { readonly id: string; readonly code: string }; -export const ReferralDto = Schema.Struct({ - id: Schema.String, - code: Schema.String, -}).annotate({ identifier: "ReferralDto" }); -export type IntegrationFreshness = - | "real_time" - | "daily" - | "weekly" - | "monthly" - | "coming_soon"; -export const IntegrationFreshness = Schema.Literals([ - "real_time", - "daily", - "weekly", - "monthly", - "coming_soon", -]).annotate({ identifier: "IntegrationFreshness" }); -export type KpiMetricDto = { - readonly value: string | null; - readonly coverage: boolean; - readonly last_updated_at: string | null; - readonly delta_30d_usd?: string | null; - readonly delta_30d_pct?: string | null; - readonly delta_30d?: string | null; -}; -export const KpiMetricDto = Schema.Struct({ - value: Schema.Union([Schema.String, Schema.Null]), - coverage: Schema.Boolean.annotate({ - description: - "false when the metric is not yet supported for this period, or when data is missing for the requested scope/period", - }), - last_updated_at: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "When the metric data was last ingested", - format: "date-time", - }), - delta_30d_usd: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Absolute USD change vs. the same period shifted 30 days back. Populated for revenue.", - }) - ), - delta_30d_pct: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Percentage change vs. the same period shifted 30 days back. Populated for TVL.", - }) - ), - delta_30d: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Absolute count change vs. the same period shifted 30 days back. Populated for active users.", - }) - ), -}).annotate({ identifier: "KpiMetricDto" }); -export type TrendDataPointDto = { - readonly month: string; - readonly tvl_usd: string | null; - readonly revenue_usd: string | null; - readonly active_users: string | null; -}; -export const TrendDataPointDto = Schema.Struct({ - month: Schema.String.annotate({ - description: "Month in YYYY-MM format", - examples: ["2026-01"], - }), - tvl_usd: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "TVL in USD at end of month", - }), - revenue_usd: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Total earned revenue in USD for the month", - }), - active_users: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Unique active addresses at end of month", - }), -}).annotate({ identifier: "TrendDataPointDto" }); -export type CosmosAdditionalAddressesDto = { readonly cosmosPubKey: string }; -export const CosmosAdditionalAddressesDto = Schema.Struct({ - cosmosPubKey: Schema.String.annotate({ - description: "Cosmos SDK public key encoded in base64 for secp256k1", - examples: ["AsmXWSC1KITfWpuce/M22ThgL+xnM2asdz/gHUOCR41W"], - format: "byte", - }) - .check( - Schema.isMinLength(44).annotate({ - expected: "a value with a length of at least 44", - }) - ) - .check( - Schema.isMaxLength(44).annotate({ - expected: "a value with a length of at most 44", - }) - ), -}).annotate({ identifier: "CosmosAdditionalAddressesDto" }); -export type BinanceAdditionalAddressesDto = { - readonly binanceBeaconAddress: string; -}; -export const BinanceAdditionalAddressesDto = Schema.Struct({ - binanceBeaconAddress: Schema.String, -}).annotate({ identifier: "BinanceAdditionalAddressesDto" }); -export type SolanaAdditionalAddressesDto = { - readonly stakeAccounts: ReadonlyArray; - readonly lidoStakeAccounts: ReadonlyArray; -}; -export const SolanaAdditionalAddressesDto = Schema.Struct({ - stakeAccounts: Schema.Array(Schema.String), - lidoStakeAccounts: Schema.Array(Schema.String), -}).annotate({ identifier: "SolanaAdditionalAddressesDto" }); -export type TezosAdditionalAddressesDto = { readonly tezosPubKey: string }; -export const TezosAdditionalAddressesDto = Schema.Struct({ +export type UpdatePayoutAddressDto = { + readonly address: string; + readonly network: + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; + readonly scope?: "yield" | "trade"; + readonly providerId?: string | null; + readonly note?: string | null; +}; +export const UpdatePayoutAddressDto = Schema.Struct({ + address: Schema.String.annotate({ + examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d89"], + }), + network: Schema.Literals([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "plume", + "monad-testnet", + "monad", + "robinhood", + "robinhood-testnet", + "arc-testnet", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "tempo", + "pharos", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ]).annotate({ examples: ["ethereum"] }), + scope: Schema.optionalKey( + Schema.Literals(["yield", "trade"]).annotate({ + description: "'yield' or 'trade' only. 'all' is no longer allowed.", + }) + ), + providerId: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + examples: ["hyperliquid"], + }) + ), + note: Schema.optionalKey( + Schema.Union([ + Schema.String.check( + Schema.isMaxLength(50).annotate({ + expected: "a value with a length of at most 50", + }) + ), + Schema.Null, + ]) + ), +}).annotate({ identifier: "UpdatePayoutAddressDto" }); +export type PayoutRequestStatus = + | "pending" + | "processing" + | "paid" + | "rejected"; +export const PayoutRequestStatus = Schema.Literals([ + "pending", + "processing", + "paid", + "rejected", +]).annotate({ identifier: "PayoutRequestStatus" }); +export type ReferralDto = { readonly id: string; readonly code: string }; +export const ReferralDto = Schema.Struct({ + id: Schema.String, + code: Schema.String, +}).annotate({ identifier: "ReferralDto" }); +export type IntegrationFreshness = + | "real_time" + | "daily" + | "weekly" + | "monthly" + | "coming_soon"; +export const IntegrationFreshness = Schema.Literals([ + "real_time", + "daily", + "weekly", + "monthly", + "coming_soon", +]).annotate({ identifier: "IntegrationFreshness" }); +export type KpiMetricDto = { + readonly value: string | null; + readonly coverage: boolean; + readonly last_updated_at: string | null; + readonly delta_30d_usd?: string | null; + readonly delta_30d_pct?: string | null; + readonly delta_30d?: string | null; +}; +export const KpiMetricDto = Schema.Struct({ + value: Schema.Union([Schema.String, Schema.Null]), + coverage: Schema.Boolean.annotate({ + description: + "false when the metric is not yet supported for this period, or when data is missing for the requested scope/period", + }), + last_updated_at: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "When the metric data was last ingested", + format: "date-time", + }), + delta_30d_usd: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Absolute USD change vs. the same period shifted 30 days back. Populated for revenue.", + }) + ), + delta_30d_pct: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Percentage change vs. the same period shifted 30 days back. Populated for TVL.", + }) + ), + delta_30d: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Absolute count change vs. the same period shifted 30 days back. Populated for active users.", + }) + ), +}).annotate({ identifier: "KpiMetricDto" }); +export type TrendDataPointDto = { + readonly month: string; + readonly tvl_usd: string | null; + readonly revenue_usd: string | null; + readonly active_users: string | null; +}; +export const TrendDataPointDto = Schema.Struct({ + month: Schema.String.annotate({ + description: "Month in YYYY-MM format", + examples: ["2026-01"], + }), + tvl_usd: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "TVL in USD at end of month", + }), + revenue_usd: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Total earned revenue in USD for the month", + }), + active_users: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Unique active addresses at end of month", + }), +}).annotate({ identifier: "TrendDataPointDto" }); +export type MonthlyReportStatus = "draft" | "published"; +export const MonthlyReportStatus = Schema.Literals([ + "draft", + "published", +]).annotate({ identifier: "MonthlyReportStatus" }); +export type CreateMonthlyReportDraftDto = { readonly month: string }; +export const CreateMonthlyReportDraftDto = Schema.Struct({ + month: Schema.String.annotate({ + description: "Month to draft in YYYY-MM format", + examples: ["2026-05"], + }), +}).annotate({ identifier: "CreateMonthlyReportDraftDto" }); +export type CosmosAdditionalAddressesDto = { readonly cosmosPubKey: string }; +export const CosmosAdditionalAddressesDto = Schema.Struct({ + cosmosPubKey: Schema.String.annotate({ + description: "Cosmos SDK public key encoded in base64 for secp256k1", + examples: ["AsmXWSC1KITfWpuce/M22ThgL+xnM2asdz/gHUOCR41W"], + format: "byte", + }) + .check( + Schema.isMinLength(44).annotate({ + expected: "a value with a length of at least 44", + }) + ) + .check( + Schema.isMaxLength(44).annotate({ + expected: "a value with a length of at most 44", + }) + ), +}).annotate({ identifier: "CosmosAdditionalAddressesDto" }); +export type BinanceAdditionalAddressesDto = { + readonly binanceBeaconAddress: string; +}; +export const BinanceAdditionalAddressesDto = Schema.Struct({ + binanceBeaconAddress: Schema.String, +}).annotate({ identifier: "BinanceAdditionalAddressesDto" }); +export type SolanaAdditionalAddressesDto = { + readonly stakeAccounts: ReadonlyArray; + readonly lidoStakeAccounts: ReadonlyArray; +}; +export const SolanaAdditionalAddressesDto = Schema.Struct({ + stakeAccounts: Schema.Array(Schema.String), + lidoStakeAccounts: Schema.Array(Schema.String), +}).annotate({ identifier: "SolanaAdditionalAddressesDto" }); +export type TezosAdditionalAddressesDto = { readonly tezosPubKey: string }; +export const TezosAdditionalAddressesDto = Schema.Struct({ tezosPubKey: Schema.String, }).annotate({ identifier: "TezosAdditionalAddressesDto" }); export type AvalancheCAdditionalAddressesDto = { @@ -2461,6 +2855,7 @@ export type YieldProviders = | "yield-xyz" | "kamino" | "veda" + | "kinetiq" | "lista" | "dolomite" | "midas" @@ -2540,6 +2935,7 @@ export const YieldProviders = Schema.Literals([ "yield-xyz", "kamino", "veda", + "kinetiq", "lista", "dolomite", "midas", @@ -2600,484 +2996,805 @@ export type TimePeriodDto = { readonly days: number; readonly seconds?: number; }; -export const TimePeriodDto = Schema.Struct({ - days: Schema.Number.annotate({ - description: - "Total duration in days. If seconds is also provided, it must represent the same duration, not an additional amount.", - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - seconds: Schema.optionalKey( - Schema.Number.annotate({ +export const TimePeriodDto = Schema.Struct({ + days: Schema.Number.annotate({ + description: + "Total duration in days. If seconds is also provided, it must represent the same duration, not an additional amount.", + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + seconds: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Optional total duration in seconds. If provided with days, it must match the same duration.", + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), +}).annotate({ identifier: "TimePeriodDto" }); +export type RewardClaiming = "auto" | "manual"; +export const RewardClaiming = Schema.Literals(["auto", "manual"]).annotate({ + identifier: "RewardClaiming", +}); +export type YieldRevshareDto = { readonly enabled: boolean }; +export const YieldRevshareDto = Schema.Struct({ + enabled: Schema.Boolean, +}).annotate({ identifier: "YieldRevshareDto" }); +export type YieldFeeDto = { + readonly enabled: boolean; + readonly depositFee: boolean; + readonly managementFee: boolean; + readonly performanceFee: boolean; +}; +export const YieldFeeDto = Schema.Struct({ + enabled: Schema.Boolean, + depositFee: Schema.Boolean, + managementFee: Schema.Boolean, + performanceFee: Schema.Boolean, +}).annotate({ identifier: "YieldFeeDto" }); +export type TransactionFormat = "raw" | "default"; +export const TransactionFormat = Schema.Literals(["raw", "default"]).annotate({ + identifier: "TransactionFormat", +}); +export type ERCStandards = "ERC20" | "ERC4626" | "ERC721" | "ERC1155"; +export const ERCStandards = Schema.Literals([ + "ERC20", + "ERC4626", + "ERC721", + "ERC1155", +]).annotate({ identifier: "ERCStandards" }); +export type CommissionAppliesTo = + | "all_yield" + | "execution_layer_rewards" + | "consensus_layer_rewards" + | "performance" + | "management"; +export const CommissionAppliesTo = Schema.Literals([ + "all_yield", + "execution_layer_rewards", + "consensus_layer_rewards", + "performance", + "management", +]).annotate({ identifier: "CommissionAppliesTo" }); +export type TvlLevel = "network" | "protocol"; +export const TvlLevel = Schema.Literals(["network", "protocol"]).annotate({ + identifier: "TvlLevel", +}); +export type ReportingRevenueDailyAggregateDto = { + readonly date: string; + readonly totalRevenueAmountWei: string; + readonly totalRevenueAmountUsd: string; +}; +export const ReportingRevenueDailyAggregateDto = Schema.Struct({ + date: Schema.String.annotate({ examples: ["2025-06-12"], format: "date" }), + totalRevenueAmountWei: Schema.String, + totalRevenueAmountUsd: Schema.String, +}).annotate({ identifier: "ReportingRevenueDailyAggregateDto" }); +export type ReportingPerformanceDailyAggregateDto = { + readonly date: string; + readonly totalEnteredAmountWei: string; + readonly totalExitedAmountWei: string; + readonly totalTvlAmountWei: string; +}; +export const ReportingPerformanceDailyAggregateDto = Schema.Struct({ + date: Schema.String.annotate({ examples: ["2025-06-12"], format: "date" }), + totalEnteredAmountWei: Schema.String, + totalExitedAmountWei: Schema.String, + totalTvlAmountWei: Schema.String, +}).annotate({ identifier: "ReportingPerformanceDailyAggregateDto" }); +export type PerpActionTypes = + | "open" + | "close" + | "updateLeverage" + | "stopLoss" + | "takeProfit" + | "cancelOrder" + | "editOrder" + | "fund" + | "withdraw" + | "approveAgent" + | "approveBuilderFee" + | "updateMargin" + | "setTpAndSl" + | "setUnifiedAccount"; +export const PerpActionTypes = Schema.Literals([ + "open", + "close", + "updateLeverage", + "stopLoss", + "takeProfit", + "cancelOrder", + "editOrder", + "fund", + "withdraw", + "approveAgent", + "approveBuilderFee", + "updateMargin", + "setTpAndSl", + "setUnifiedAccount", +]).annotate({ + description: "Action type executed", + identifier: "PerpActionTypes", +}); +export type PerpTransactionType = + | "APPROVAL" + | "OPEN_POSITION" + | "CLOSE_POSITION" + | "UPDATE_LEVERAGE" + | "STOP_LOSS" + | "TAKE_PROFIT" + | "CANCEL_ORDER" + | "EDIT_ORDER" + | "FUND" + | "WITHDRAW" + | "APPROVE_BUILDER_FEE" + | "ENABLE_DEX_ABSTRACTION" + | "APPROVE_AGENT" + | "UPDATE_MARGIN" + | "SET_TP_AND_SL" + | "SET_USER_ABSTRACTION"; +export const PerpTransactionType = Schema.Literals([ + "APPROVAL", + "OPEN_POSITION", + "CLOSE_POSITION", + "UPDATE_LEVERAGE", + "STOP_LOSS", + "TAKE_PROFIT", + "CANCEL_ORDER", + "EDIT_ORDER", + "FUND", + "WITHDRAW", + "APPROVE_BUILDER_FEE", + "ENABLE_DEX_ABSTRACTION", + "APPROVE_AGENT", + "UPDATE_MARGIN", + "SET_TP_AND_SL", + "SET_USER_ABSTRACTION", +]).annotate({ + description: "Transaction type", + identifier: "PerpTransactionType", +}); +export type PerpTransactionStatus = + | "CREATED" + | "QUEUED" + | "BROADCASTED" + | "CONFIRMED" + | "FAILED" + | "NOT_FOUND"; +export const PerpTransactionStatus = Schema.Literals([ + "CREATED", + "QUEUED", + "BROADCASTED", + "CONFIRMED", + "FAILED", + "NOT_FOUND", +]).annotate({ + description: "Current transaction status", + identifier: "PerpTransactionStatus", +}); +export type ProgrammaticPerpActivityItemType = "event" | "action"; +export const ProgrammaticPerpActivityItemType = Schema.Literals([ + "event", + "action", +]).annotate({ identifier: "ProgrammaticPerpActivityItemType" }); +export type PerpEventType = + | "order_filled" + | "liquidation" + | "stop_loss_triggered" + | "take_profit_triggered"; +export const PerpEventType = Schema.Literals([ + "order_filled", + "liquidation", + "stop_loss_triggered", + "take_profit_triggered", +]).annotate({ + description: "Timeline event type", + identifier: "PerpEventType", +}); +export type OrderSide = "buy" | "sell"; +export const OrderSide = Schema.Literals(["buy", "sell"]).annotate({ + description: "Order side", + identifier: "OrderSide", +}); +export type OrderType = "market" | "limit" | "stop_loss" | "take_profit"; +export const OrderType = Schema.Literals([ + "market", + "limit", + "stop_loss", + "take_profit", +]).annotate({ description: "Normalized order type", identifier: "OrderType" }); +export type ProgrammaticPerpEventOrderTimeInForce = "ioc" | "gtc" | "alo"; +export const ProgrammaticPerpEventOrderTimeInForce = Schema.Literals([ + "ioc", + "gtc", + "alo", +]).annotate({ + description: "Normalized time in force", + identifier: "ProgrammaticPerpEventOrderTimeInForce", +}); +export type UpdateUserMeDto = { + readonly serviceConditionsAccepted?: boolean; + readonly active?: boolean; + readonly name?: string; + readonly surname?: string; + readonly department?: string | null; +}; +export const UpdateUserMeDto = Schema.Struct({ + serviceConditionsAccepted: Schema.optionalKey( + Schema.Boolean.annotate({ examples: [true] }) + ), + active: Schema.optionalKey(Schema.Boolean.annotate({ examples: [true] })), + name: Schema.optionalKey(Schema.String.annotate({ examples: ["John"] })), + surname: Schema.optionalKey(Schema.String.annotate({ examples: ["Doe"] })), + department: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}).annotate({ identifier: "UpdateUserMeDto" }); +export type CreateUserDto = { + readonly accessLevel: "admin" | "operator" | "member" | "owner"; + readonly email: string; + readonly name: string; + readonly surname: string; + readonly department?: string | null; +}; +export const CreateUserDto = Schema.Struct({ + accessLevel: Schema.Literals([ + "admin", + "operator", + "member", + "owner", + ]).annotate({ examples: ["member"] }), + email: Schema.String.annotate({ examples: ["test1@example.com"] }), + name: Schema.String.annotate({ examples: ["John"] }), + surname: Schema.String.annotate({ examples: ["Doe"] }), + department: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}).annotate({ identifier: "CreateUserDto" }); +export type UpdateUserDto = { + readonly active?: boolean; + readonly role?: "owner" | "admin" | "operator" | "member"; + readonly isSsoExempt?: boolean; +}; +export const UpdateUserDto = Schema.Struct({ + active: Schema.optionalKey(Schema.Boolean.annotate({ examples: [true] })), + role: Schema.optionalKey( + Schema.Literals(["owner", "admin", "operator", "member"]).annotate({ description: - "Optional total duration in seconds. If provided with days, it must match the same duration.", - }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + "Role to assign. owner is valid here (role change) but cannot be set at invite time via CreateUserDto.", + }) ), -}).annotate({ identifier: "TimePeriodDto" }); -export type RewardClaiming = "auto" | "manual"; -export const RewardClaiming = Schema.Literals(["auto", "manual"]).annotate({ - identifier: "RewardClaiming", -}); -export type YieldRevshareDto = { readonly enabled: boolean }; -export const YieldRevshareDto = Schema.Struct({ - enabled: Schema.Boolean, -}).annotate({ identifier: "YieldRevshareDto" }); -export type YieldFeeDto = { - readonly enabled: boolean; - readonly depositFee: boolean; - readonly managementFee: boolean; - readonly performanceFee: boolean; + isSsoExempt: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "When true, exempts this user from team-level SSO enforcement, allowing them to use the auth code flow.", + examples: [false], + }) + ), +}).annotate({ identifier: "UpdateUserDto" }); +export type ApeNativeArgumentsDto = { + readonly baycId?: string; + readonly maycId?: string; + readonly bakcId?: string; }; -export const YieldFeeDto = Schema.Struct({ - enabled: Schema.Boolean, - depositFee: Schema.Boolean, - managementFee: Schema.Boolean, - performanceFee: Schema.Boolean, -}).annotate({ identifier: "YieldFeeDto" }); -export type TransactionFormat = "raw" | "default"; -export const TransactionFormat = Schema.Literals(["raw", "default"]).annotate({ - identifier: "TransactionFormat", -}); -export type ERCStandards = "ERC20" | "ERC4626" | "ERC721" | "ERC1155"; -export const ERCStandards = Schema.Literals([ - "ERC20", - "ERC4626", - "ERC721", - "ERC1155", -]).annotate({ identifier: "ERCStandards" }); -export type CommissionAppliesTo = - | "all_yield" - | "execution_layer_rewards" - | "consensus_layer_rewards" - | "performance" - | "management"; -export const CommissionAppliesTo = Schema.Literals([ - "all_yield", - "execution_layer_rewards", - "consensus_layer_rewards", - "performance", - "management", -]).annotate({ identifier: "CommissionAppliesTo" }); -export type TvlLevel = "network" | "protocol"; -export const TvlLevel = Schema.Literals(["network", "protocol"]).annotate({ - identifier: "TvlLevel", -}); -export type ReportingRevenueDailyAggregateDto = { - readonly date: string; - readonly totalRevenueAmountWei: string; - readonly totalRevenueAmountUsd: string; +export const ApeNativeArgumentsDto = Schema.Struct({ + baycId: Schema.optionalKey(Schema.String), + maycId: Schema.optionalKey(Schema.String), + bakcId: Schema.optionalKey(Schema.String), +}).annotate({ identifier: "ApeNativeArgumentsDto" }); +export type TronResourceType = "BANDWIDTH" | "ENERGY"; +export const TronResourceType = Schema.Literals([ + "BANDWIDTH", + "ENERGY", +]).annotate({ identifier: "TronResourceType" }); +export type SignatureVerificationArgumentsDto = { + readonly message: string; + readonly signed: string; +}; +export const SignatureVerificationArgumentsDto = Schema.Struct({ + message: Schema.String, + signed: Schema.String, +}).annotate({ identifier: "SignatureVerificationArgumentsDto" }); +export type GeolocationError = { + readonly countryCode: string; + readonly regionCode?: string; + readonly tags?: ReadonlyArray< + "Crypto Ban" | "OFAC" | "OFSI" | "Pending Litigation" | "Staking Ban" + >; + readonly details?: { readonly [x: string]: Schema.Json }; + readonly code: number; + readonly message: string; + readonly type: "GEO_LOCATION"; +}; +export const GeolocationError = Schema.Struct({ + countryCode: Schema.String, + regionCode: Schema.optionalKey(Schema.String), + tags: Schema.optionalKey( + Schema.Array( + Schema.Literals([ + "Crypto Ban", + "OFAC", + "OFSI", + "Pending Litigation", + "Staking Ban", + ]) + ) + ), + details: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ examples: [{ reason: 'Argument "amount" is required.' }] }) + ), + code: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + message: Schema.String, + type: Schema.Literal("GEO_LOCATION"), +}).annotate({ identifier: "GeolocationError" }); +export type CosmosGasArgsDto = { readonly gasPrice: string }; +export const CosmosGasArgsDto = Schema.Struct({ + gasPrice: Schema.String, +}).annotate({ identifier: "CosmosGasArgsDto" }); +export type EvmEIP1559GasArgsDto = { + readonly type: 2; + readonly maxFeePerGas: string; + readonly maxPriorityFeePerGas: string; +}; +export const EvmEIP1559GasArgsDto = Schema.Struct({ + type: Schema.Literal(2), + maxFeePerGas: Schema.String, + maxPriorityFeePerGas: Schema.String, +}).annotate({ identifier: "EvmEIP1559GasArgsDto" }); +export type EvmLegacyGasArgsDto = { + readonly type: 0; + readonly gasPrice: string; +}; +export const EvmLegacyGasArgsDto = Schema.Struct({ + type: Schema.Literal(0), + gasPrice: Schema.String, +}).annotate({ identifier: "EvmLegacyGasArgsDto" }); +export type GasMode = "slow" | "average" | "fast" | "custom"; +export const GasMode = Schema.Literals([ + "slow", + "average", + "fast", + "custom", +]).annotate({ identifier: "GasMode" }); +export type SubmitRequestDto = { readonly signedTransaction: string }; +export const SubmitRequestDto = Schema.Struct({ + signedTransaction: Schema.String.annotate({ + description: "Signed transaction to be broadcast to the network", + }), +}).annotate({ identifier: "SubmitRequestDto" }); +export type SubmitResponseDto = { + readonly transactionHash: string; + readonly link: string; +}; +export const SubmitResponseDto = Schema.Struct({ + transactionHash: Schema.String, + link: Schema.String.annotate({ + description: "Link to the blockchain explorer", + }), +}).annotate({ identifier: "SubmitResponseDto" }); +export type SubmitHashRequestDto = { readonly hash: string }; +export const SubmitHashRequestDto = Schema.Struct({ + hash: Schema.String.annotate({ + description: "Hash of submitted transaction", + }), +}).annotate({ identifier: "SubmitHashRequestDto" }); +export type TransactionVerificationMessageDto = { readonly message: string }; +export const TransactionVerificationMessageDto = Schema.Struct({ + message: Schema.String, +}).annotate({ identifier: "TransactionVerificationMessageDto" }); +export type PriceResponseDto = { readonly [x: string]: never }; +export const PriceResponseDto = Schema.Record( + Schema.String, + Schema.Never +).annotate({ identifier: "PriceResponseDto" }); +export type CreateEnabledYieldDto = { readonly integrationId: string }; +export const CreateEnabledYieldDto = Schema.Struct({ + integrationId: Schema.String.annotate({ + examples: ["optimism-usdt-aave-v3-lending"], + }), +}).annotate({ identifier: "CreateEnabledYieldDto" }); +export type EnabledYieldDto = { readonly integrationId: string }; +export const EnabledYieldDto = Schema.Struct({ + integrationId: Schema.String.annotate({ + examples: ["optimism-usdt-aave-v3-lending"], + }), +}).annotate({ identifier: "EnabledYieldDto" }); +export type DeleteEnabledYieldsDto = { + readonly integrationIds: ReadonlyArray; }; -export const ReportingRevenueDailyAggregateDto = Schema.Struct({ - date: Schema.String.annotate({ examples: ["2025-06-12"], format: "date" }), - totalRevenueAmountWei: Schema.String, - totalRevenueAmountUsd: Schema.String, -}).annotate({ identifier: "ReportingRevenueDailyAggregateDto" }); -export type ReportingPerformanceDailyAggregateDto = { - readonly date: string; - readonly totalEnteredAmountWei: string; - readonly totalExitedAmountWei: string; - readonly totalTvlAmountWei: string; +export const DeleteEnabledYieldsDto = Schema.Struct({ + integrationIds: Schema.Array(Schema.String).annotate({ + examples: [["optimism-usdt-aave-v3-lending"]], + }), +}).annotate({ identifier: "DeleteEnabledYieldsDto" }); +export type RequiredArgumentDto = { readonly required: boolean }; +export const RequiredArgumentDto = Schema.Struct({ + required: Schema.Boolean, +}).annotate({ identifier: "RequiredArgumentDto" }); +export type AmountArgumentOptionsDto = { + readonly required: boolean; + readonly minimum?: number; + readonly maximum?: number; }; -export const ReportingPerformanceDailyAggregateDto = Schema.Struct({ - date: Schema.String.annotate({ examples: ["2025-06-12"], format: "date" }), - totalEnteredAmountWei: Schema.String, - totalExitedAmountWei: Schema.String, - totalTvlAmountWei: Schema.String, -}).annotate({ identifier: "ReportingPerformanceDailyAggregateDto" }); -export type PerpActionTypes = - | "open" - | "close" - | "updateLeverage" - | "stopLoss" - | "takeProfit" - | "cancelOrder" - | "editOrder" - | "fund" - | "withdraw" - | "approveAgent" - | "approveBuilderFee" - | "updateMargin" - | "setTpAndSl" - | "setUnifiedAccount"; -export const PerpActionTypes = Schema.Literals([ - "open", - "close", - "updateLeverage", - "stopLoss", - "takeProfit", - "cancelOrder", - "editOrder", - "fund", - "withdraw", - "approveAgent", - "approveBuilderFee", - "updateMargin", - "setTpAndSl", - "setUnifiedAccount", -]).annotate({ - description: "Action type executed", - identifier: "PerpActionTypes", -}); -export type PerpTransactionType = - | "APPROVAL" - | "OPEN_POSITION" - | "CLOSE_POSITION" - | "UPDATE_LEVERAGE" - | "STOP_LOSS" - | "TAKE_PROFIT" - | "CANCEL_ORDER" - | "EDIT_ORDER" - | "FUND" - | "WITHDRAW" - | "APPROVE_BUILDER_FEE" - | "ENABLE_DEX_ABSTRACTION" - | "APPROVE_AGENT" - | "UPDATE_MARGIN" - | "SET_TP_AND_SL" - | "SET_USER_ABSTRACTION"; -export const PerpTransactionType = Schema.Literals([ - "APPROVAL", - "OPEN_POSITION", - "CLOSE_POSITION", - "UPDATE_LEVERAGE", - "STOP_LOSS", - "TAKE_PROFIT", - "CANCEL_ORDER", - "EDIT_ORDER", - "FUND", - "WITHDRAW", - "APPROVE_BUILDER_FEE", - "ENABLE_DEX_ABSTRACTION", - "APPROVE_AGENT", - "UPDATE_MARGIN", - "SET_TP_AND_SL", - "SET_USER_ABSTRACTION", -]).annotate({ - description: "Transaction type", - identifier: "PerpTransactionType", -}); -export type PerpTransactionStatus = - | "CREATED" - | "QUEUED" - | "BROADCASTED" - | "CONFIRMED" - | "FAILED" - | "NOT_FOUND"; -export const PerpTransactionStatus = Schema.Literals([ - "CREATED", - "QUEUED", - "BROADCASTED", - "CONFIRMED", - "FAILED", - "NOT_FOUND", -]).annotate({ - description: "Current transaction status", - identifier: "PerpTransactionStatus", -}); -export type UpdateUserMeDto = { - readonly serviceConditionsAccepted?: boolean; - readonly active?: boolean; - readonly name?: string; - readonly surname?: string; - readonly department?: string | null; +export const AmountArgumentOptionsDto = Schema.Struct({ + required: Schema.Boolean, + minimum: Schema.optionalKey( + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + ), + maximum: Schema.optionalKey( + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + ), +}).annotate({ identifier: "AmountArgumentOptionsDto" }); +export type DurationArgumentOptionsDto = { + readonly required: boolean; + readonly minimum?: number; + readonly maximum?: number; }; -export const UpdateUserMeDto = Schema.Struct({ - serviceConditionsAccepted: Schema.optionalKey( - Schema.Boolean.annotate({ examples: [true] }) +export const DurationArgumentOptionsDto = Schema.Struct({ + required: Schema.Boolean, + minimum: Schema.optionalKey( + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) ), - active: Schema.optionalKey(Schema.Boolean.annotate({ examples: [true] })), - name: Schema.optionalKey(Schema.String.annotate({ examples: ["John"] })), - surname: Schema.optionalKey(Schema.String.annotate({ examples: ["Doe"] })), - department: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}).annotate({ identifier: "UpdateUserMeDto" }); -export type CreateUserDto = { - readonly accessLevel: "admin" | "operator" | "member" | "owner"; - readonly email: string; + maximum: Schema.optionalKey( + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + ), +}).annotate({ identifier: "DurationArgumentOptionsDto" }); +export type TronResourceArgumentOptionsDto = { + readonly required: boolean; + readonly options: ReadonlyArray; +}; +export const TronResourceArgumentOptionsDto = Schema.Struct({ + required: Schema.Boolean, + options: Schema.Array(Schema.String), +}).annotate({ identifier: "TronResourceArgumentOptionsDto" }); +export type RequiredArgumentWithOptionsDto = { + readonly required: boolean; + readonly options: ReadonlyArray; +}; +export const RequiredArgumentWithOptionsDto = Schema.Struct({ + required: Schema.Boolean, + options: Schema.Array(Schema.String), +}).annotate({ identifier: "RequiredArgumentWithOptionsDto" }); +export type YieldStatusResponseDto = { + readonly enter: boolean; + readonly exit: boolean; +}; +export const YieldStatusResponseDto = Schema.Struct({ + enter: Schema.Boolean, + exit: Schema.Boolean, +}).annotate({ identifier: "YieldStatusResponseDto" }); +export type RewardTypes = "apr" | "apy" | "variable"; +export const RewardTypes = Schema.Literals(["apr", "apy", "variable"]).annotate( + { identifier: "RewardTypes" } +); +export type ValidatorStatusTypes = + | "active" + | "jailed" + | "deactivating" + | "inactive" + | "full" + | "not_found"; +export const ValidatorStatusTypes = Schema.Literals([ + "active", + "jailed", + "deactivating", + "inactive", + "full", + "not_found", +]).annotate({ identifier: "ValidatorStatusTypes" }); +export type FeeConfigurationStatus = + | "REQUESTED" + | "PROCESSING" + | "LIVE" + | "CHANGES_REQUESTED"; +export const FeeConfigurationStatus = Schema.Literals([ + "REQUESTED", + "PROCESSING", + "LIVE", + "CHANGES_REQUESTED", +]).annotate({ identifier: "FeeConfigurationStatus" }); +export type AllocationDto = { + readonly address: string; + readonly network: + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; readonly name: string; - readonly surname: string; - readonly department?: string | null; -}; -export const CreateUserDto = Schema.Struct({ - accessLevel: Schema.Literals([ - "admin", - "operator", - "member", - "owner", - ]).annotate({ examples: ["member"] }), - email: Schema.String.annotate({ examples: ["test1@example.com"] }), - name: Schema.String.annotate({ examples: ["John"] }), - surname: Schema.String.annotate({ examples: ["Doe"] }), - department: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}).annotate({ identifier: "CreateUserDto" }); -export type UpdateUserDto = { - readonly active?: boolean; - readonly role?: "owner" | "admin" | "operator" | "member"; - readonly isSsoExempt?: boolean; -}; -export const UpdateUserDto = Schema.Struct({ - active: Schema.optionalKey(Schema.Boolean.annotate({ examples: [true] })), - role: Schema.optionalKey( - Schema.Literals(["owner", "admin", "operator", "member"]).annotate({ - description: - "Role to assign. owner is valid here (role change) but cannot be set at invite time via CreateUserDto.", - }) - ), - isSsoExempt: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "When true, exempts this user from team-level SSO enforcement, allowing them to use the auth code flow.", - examples: [false], - }) - ), -}).annotate({ identifier: "UpdateUserDto" }); -export type ApeNativeArgumentsDto = { - readonly baycId?: string; - readonly maycId?: string; - readonly bakcId?: string; -}; -export const ApeNativeArgumentsDto = Schema.Struct({ - baycId: Schema.optionalKey(Schema.String), - maycId: Schema.optionalKey(Schema.String), - bakcId: Schema.optionalKey(Schema.String), -}).annotate({ identifier: "ApeNativeArgumentsDto" }); -export type TronResourceType = "BANDWIDTH" | "ENERGY"; -export const TronResourceType = Schema.Literals([ - "BANDWIDTH", - "ENERGY", -]).annotate({ identifier: "TronResourceType" }); -export type SignatureVerificationArgumentsDto = { - readonly message: string; - readonly signed: string; -}; -export const SignatureVerificationArgumentsDto = Schema.Struct({ - message: Schema.String, - signed: Schema.String, -}).annotate({ identifier: "SignatureVerificationArgumentsDto" }); -export type GeolocationError = { - readonly countryCode: string; - readonly regionCode?: string; - readonly tags?: ReadonlyArray< - "Crypto Ban" | "OFAC" | "OFSI" | "Pending Litigation" | "Staking Ban" - >; - readonly details?: {}; - readonly code: number; - readonly message: string; - readonly type: "GEO_LOCATION"; + readonly yieldId?: string; + readonly providerId?: string; + readonly allocation: string; + readonly allocationUsd: string | null; + readonly weight: number; + readonly targetWeight: number; + readonly rewardRate: { readonly total: number; readonly rateType: string }; + readonly tvl: string | null; + readonly tvlUsd: string | null; + readonly maxCapacity: string | null; + readonly remainingCapacity: string | null; }; -export const GeolocationError = Schema.Struct({ - countryCode: Schema.String, - regionCode: Schema.optionalKey(Schema.String), - tags: Schema.optionalKey( - Schema.Array( - Schema.Literals([ - "Crypto Ban", - "OFAC", - "OFSI", - "Pending Litigation", - "Staking Ban", - ]) - ) - ), - details: Schema.optionalKey( - Schema.Struct({}).annotate({ - examples: [{ reason: 'Argument "amount" is required.' }], +export const AllocationDto = Schema.Struct({ + address: Schema.String.annotate({ + description: "Contract address of the underlying strategy", + examples: ["0x1234567890abcdef1234567890abcdef12345678"], + }), + network: Schema.Literals([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "plume", + "monad-testnet", + "monad", + "robinhood", + "robinhood-testnet", + "arc-testnet", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "tempo", + "pharos", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ]).annotate({ + description: "Network the underlying strategy is on", + examples: ["base"], + }), + name: Schema.String.annotate({ + description: "Display name of the underlying strategy", + examples: ["Morpho Moonwell USDC"], + }), + yieldId: Schema.optionalKey( + Schema.String.annotate({ + description: + "Yield ID if this strategy is supported as a separate yield opportunity", + examples: ["base-usdc-morpho-moonwell-usdc"], }) ), - code: Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) + providerId: Schema.optionalKey( + Schema.String.annotate({ + description: "Provider ID for this strategy (e.g., morpho, aave, lido)", + examples: ["morpho"], + }) ), - message: Schema.String, - type: Schema.Literal("GEO_LOCATION"), -}).annotate({ identifier: "GeolocationError" }); -export type CosmosGasArgsDto = { readonly gasPrice: string }; -export const CosmosGasArgsDto = Schema.Struct({ - gasPrice: Schema.String, -}).annotate({ identifier: "CosmosGasArgsDto" }); -export type EvmEIP1559GasArgsDto = { - readonly type: 2; - readonly maxFeePerGas: string; - readonly maxPriorityFeePerGas: string; -}; -export const EvmEIP1559GasArgsDto = Schema.Struct({ - type: Schema.Literal(2), - maxFeePerGas: Schema.String, - maxPriorityFeePerGas: Schema.String, -}).annotate({ identifier: "EvmEIP1559GasArgsDto" }); -export type EvmLegacyGasArgsDto = { - readonly type: 0; - readonly gasPrice: string; -}; -export const EvmLegacyGasArgsDto = Schema.Struct({ - type: Schema.Literal(0), - gasPrice: Schema.String, -}).annotate({ identifier: "EvmLegacyGasArgsDto" }); -export type GasMode = "slow" | "average" | "fast" | "custom"; -export const GasMode = Schema.Literals([ - "slow", - "average", - "fast", - "custom", -]).annotate({ identifier: "GasMode" }); -export type SubmitRequestDto = { readonly signedTransaction: string }; -export const SubmitRequestDto = Schema.Struct({ - signedTransaction: Schema.String.annotate({ - description: "Signed transaction to be broadcast to the network", - }), -}).annotate({ identifier: "SubmitRequestDto" }); -export type SubmitResponseDto = { - readonly transactionHash: string; - readonly link: string; -}; -export const SubmitResponseDto = Schema.Struct({ - transactionHash: Schema.String, - link: Schema.String.annotate({ - description: "Link to the blockchain explorer", + allocation: Schema.String.annotate({ + description: "Amount allocated to this strategy in input token units", + examples: ["50000.00"], }), -}).annotate({ identifier: "SubmitResponseDto" }); -export type SubmitHashRequestDto = { readonly hash: string }; -export const SubmitHashRequestDto = Schema.Struct({ - hash: Schema.String.annotate({ - description: "Hash of submitted transaction", + allocationUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "USD value of the allocation", + examples: ["50000.00"], }), -}).annotate({ identifier: "SubmitHashRequestDto" }); -export type TransactionVerificationMessageDto = { readonly message: string }; -export const TransactionVerificationMessageDto = Schema.Struct({ - message: Schema.String, -}).annotate({ identifier: "TransactionVerificationMessageDto" }); -export type PriceResponseDto = {}; -export const PriceResponseDto = Schema.Struct({}).annotate({ - identifier: "PriceResponseDto", -}); -export type CreateEnabledYieldDto = { readonly integrationId: string }; -export const CreateEnabledYieldDto = Schema.Struct({ - integrationId: Schema.String.annotate({ - examples: ["optimism-usdt-aave-v3-lending"], + weight: Schema.Number.annotate({ + description: "Current weight of this strategy as a percentage (0-100)", + examples: [50.5], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + targetWeight: Schema.Number.annotate({ + description: "Target weight of this strategy as a percentage (0-100)", + examples: [50], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + rewardRate: Schema.Struct({ + total: Schema.Number.annotate({ + description: "Total reward rate", + examples: [5.25], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + rateType: Schema.String.annotate({ + description: "Whether this rate is APR or APY", + examples: ["APY"], + }), + }).annotate({ description: "Reward rate of the underlying strategy" }), + tvl: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Total value locked in the underlying strategy in input token units", + examples: ["500.25"], }), -}).annotate({ identifier: "CreateEnabledYieldDto" }); -export type EnabledYieldDto = { readonly integrationId: string }; -export const EnabledYieldDto = Schema.Struct({ - integrationId: Schema.String.annotate({ - examples: ["optimism-usdt-aave-v3-lending"], + tvlUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Total value locked in USD for the underlying strategy", + examples: ["10000000.00"], }), -}).annotate({ identifier: "EnabledYieldDto" }); -export type DeleteEnabledYieldsDto = { - readonly integrationIds: ReadonlyArray; -}; -export const DeleteEnabledYieldsDto = Schema.Struct({ - integrationIds: Schema.Array(Schema.String).annotate({ - examples: [["optimism-usdt-aave-v3-lending"]], + maxCapacity: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Maximum capacity of the underlying strategy", + examples: ["1000000.00"], }), -}).annotate({ identifier: "DeleteEnabledYieldsDto" }); -export type BinanceAdditionalAddressesStakeArgumentOptionsDto = {}; -export const BinanceAdditionalAddressesStakeArgumentOptionsDto = Schema.Struct( - {} -).annotate({ identifier: "BinanceAdditionalAddressesStakeArgumentOptionsDto" }); -export type AmountArgumentOptionsDto = { - readonly required: boolean; - readonly minimum?: number; - readonly maximum?: number; -}; -export const AmountArgumentOptionsDto = Schema.Struct({ - required: Schema.Boolean, - minimum: Schema.optionalKey( - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), - maximum: Schema.optionalKey( - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), -}).annotate({ identifier: "AmountArgumentOptionsDto" }); -export type DurationArgumentOptionsDto = { - readonly required: boolean; - readonly minimum?: number; - readonly maximum?: number; -}; -export const DurationArgumentOptionsDto = Schema.Struct({ - required: Schema.Boolean, - minimum: Schema.optionalKey( - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), - maximum: Schema.optionalKey( - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), -}).annotate({ identifier: "DurationArgumentOptionsDto" }); -export type RequiredArgumentDto = { readonly required: boolean }; -export const RequiredArgumentDto = Schema.Struct({ - required: Schema.Boolean, -}).annotate({ identifier: "RequiredArgumentDto" }); -export type TronResourceArgumentOptionsDto = { - readonly required: boolean; - readonly options: ReadonlyArray; -}; -export const TronResourceArgumentOptionsDto = Schema.Struct({ - required: Schema.Boolean, - options: Schema.Array(Schema.String), -}).annotate({ identifier: "TronResourceArgumentOptionsDto" }); -export type RequiredArgumentWithOptionsDto = { - readonly required: boolean; - readonly options: ReadonlyArray; -}; -export const RequiredArgumentWithOptionsDto = Schema.Struct({ - required: Schema.Boolean, - options: Schema.Array(Schema.String), -}).annotate({ identifier: "RequiredArgumentWithOptionsDto" }); -export type YieldStatusResponseDto = { - readonly enter: boolean; - readonly exit: boolean; -}; -export const YieldStatusResponseDto = Schema.Struct({ - enter: Schema.Boolean, - exit: Schema.Boolean, -}).annotate({ identifier: "YieldStatusResponseDto" }); -export type RewardTypes = "apr" | "apy" | "variable"; -export const RewardTypes = Schema.Literals(["apr", "apy", "variable"]).annotate( - { identifier: "RewardTypes" } -); -export type ValidatorStatusTypes = - | "active" - | "jailed" - | "deactivating" - | "inactive" - | "full" - | "not_found"; -export const ValidatorStatusTypes = Schema.Literals([ - "active", - "jailed", - "deactivating", - "inactive", - "full", - "not_found", -]).annotate({ identifier: "ValidatorStatusTypes" }); -export type FeeConfigurationStatus = - | "REQUESTED" - | "PROCESSING" - | "LIVE" - | "CHANGES_REQUESTED"; -export const FeeConfigurationStatus = Schema.Literals([ - "REQUESTED", - "PROCESSING", - "LIVE", - "CHANGES_REQUESTED", -]).annotate({ identifier: "FeeConfigurationStatus" }); -export type AllocationRewardRateDto = { - readonly total: number; - readonly rateType: string; -}; -export const AllocationRewardRateDto = Schema.Struct({ - total: Schema.Number.annotate({ - description: "Total reward rate", - examples: [5.25], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - rateType: Schema.String.annotate({ - description: "Whether this rate is APR or APY", - examples: ["APY"], + remainingCapacity: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Remaining capacity in the underlying strategy", + examples: ["500000.00"], }), -}).annotate({ identifier: "AllocationRewardRateDto" }); +}).annotate({ identifier: "AllocationDto" }); export type OAVStrategyDto = { readonly yieldId: string; readonly weight?: number; @@ -3144,11 +3861,14 @@ export const PendingActionConstraintAmountDto = Schema.Struct({ }).annotate({ identifier: "PendingActionConstraintAmountDto" }); export type YieldBalanceLabelDto = { readonly type: string; - readonly params: {}; + readonly params: { readonly [x: string]: Schema.Json }; }; export const YieldBalanceLabelDto = Schema.Struct({ type: Schema.String, - params: Schema.Struct({}), + params: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), }).annotate({ identifier: "YieldBalanceLabelDto" }); export type ValidatorAddressesDto = { readonly validatorAddresses?: ReadonlyArray; @@ -3190,6 +3910,7 @@ export type EvmNetworks = | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -3229,6 +3950,7 @@ export const EvmNetworks = Schema.Literals([ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -3246,10 +3968,7 @@ export const EvmNetworks = Schema.Literals([ "hyperevm", "tempo", "pharos", -]).annotate({ - default: ["base", "ethereum", "arbitrum", "polygon", "binance"], - identifier: "EvmNetworks", -}); +]).annotate({ identifier: "EvmNetworks" }); export type BalanceTransferEventDto = { readonly blockTimestamp: string; readonly blockNumber: number; @@ -3291,12 +4010,12 @@ export type CreateFeeConfigurationDtoV2 = { readonly performanceFeeBps?: number; readonly depositFeeBps?: number; readonly chargeOnFirstDepositOnly?: boolean; - readonly layerzeroOVaultConfig?: {}; + readonly blueBundleOriginationFeeBps?: number; + readonly layerzeroOVaultConfig?: { readonly [x: string]: Schema.Json }; }; export const CreateFeeConfigurationDtoV2 = Schema.Struct({ managementFeeBps: Schema.optionalKey( - Schema.Number.annotate({ examples: ["100"] }) - .check(Schema.isInt().annotate({ expected: "an integer" })) + Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1", @@ -3309,8 +4028,7 @@ export const CreateFeeConfigurationDtoV2 = Schema.Struct({ ) ), performanceFeeBps: Schema.optionalKey( - Schema.Number.annotate({ examples: ["100"] }) - .check(Schema.isInt().annotate({ expected: "an integer" })) + Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1", @@ -3323,8 +4041,7 @@ export const CreateFeeConfigurationDtoV2 = Schema.Struct({ ) ), depositFeeBps: Schema.optionalKey( - Schema.Number.annotate({ examples: ["100"] }) - .check(Schema.isInt().annotate({ expected: "an integer" })) + Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1", @@ -3339,8 +4056,29 @@ export const CreateFeeConfigurationDtoV2 = Schema.Struct({ chargeOnFirstDepositOnly: Schema.optionalKey( Schema.Boolean.annotate({ examples: [false] }) ), + blueBundleOriginationFeeBps: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Config-sourced Morpho BlueBundle origination fee in basis points. Pair with feeRecipientAddress on the LIVE row.", + examples: [50], + }) + .check(Schema.isInt().annotate({ expected: "an integer" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + .check( + Schema.isLessThanOrEqualTo(9999).annotate({ + expected: "a value less than or equal to 9999", + }) + ) + ), layerzeroOVaultConfig: Schema.optionalKey( - Schema.Struct({}).annotate({ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "LayerZero OVault configuration for omnichain access", examples: [ { @@ -3708,14 +4446,17 @@ export const TezosDetailsViewDto = Schema.Struct({ export type FailureViewDto = { readonly code: number; readonly reason: string; - readonly details: {}; + readonly details: { readonly [x: string]: Schema.Json }; }; export const FailureViewDto = Schema.Struct({ code: Schema.Number.annotate({ description: "The error code" }).check( Schema.isFinite().annotate({ expected: "a finite number" }) ), reason: Schema.String.annotate({ description: "The error reason" }), - details: Schema.Struct({}).annotate({ description: "The error details" }), + details: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "The error details" }), }).annotate({ identifier: "FailureViewDto" }); export type InvalidRequestDto = { readonly msg: string }; export const InvalidRequestDto = Schema.Struct({ msg: Schema.String }).annotate( @@ -3753,15 +4494,17 @@ export type CreateFeeConfigurationDto = { readonly performanceFeeBps?: number; readonly depositFeeBps?: number; readonly chargeOnFirstDepositOnly?: boolean; - readonly layerzeroOVaultConfig?: {}; + readonly blueBundleOriginationFeeBps?: number; + readonly layerzeroOVaultConfig?: { readonly [x: string]: Schema.Json }; }; export const CreateFeeConfigurationDto = Schema.Struct({ integrationId: Schema.String.annotate({ examples: ["optimism-usdt-aave-v3-lending"], }), managementFeeBps: Schema.optionalKey( - Schema.Number.annotate({ examples: ["100"] }) - .check(Schema.isFinite().annotate({ expected: "a finite number" })) + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1", @@ -3774,8 +4517,9 @@ export const CreateFeeConfigurationDto = Schema.Struct({ ) ), performanceFeeBps: Schema.optionalKey( - Schema.Number.annotate({ examples: ["100"] }) - .check(Schema.isFinite().annotate({ expected: "a finite number" })) + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1", @@ -3788,8 +4532,9 @@ export const CreateFeeConfigurationDto = Schema.Struct({ ) ), depositFeeBps: Schema.optionalKey( - Schema.Number.annotate({ examples: ["100"] }) - .check(Schema.isFinite().annotate({ expected: "a finite number" })) + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1", @@ -3804,8 +4549,29 @@ export const CreateFeeConfigurationDto = Schema.Struct({ chargeOnFirstDepositOnly: Schema.optionalKey( Schema.Boolean.annotate({ examples: [false] }) ), + blueBundleOriginationFeeBps: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Config-sourced Morpho BlueBundle origination fee in basis points. Pair with feeRecipientAddress on the LIVE row.", + examples: [50], + }) + .check(Schema.isInt().annotate({ expected: "an integer" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + .check( + Schema.isLessThanOrEqualTo(9999).annotate({ + expected: "a value less than or equal to 9999", + }) + ) + ), layerzeroOVaultConfig: Schema.optionalKey( - Schema.Struct({}).annotate({ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "LayerZero OVault configuration for omnichain access", examples: [ { @@ -3836,6 +4602,7 @@ export type UpdateFeeConfigurationDto = { readonly performanceFeeBps?: number | null; readonly depositFeeBps?: number | null; readonly chargeOnFirstDepositOnly?: boolean | null; + readonly blueBundleOriginationFeeBps?: number | null; readonly layerzeroOVaultConfig?: { readonly [x: string]: Schema.Json } | null; }; export const UpdateFeeConfigurationDto = Schema.Struct({ @@ -3855,7 +4622,7 @@ export const UpdateFeeConfigurationDto = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }) + ]) ), performanceFeeBps: Schema.optionalKey( Schema.Union([ @@ -3873,7 +4640,7 @@ export const UpdateFeeConfigurationDto = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }) + ]) ), depositFeeBps: Schema.optionalKey( Schema.Union([ @@ -3891,11 +4658,31 @@ export const UpdateFeeConfigurationDto = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }) + ]) ), chargeOnFirstDepositOnly: Schema.optionalKey( Schema.Union([Schema.Boolean, Schema.Null]).annotate({ examples: [false] }) ), + blueBundleOriginationFeeBps: Schema.optionalKey( + Schema.Union([ + Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + .check( + Schema.isLessThanOrEqualTo(9999).annotate({ + expected: "a value less than or equal to 9999", + }) + ), + Schema.Null, + ]).annotate({ + description: + "Config-sourced Morpho BlueBundle origination fee in basis points. Pair with feeRecipientAddress on the LIVE row.", + examples: [50], + }) + ), layerzeroOVaultConfig: Schema.optionalKey( Schema.Union([ Schema.Record( @@ -3934,10 +4721,11 @@ export const InitiateSsoDto = Schema.Struct({ }) ), }).annotate({ identifier: "InitiateSsoDto" }); -export type InitiateSsoResponseDto = {}; -export const InitiateSsoResponseDto = Schema.Struct({}).annotate({ - identifier: "InitiateSsoResponseDto", -}); +export type InitiateSsoResponseDto = { readonly [x: string]: never }; +export const InitiateSsoResponseDto = Schema.Record( + Schema.String, + Schema.Never +).annotate({ identifier: "InitiateSsoResponseDto" }); export type SpMetadataDto = { readonly acsUrl?: string; readonly entityId?: string; @@ -4124,11 +4912,14 @@ export const MfaWebauthnPublicKeyDescriptorDto = Schema.Struct({ ), }).annotate({ identifier: "MfaWebauthnPublicKeyDescriptorDto" }); export type MfaWebauthnRegisterVerifyDto = { - readonly credential: {}; + readonly credential: { readonly [x: string]: Schema.Json }; readonly label?: string; }; export const MfaWebauthnRegisterVerifyDto = Schema.Struct({ - credential: Schema.Struct({}).annotate({ + credential: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "JSON returned by `startRegistration()` from @simplewebauthn/browser", }), @@ -4162,11 +4953,14 @@ export const MfaWebauthnLoginOptionsDto = Schema.Struct({ }).annotate({ identifier: "MfaWebauthnLoginOptionsDto" }); export type MfaWebauthnLoginVerifyDto = { readonly challengeToken: string; - readonly credential: {}; + readonly credential: { readonly [x: string]: Schema.Json }; }; export const MfaWebauthnLoginVerifyDto = Schema.Struct({ challengeToken: Schema.String, - credential: Schema.Struct({}).annotate({ + credential: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "JSON returned by `startAuthentication()` from @simplewebauthn/browser", }), @@ -4277,7 +5071,7 @@ export type CreateValidatorProviderDto = { readonly website: string; readonly rank: number; readonly preferred?: boolean; - readonly revshare?: {}; + readonly revshare?: { readonly [x: string]: Schema.Json }; }; export const CreateValidatorProviderDto = Schema.Struct({ name: Schema.String, @@ -4286,7 +5080,12 @@ export const CreateValidatorProviderDto = Schema.Struct({ Schema.isFinite().annotate({ expected: "a finite number" }) ), preferred: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - revshare: Schema.optionalKey(Schema.Struct({})), + revshare: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), }).annotate({ identifier: "CreateValidatorProviderDto" }); export type ValidatorProviderDto = { readonly id: string; @@ -4295,7 +5094,7 @@ export type ValidatorProviderDto = { readonly website: string; readonly rank: number; readonly preferred: boolean; - readonly revshare?: {}; + readonly revshare?: { readonly [x: string]: Schema.Json }; readonly createdAt: string; readonly updatedAt: string; }; @@ -4308,7 +5107,12 @@ export const ValidatorProviderDto = Schema.Struct({ Schema.isFinite().annotate({ expected: "a finite number" }) ), preferred: Schema.Boolean, - revshare: Schema.optionalKey(Schema.Struct({})), + revshare: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), createdAt: Schema.String.annotate({ format: "date-time" }), updatedAt: Schema.String.annotate({ format: "date-time" }), }).annotate({ identifier: "ValidatorProviderDto" }); @@ -4317,7 +5121,7 @@ export type UpdateValidatorProviderDto = { readonly website?: string; readonly rank?: number; readonly preferred?: boolean; - readonly revshare?: {}; + readonly revshare?: { readonly [x: string]: Schema.Json }; readonly csvFile?: string; }; export const UpdateValidatorProviderDto = Schema.Struct({ @@ -4329,7 +5133,12 @@ export const UpdateValidatorProviderDto = Schema.Struct({ ) ), preferred: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - revshare: Schema.optionalKey(Schema.Struct({})), + revshare: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), csvFile: Schema.optionalKey( Schema.String.annotate({ description: "CSV file for validator data", @@ -4348,20 +5157,40 @@ export type ValidatorHistoricalRevshareChangesDto = { readonly validatorId: string; readonly type: "on_chain" | "override"; readonly lastDay: string; - readonly preferred?: {}; - readonly apr?: {}; - readonly commission?: {}; - readonly mevCommission?: {}; + readonly preferred?: { readonly [x: string]: Schema.Json }; + readonly apr?: { readonly [x: string]: Schema.Json }; + readonly commission?: { readonly [x: string]: Schema.Json }; + readonly mevCommission?: { readonly [x: string]: Schema.Json }; }; export const ValidatorHistoricalRevshareChangesDto = Schema.Struct({ id: Schema.String, validatorId: Schema.String, type: Schema.Literals(["on_chain", "override"]), lastDay: Schema.String.annotate({ format: "date-time" }), - preferred: Schema.optionalKey(Schema.Struct({})), - apr: Schema.optionalKey(Schema.Struct({})), - commission: Schema.optionalKey(Schema.Struct({})), - mevCommission: Schema.optionalKey(Schema.Struct({})), + preferred: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + apr: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + commission: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + mevCommission: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), }).annotate({ identifier: "ValidatorHistoricalRevshareChangesDto" }); export type CreateValidatorDto = { readonly integrationId: string; @@ -4525,7 +5354,7 @@ export type WebhookEndpointDto = { readonly projectId: string; readonly url: string; readonly enabled: boolean; - readonly description?: {}; + readonly description?: { readonly [x: string]: Schema.Json }; readonly createdAt: string; readonly updatedAt: string; readonly subscriptionCount: number; @@ -4548,10 +5377,10 @@ export const WebhookEndpointDto = Schema.Struct({ examples: [true], }), description: Schema.optionalKey( - Schema.Struct({}).annotate({ - description: "Optional description for this endpoint", - examples: ["Production webhook endpoint"], - }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Optional description for this endpoint" }) ), createdAt: Schema.String.annotate({ description: "Timestamp when the endpoint was created", @@ -4582,7 +5411,6 @@ export const CreateWebhookEndpointDto = Schema.Struct({ secret: Schema.String.annotate({ description: "Secret key for HMAC signature verification. Store this securely - it will be encrypted at rest.", - examples: ["whsec_abc123xyz789"], }).check( Schema.isMinLength(24).annotate({ expected: "a value with a length of at least 24", @@ -4619,7 +5447,6 @@ export const UpdateWebhookEndpointDto = Schema.Struct({ Schema.String.annotate({ description: "Secret key for HMAC signature verification. If provided, the old secret will be replaced.", - examples: ["whsec_new_secret"], }).check( Schema.isMinLength(24).annotate({ expected: "a value with a length of at least 24", @@ -4652,7 +5479,7 @@ export type WebhookSubscriptionDto = { readonly endpointId: string; readonly events: ReadonlyArray; readonly actions: ReadonlyArray; - readonly filtersJson?: {}; + readonly filtersJson?: { readonly [x: string]: Schema.Json }; readonly enabled: boolean; readonly createdAt: string; readonly updatedAt: string; @@ -4679,7 +5506,10 @@ export const WebhookSubscriptionDto = Schema.Struct({ examples: [["status_changed", "amount_changed"]], }), filtersJson: Schema.optionalKey( - Schema.Struct({}).annotate({ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Optional filters applied to this subscription", examples: [{ yield_ids: ["ethereum-eth-lido-staking"] }], }) @@ -4702,7 +5532,7 @@ export const WebhookSubscriptionDto = Schema.Struct({ export type CreateWebhookSubscriptionDto = { readonly events: ReadonlyArray; readonly actions: ReadonlyArray; - readonly filtersJson?: {}; + readonly filtersJson?: { readonly [x: string]: Schema.Json }; readonly enabled?: boolean; }; export const CreateWebhookSubscriptionDto = Schema.Struct({ @@ -4717,7 +5547,10 @@ export const CreateWebhookSubscriptionDto = Schema.Struct({ examples: [["status_changed", "amount_changed"]], }), filtersJson: Schema.optionalKey( - Schema.Struct({}).annotate({ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Optional filters to narrow down events (e.g., specific yield_ids, addresses, networks)", examples: [ @@ -4740,7 +5573,7 @@ export const CreateWebhookSubscriptionDto = Schema.Struct({ export type UpdateWebhookSubscriptionDto = { readonly events?: ReadonlyArray; readonly actions?: ReadonlyArray; - readonly filtersJson?: {}; + readonly filtersJson?: { readonly [x: string]: Schema.Json }; readonly enabled?: boolean; }; export const UpdateWebhookSubscriptionDto = Schema.Struct({ @@ -4757,7 +5590,10 @@ export const UpdateWebhookSubscriptionDto = Schema.Struct({ }) ), filtersJson: Schema.optionalKey( - Schema.Struct({}).annotate({ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Optional filters to narrow down events", examples: [{ yield_ids: ["ethereum-eth-lido-staking"] }], }) @@ -4861,8 +5697,8 @@ export type WebhookEventDto = { readonly resource: string; readonly action: string; readonly type: string; - readonly subjectJson: {}; - readonly dataJson: {}; + readonly subjectJson: { readonly [x: string]: Schema.Json }; + readonly dataJson: { readonly [x: string]: Schema.Json }; readonly previousJson: { readonly [x: string]: Schema.Json } | null; readonly changesJson: { readonly [x: string]: Schema.Json } | null; readonly sequence: number; @@ -4880,8 +5716,14 @@ export const WebhookEventDto = Schema.Struct({ resource: Schema.String, action: Schema.String, type: Schema.String, - subjectJson: Schema.Struct({}), - dataJson: Schema.Struct({}), + subjectJson: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), + dataJson: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), previousJson: Schema.Union([ Schema.Record( Schema.String, @@ -5078,6 +5920,62 @@ export const CampaignBalanceTotalsDto = Schema.Struct({ "Aggregate debits (withdrawals + P2P sent) in input token terms.", }), }).annotate({ identifier: "CampaignBalanceTotalsDto" }); +export type WindowAccrualSummaryDto = { + readonly windowStart: string; + readonly windowEnd: string; + readonly campaignStatus: CampaignStatus; + readonly qualifyingUserCount: number; + readonly totalQualifyingTvl: string; + readonly windowBudgetAllocated: string; + readonly windowBudgetDistributed: string; + readonly ceilingActive: boolean; + readonly calculatedApr: number | null; + readonly pricePerShare: string | null; +}; +export const WindowAccrualSummaryDto = Schema.Struct({ + windowStart: Schema.String.annotate({ + description: "Window start (inclusive).", + format: "date-time", + }), + windowEnd: Schema.String.annotate({ + description: "Window end (exclusive).", + format: "date-time", + }), + campaignStatus: Schema.suspend( + (): Schema.Codec => CampaignStatus + ).annotate({ + description: + "Campaign status while this window was measured. Paused windows record TVL with zero emission, so they carry no per-user rows.", + }), + qualifyingUserCount: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + totalQualifyingTvl: Schema.String.annotate({ + description: "Total qualifying balance in input token units.", + }), + windowBudgetAllocated: Schema.String.annotate({ + description: + "Effective emission baseline for the window before ceiling. For spend_full_budget campaigns this is the dynamic baseline reconstructed from prior distributed emissions and remaining duration; for other strategies this is the configured rate scaled to the window duration.", + }), + windowBudgetDistributed: Schema.String.annotate({ + description: "Actual emission after ceiling logic.", + }), + ceilingActive: Schema.Boolean.annotate({ + description: "True when the APY ceiling capped this window.", + }), + calculatedApr: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + Schema.Null, + ]).annotate({ + description: + "Annualised rate: distributed / TVL scaled by the window duration. Null when TVL is zero.", + }), + pricePerShare: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Null for non-share-based campaigns.", + }), +}).annotate({ identifier: "WindowAccrualSummaryDto" }); export type CampaignV2BalanceTotalsDto = { readonly totalBudget: string; readonly totalDistributed: string; @@ -5145,45 +6043,61 @@ export const TokenDto = Schema.Struct({ isPoints: Schema.optionalKey(Schema.Boolean), feeConfigurationId: Schema.optionalKey(Schema.String), }).annotate({ identifier: "TokenDto" }); -export type UpdatePayoutAddressDto = { - readonly address: string; +export type RequestPayoutAddressDto = { readonly network: Networks; - readonly scope?: "yield" | "trade" | null; - readonly providerId?: string | null; - readonly note?: string | null; + readonly address: string; }; -export const UpdatePayoutAddressDto = Schema.Struct({ +export const RequestPayoutAddressDto = Schema.Struct({ + network: Networks, address: Schema.String.annotate({ - examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d89"], + examples: ["0x1111111111111111111111111111111111111111"], }), - network: Schema.suspend((): Schema.Codec => Networks).annotate({ - examples: ["ethereum"], +}).annotate({ identifier: "RequestPayoutAddressDto" }); +export type PayoutRequestItemDto = { + readonly integrationId: string; + readonly integrationName: string | null; + readonly amount: string; + readonly token: { + readonly name: string; + readonly network: Networks; + readonly symbol: string; + readonly decimals: number; + readonly address?: string; + readonly coinGeckoId?: string; + readonly logoURI?: string; + readonly isPoints?: boolean; + readonly feeConfigurationId?: string; + }; + readonly usdAmountEstimated: string; + readonly payoutAddress: string | null; +}; +export const PayoutRequestItemDto = Schema.Struct({ + integrationId: Schema.String, + integrationName: Schema.Union([Schema.String, Schema.Null]), + amount: Schema.String.annotate({ + description: "Claimed amount in token wei", }), - scope: Schema.optionalKey( - Schema.Union([ - Schema.Literal("yield"), - Schema.Literal("trade"), - Schema.Null, - ]).annotate({ - description: "'yield' or 'trade' only. 'all' is no longer allowed.", - }) - ), - providerId: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - examples: ["hyperliquid"], - }) - ), - note: Schema.optionalKey( - Schema.Union([ - Schema.String.check( - Schema.isMaxLength(50).annotate({ - expected: "a value with a length of at most 50", - }) - ), - Schema.Null, - ]) - ), -}).annotate({ identifier: "UpdatePayoutAddressDto" }); + token: Schema.Struct({ + name: Schema.String, + network: Networks, + symbol: Schema.String, + decimals: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + address: Schema.optionalKey(Schema.String), + coinGeckoId: Schema.optionalKey(Schema.String), + logoURI: Schema.optionalKey(Schema.String), + isPoints: Schema.optionalKey(Schema.Boolean), + feeConfigurationId: Schema.optionalKey(Schema.String), + }), + usdAmountEstimated: Schema.String.annotate({ + description: + "Estimated USD at revenue accrual time. Not the final off-ramp amount — that is recorded later as usdAmountPaid by RevOps.", + }), + payoutAddress: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Resolved payout address for this token network", + }), +}).annotate({ identifier: "PayoutRequestItemDto" }); export type CreateCustomUriDto = { readonly network: Networks; readonly rpcUri: string; @@ -5238,7 +6152,7 @@ export type CreateRiskParameterDto = { readonly category: string; readonly item: string; readonly isDynamic?: boolean; - readonly value: {}; + readonly value: { readonly [x: string]: Schema.Json }; readonly network?: Networks; readonly asset?: string; readonly protocol?: string; @@ -5248,10 +6162,12 @@ export const CreateRiskParameterDto = Schema.Struct({ category: Schema.String.annotate({ examples: ["protocol"] }), item: Schema.String.annotate({ examples: ["protocol_tvl"] }), isDynamic: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - value: Schema.Struct({}).annotate({ + value: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Parameter value; supports numbers, strings, booleans, arrays, or objects.", - examples: [12345], }), network: Schema.optionalKey(Networks), asset: Schema.optionalKey( @@ -5271,11 +6187,11 @@ export type RiskParameterDto = { readonly category: string; readonly item: string; readonly isDynamic: boolean; - readonly value?: {}; + readonly value?: { readonly [x: string]: Schema.Json }; readonly network?: Networks; - readonly asset?: {}; - readonly protocol?: {}; - readonly integrationId?: {}; + readonly asset?: { readonly [x: string]: Schema.Json }; + readonly protocol?: { readonly [x: string]: Schema.Json }; + readonly integrationId?: { readonly [x: string]: Schema.Json }; readonly createdAt: string; readonly updatedAt: string; }; @@ -5284,11 +6200,31 @@ export const RiskParameterDto = Schema.Struct({ category: Schema.String, item: Schema.String, isDynamic: Schema.Boolean, - value: Schema.optionalKey(Schema.Struct({})), + value: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), network: Schema.optionalKey(Networks), - asset: Schema.optionalKey(Schema.Struct({})), - protocol: Schema.optionalKey(Schema.Struct({})), - integrationId: Schema.optionalKey(Schema.Struct({})), + asset: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + protocol: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + integrationId: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), createdAt: Schema.String.annotate({ format: "date-time" }), updatedAt: Schema.String.annotate({ format: "date-time" }), }).annotate({ identifier: "RiskParameterDto" }); @@ -5296,11 +6232,11 @@ export type UpdateRiskParameterDto = { readonly category?: string; readonly item?: string; readonly isDynamic?: boolean; - readonly value?: {}; + readonly value?: { readonly [x: string]: Schema.Json }; readonly network?: Networks; - readonly asset?: {}; - readonly protocol?: {}; - readonly integrationId?: {}; + readonly asset?: { readonly [x: string]: Schema.Json }; + readonly protocol?: { readonly [x: string]: Schema.Json }; + readonly integrationId?: { readonly [x: string]: Schema.Json }; }; export const UpdateRiskParameterDto = Schema.Struct({ category: Schema.optionalKey( @@ -5311,23 +6247,32 @@ export const UpdateRiskParameterDto = Schema.Struct({ ), isDynamic: Schema.optionalKey(Schema.Boolean), value: Schema.optionalKey( - Schema.Struct({}).annotate({ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Parameter value; supports numbers, strings, booleans, arrays, or objects", - examples: [12345], }) ), network: Schema.optionalKey(Networks), asset: Schema.optionalKey( - Schema.Struct({}).annotate({ - description: "Asset identifier (eg, token string or symbol)", - }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Asset identifier (eg, token string or symbol)" }) ), protocol: Schema.optionalKey( - Schema.Struct({}).annotate({ description: "Protocol identifier" }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Protocol identifier" }) ), integrationId: Schema.optionalKey( - Schema.Struct({}).annotate({ description: "Yield integration ID" }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Yield integration ID" }) ), }).annotate({ identifier: "UpdateRiskParameterDto" }); export type CampaignQualificationConfigDto = { @@ -6122,13 +7067,13 @@ export const PaginatedBlacklistedAddressV2Dto = Schema.Struct({ }).check(Schema.isFinite().annotate({ expected: "a finite number" })), items: Schema.Array(BlacklistedAddressV2Dto), }).annotate({ identifier: "PaginatedBlacklistedAddressV2Dto" }); -export type CampaignV2UserPointsPageDto = { +export type PaginatedCampaignSimulationRunDto = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items: ReadonlyArray; + readonly items: ReadonlyArray; }; -export const CampaignV2UserPointsPageDto = Schema.Struct({ +export const PaginatedCampaignSimulationRunDto = Schema.Struct({ total: Schema.Number.annotate({ description: "Total number of items available", examples: [100], @@ -6141,15 +7086,176 @@ export const CampaignV2UserPointsPageDto = Schema.Struct({ description: "Limit of the current page", examples: [20], }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - items: Schema.Array(CampaignV2UserPointsDto), -}).annotate({ identifier: "CampaignV2UserPointsPageDto" }); -export type PaginatedWindowAccrualSummaryDto = { + items: Schema.Array(CampaignSimulationRunDto), +}).annotate({ identifier: "PaginatedCampaignSimulationRunDto" }); +export type CampaignSimulationConfigDto = { + readonly totalBudget?: string; + readonly configuredEmissionRate?: string; + readonly payoutFrequency?: + | "weekly" + | "daily" + | "six_hourly" + | "end_of_campaign"; + readonly qualificationThreshold?: string; + readonly apyCeiling?: number; + readonly maxIncentivizedTvlToken?: string; + readonly budgetSpendStrategy?: "allow_underspend" | "spend_full_budget"; + readonly rewardMode?: "normal" | "compound"; + readonly rewardTokenDecimals?: number; + readonly minDepositTokens?: number; + readonly maxDepositTokens?: number; + readonly topUpProbability?: number; + readonly exitProbability?: number; + readonly startTime?: string; + readonly applyPlatformWide?: boolean; + readonly rewardToken?: CampaignSimulationRewardTokenDto; + readonly populationMode?: "random" | "uniform"; + readonly depositTokens?: string; + readonly balanceEvents?: ReadonlyArray; + readonly milestones?: ReadonlyArray; + readonly budgetInjections?: ReadonlyArray; +}; +export const CampaignSimulationConfigDto = Schema.Struct({ + totalBudget: Schema.optionalKey( + Schema.String.annotate({ + description: + "Campaign budget in reward tokens (required for synthetic runs)", + examples: ["10000"], + }) + ), + configuredEmissionRate: Schema.optionalKey( + Schema.String.annotate({ + description: + "Reward tokens emitted per hour (required for allow_underspend)", + }) + ), + payoutFrequency: Schema.optionalKey( + Schema.Literals([ + "weekly", + "daily", + "six_hourly", + "end_of_campaign", + ]).annotate({ description: "Default: daily" }) + ), + qualificationThreshold: Schema.optionalKey( + Schema.String.annotate({ + description: "Minimum balance to qualify, in input tokens (default 0)", + }) + ), + apyCeiling: Schema.optionalKey( + Schema.Number.annotate({ + description: "Decimal APY cap, e.g. 0.015 = 1.5%", + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + maxIncentivizedTvlToken: Schema.optionalKey( + Schema.String.annotate({ + description: "Per-wallet incentivized balance cap, in input tokens", + }) + ), + budgetSpendStrategy: Schema.optionalKey( + Schema.Literals(["allow_underspend", "spend_full_budget"]).annotate({ + description: "Default: spend_full_budget", + }) + ), + rewardMode: Schema.optionalKey( + Schema.Literals(["normal", "compound"]).annotate({ + description: "Default: normal", + }) + ), + rewardTokenDecimals: Schema.optionalKey( + Schema.Number.annotate({ + description: "Reward token decimals (default 18)", + }) + .check(Schema.isFinite().annotate({ expected: "a finite number" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + .check( + Schema.isLessThanOrEqualTo(18).annotate({ + expected: "a value less than or equal to 18", + }) + ) + ), + minDepositTokens: Schema.optionalKey( + Schema.Number.annotate({ + description: "Smallest random deposit, in tokens (default 10)", + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + maxDepositTokens: Schema.optionalKey( + Schema.Number.annotate({ + description: "Largest random deposit, in tokens (default 1000)", + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + topUpProbability: Schema.optionalKey( + Schema.Number.annotate({ + description: "Per-user mid-campaign top-up probability (default 0.3)", + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + exitProbability: Schema.optionalKey( + Schema.Number.annotate({ + description: "Per-user full-exit probability (default 0.15)", + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + startTime: Schema.optionalKey( + Schema.String.annotate({ + description: + "Yield-based forecast/replay only: simulated campaign start (ISO). Default: now − days (replay) / now (forecast).", + }) + ), + applyPlatformWide: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "Forecast/replay: count deposits across all projects (yield-based default: true) or only the campaign project (false)", + }) + ), + rewardToken: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => + CampaignSimulationRewardTokenDto + ).annotate({ + description: + "Yield-based only: pay a different token than the yield token (exercises cross-token ceiling math; the token must exist in the price pipeline)", + }) + ), + populationMode: Schema.optionalKey( + Schema.Literals(["random", "uniform"]).annotate({ + description: + "random (default): seeded joins/top-ups/exits in the deposit range. uniform: every user deposits depositTokens at hour 0.", + }) + ), + depositTokens: Schema.optionalKey( + Schema.String.annotate({ + description: "uniform mode: fixed deposit per user (default 100)", + }) + ), + balanceEvents: Schema.optionalKey( + Schema.Array(CampaignSimulationBalanceEventDto).annotate({ + description: + "Exact deposit/withdrawal schedule; replaces the generated population", + }) + ), + milestones: Schema.optionalKey( + Schema.Array(CampaignV2MilestoneItemDto).annotate({ + description: + "Ordered budget tranches gated by TVL milestones (trailing TW-TVL + TVL-years); tranche amounts must sum to totalBudget. Synthetic and yield-based runs only.", + }) + ), + budgetInjections: Schema.optionalKey( + Schema.Array(CampaignSimulationBudgetInjectionDto).annotate({ + description: + "Scheduled totalBudget raises (required by the budget-injection scenario)", + }) + ), +}).annotate({ identifier: "CampaignSimulationConfigDto" }); +export type CampaignV2UserPointsPageDto = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items: ReadonlyArray; + readonly items: ReadonlyArray; }; -export const PaginatedWindowAccrualSummaryDto = Schema.Struct({ +export const CampaignV2UserPointsPageDto = Schema.Struct({ total: Schema.Number.annotate({ description: "Total number of items available", examples: [100], @@ -6162,8 +7268,8 @@ export const PaginatedWindowAccrualSummaryDto = Schema.Struct({ description: "Limit of the current page", examples: [20], }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - items: Schema.Array(WindowAccrualSummaryDto), -}).annotate({ identifier: "PaginatedWindowAccrualSummaryDto" }); + items: Schema.Array(CampaignV2UserPointsDto), +}).annotate({ identifier: "CampaignV2UserPointsPageDto" }); export type PaginatedUserWindowAccrualDto = { readonly total: number; readonly offset: number; @@ -6228,13 +7334,16 @@ export const PaginatedCampaignV2UserBalanceDto = Schema.Struct({ items: Schema.Array(CampaignV2UserBalanceDto), }).annotate({ identifier: "PaginatedCampaignV2UserBalanceDto" }); export type CreateTeamDto = { - readonly contactDetails: {}; + readonly contactDetails: { readonly [x: string]: Schema.Json }; readonly name: string; readonly user: CreateTeamDtoUser; readonly referredBy?: string; }; export const CreateTeamDto = Schema.Struct({ - contactDetails: Schema.Struct({}).annotate({ examples: ["{}"] }), + contactDetails: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), name: Schema.String.annotate({ examples: ["Acme"] }), user: CreateTeamDtoUser, referredBy: Schema.optionalKey(Schema.String), @@ -6267,14 +7376,11 @@ export type UpdateTeamDto = { readonly name?: string; readonly isMfaEnforced?: boolean; readonly isMultiTenant?: boolean; + readonly clientType?: ClientType; }; export const UpdateTeamDto = Schema.Struct({ - activated: Schema.optionalKey( - Schema.Boolean.annotate({ examples: ["true"] }) - ), - serviceConditionsAccepted: Schema.optionalKey( - Schema.Boolean.annotate({ examples: ["true"] }) - ), + activated: Schema.optionalKey(Schema.Boolean), + serviceConditionsAccepted: Schema.optionalKey(Schema.Boolean), category: Schema.optionalKey(KeyCategory), name: Schema.optionalKey(Schema.String.annotate({ examples: ["Acme"] })), isMfaEnforced: Schema.optionalKey( @@ -6289,6 +7395,11 @@ export const UpdateTeamDto = Schema.Struct({ "Mark the team as a multi-tenant (partner) team that can own end-client teams. Only super admins may change this.", }) ), + clientType: Schema.optionalKey( + Schema.suspend((): Schema.Codec => ClientType).annotate({ + description: "Client classification. Only super admins may change this.", + }) + ), }).annotate({ identifier: "UpdateTeamDto" }); export type HealthStatusDto = { readonly status: HealthStatus; @@ -6349,7 +7460,7 @@ export type IntegrationRevenueRowDto = { readonly integration_id: string; readonly integration_name: string | null; readonly revenue_usd: string | null; - readonly revenue_type: "estimated" | "actual" | null; + readonly revenue_type: "estimated" | "actual"; readonly tvl_usd: string | null; readonly data_freshness: IntegrationFreshness; readonly coverage: boolean; @@ -6363,11 +7474,7 @@ export const IntegrationRevenueRowDto = Schema.Struct({ revenue_usd: Schema.Union([Schema.String, Schema.Null]).annotate({ description: "Revenue in USD. null when coverage is false.", }), - revenue_type: Schema.Union([ - Schema.Literal("estimated"), - Schema.Literal("actual"), - Schema.Null, - ]), + revenue_type: Schema.Literals(["estimated", "actual"]), tvl_usd: Schema.Union([Schema.String, Schema.Null]).annotate({ description: "Total TVL in USD", }), @@ -6443,6 +7550,38 @@ export const KpiTrendsResponseDto = Schema.Struct({ "Monthly data points ordered oldest to newest, covering the last 12 months", }), }).annotate({ identifier: "KpiTrendsResponseDto" }); +export type MonthlyReportListItemDto = { + readonly report_id: string; + readonly month: string; + readonly total_revenue_usd: string | null; + readonly total_tvl_usd: string | null; + readonly status: MonthlyReportStatus; + readonly published_at: string | null; + readonly published_by: string | null; +}; +export const MonthlyReportListItemDto = Schema.Struct({ + report_id: Schema.String.annotate({ format: "uuid" }), + month: Schema.String.annotate({ + description: "Reporting period in YYYY-MM format", + examples: ["2026-05"], + }), + total_revenue_usd: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Aggregate earned revenue in USD", + }), + total_tvl_usd: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Total TVL in USD, summed across integrations. Integrations report at different freshness cadences, so this figure mixes snapshots from different points in time; see each integration’s data_freshness in the breakdown.", + }), + status: MonthlyReportStatus, + published_at: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "When the report was published", + format: "date-time", + }), + published_by: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "User id of the super admin who published the report", + format: "uuid", + }), +}).annotate({ identifier: "MonthlyReportListItemDto" }); export type AddressesDto = { readonly address: string; readonly additionalAddresses?: @@ -6501,7 +7640,7 @@ export type TransactionStatusResponseDto = { readonly blockNumber?: string; readonly network: Networks; readonly hash: string; - readonly raw: {}; + readonly raw: { readonly [x: string]: Schema.Json }; }; export const TransactionStatusResponseDto = Schema.Struct({ status: TransactionStatus, @@ -6509,14 +7648,11 @@ export const TransactionStatusResponseDto = Schema.Struct({ blockNumber: Schema.optionalKey(Schema.String), network: Networks, hash: Schema.String, - raw: Schema.Struct({}), + raw: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), }).annotate({ identifier: "TransactionStatusResponseDto" }); -export type AnnotatedTransactionDto = { - readonly fields: ReadonlyArray; -}; -export const AnnotatedTransactionDto = Schema.Struct({ - fields: Schema.Array(AnnotatedFieldDto), -}).annotate({ identifier: "AnnotatedTransactionDto" }); export type YieldProviderDto = { readonly id: YieldProviders; readonly name: string; @@ -6562,10 +7698,13 @@ export const ProgrammaticPerpReportingTransactionDto = Schema.Struct({ }), type: Schema.suspend( (): Schema.Codec => PerpTransactionType - ).annotate({ examples: ["OPEN_POSITION"] }), + ).annotate({ description: "Transaction type", examples: ["OPEN_POSITION"] }), status: Schema.suspend( (): Schema.Codec => PerpTransactionStatus - ).annotate({ examples: ["CONFIRMED"] }), + ).annotate({ + description: "Current transaction status", + examples: ["CONFIRMED"], + }), hash: Schema.Union([Schema.String, Schema.Null]).annotate({ description: "Transaction hash or provider-native identifier, if available", examples: [ @@ -6573,6 +7712,7 @@ export const ProgrammaticPerpReportingTransactionDto = Schema.Struct({ ], }), network: Schema.suspend((): Schema.Codec => Networks).annotate({ + description: "Network identifier", examples: ["hyperliquid"], }), explorerUrl: Schema.Union([Schema.String, Schema.Null]).annotate({ @@ -6588,6 +7728,114 @@ export const ProgrammaticPerpReportingTransactionDto = Schema.Struct({ format: "date-time", }), }).annotate({ identifier: "ProgrammaticPerpReportingTransactionDto" }); +export type ProgrammaticPerpReportingEventOrderDto = { + readonly orderId: string; + readonly marketId: string; + readonly asset: string; + readonly side: OrderSide; + readonly type: OrderType; + readonly originalSizeBase: string; + readonly remainingSizeBase: string; + readonly limitPrice?: number; + readonly timeInForce?: ProgrammaticPerpEventOrderTimeInForce; + readonly triggerPrice?: number; + readonly reduceOnly: boolean; + readonly isPositionLevel: boolean; + readonly clientOrderId: { readonly [x: string]: Schema.Json } | null; + readonly childOrderIds: ReadonlyArray; + readonly createdAt: string; + readonly closedPnl?: string; + readonly fillPrice?: number; +}; +export const ProgrammaticPerpReportingEventOrderDto = Schema.Struct({ + orderId: Schema.String.annotate({ + description: "Venue order identifier", + examples: ["394438950581"], + }), + marketId: Schema.String.annotate({ + description: "Market identifier", + examples: ["hyperliquid-eth-usdc"], + }), + asset: Schema.String.annotate({ + description: "Base asset ticker", + examples: ["ETH"], + }), + side: Schema.suspend((): Schema.Codec => OrderSide).annotate({ + description: "Order side", + examples: ["buy"], + }), + type: Schema.suspend((): Schema.Codec => OrderType).annotate({ + description: "Normalized order type", + examples: ["market"], + }), + originalSizeBase: Schema.String.annotate({ + description: "Original order size in base asset units", + examples: ["0.0063"], + }), + remainingSizeBase: Schema.String.annotate({ + description: "Remaining order size in base asset units", + examples: ["0.0"], + }), + limitPrice: Schema.optionalKey( + Schema.Number.annotate({ + description: "Limit price", + examples: [2395.2], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + timeInForce: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => + ProgrammaticPerpEventOrderTimeInForce + ).annotate({ description: "Normalized time in force", examples: ["ioc"] }) + ), + triggerPrice: Schema.optionalKey( + Schema.Number.annotate({ + description: "Trigger price when present on a trigger order", + examples: [2500], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + reduceOnly: Schema.Boolean.annotate({ + description: "Reduce only flag", + examples: [false], + }), + isPositionLevel: Schema.Boolean.annotate({ + description: "Whether the order is a position-level TP/SL order", + examples: [false], + }), + clientOrderId: Schema.Union([ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), + Schema.Null, + ]).annotate({ + description: "Client-supplied order id when present", + examples: [null], + }), + childOrderIds: Schema.Array(Schema.String).annotate({ + description: "Child order identifiers", + examples: [[]], + }), + createdAt: Schema.String.annotate({ + description: "Order creation timestamp", + examples: ["2026-04-23T07:52:05.187Z"], + format: "date-time", + }), + closedPnl: Schema.optionalKey( + Schema.String.annotate({ + description: + "PnL realized when an order closes, net of fees in USDC (string-encoded decimal). Absent on open / non-closing fills.", + examples: ["-12.45"], + }) + ), + fillPrice: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Realized fill price for fill-sourced events. One per partial fill; aggregate across rows with the same orderId for an order-level average.", + examples: [2500.5], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), +}).annotate({ identifier: "ProgrammaticPerpReportingEventOrderDto" }); export type PendingActionArgumentsDto = { readonly amount?: string; readonly validatorAddress?: string; @@ -6648,6 +7896,45 @@ export const GasModeValueDto = Schema.Struct({ "Custom gas properties to request transaction construction with. Can include properties like `gasPrice`, `maxGasPerFee`, etc for EVM chains.", }), }).annotate({ identifier: "GasModeValueDto" }); +export type BinanceAdditionalAddressesStakeArgumentOptionsDto = { + readonly binanceBeaconAddress: RequiredArgumentDto; +}; +export const BinanceAdditionalAddressesStakeArgumentOptionsDto = Schema.Struct({ + binanceBeaconAddress: RequiredArgumentDto, +}).annotate({ + identifier: "BinanceAdditionalAddressesStakeArgumentOptionsDto", +}); +export type CosmosAdditionalAddressesStakeArgumentOptionsDto = { + readonly cosmosPubKey: RequiredArgumentDto; +}; +export const CosmosAdditionalAddressesStakeArgumentOptionsDto = Schema.Struct({ + cosmosPubKey: RequiredArgumentDto, +}).annotate({ identifier: "CosmosAdditionalAddressesStakeArgumentOptionsDto" }); +export type TezosAdditionalAddressesStakeArgumentOptionsDto = { + readonly tezosPubKey: RequiredArgumentDto; +}; +export const TezosAdditionalAddressesStakeArgumentOptionsDto = Schema.Struct({ + tezosPubKey: RequiredArgumentDto, +}).annotate({ identifier: "TezosAdditionalAddressesStakeArgumentOptionsDto" }); +export type SolanaAdditionalAddressesStakeArgumentOptionsDto = { + readonly stakeAccounts?: RequiredArgumentDto; + readonly lidoStakeAccounts?: RequiredArgumentDto; +}; +export const SolanaAdditionalAddressesStakeArgumentOptionsDto = Schema.Struct({ + stakeAccounts: Schema.optionalKey(RequiredArgumentDto), + lidoStakeAccounts: Schema.optionalKey(RequiredArgumentDto), +}).annotate({ identifier: "SolanaAdditionalAddressesStakeArgumentOptionsDto" }); +export type AvalancheCAdditionalAddressesStakeArgumentOptionsDto = { + readonly pAddressBech: RequiredArgumentDto; + readonly cAddressBech: RequiredArgumentDto; +}; +export const AvalancheCAdditionalAddressesStakeArgumentOptionsDto = + Schema.Struct({ + pAddressBech: RequiredArgumentDto, + cAddressBech: RequiredArgumentDto, + }).annotate({ + identifier: "AvalancheCAdditionalAddressesStakeArgumentOptionsDto", + }); export type ApeNativeArgumentOptionsDto = { readonly baycId?: RequiredArgumentDto; readonly maycId?: RequiredArgumentDto; @@ -6718,102 +8005,17 @@ export const ValidatorDto = Schema.Struct({ Schema.isFinite().annotate({ expected: "a finite number" }) ) ), - subnetId: Schema.optionalKey( - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), - pricePerShare: Schema.optionalKey(Schema.String), - subnetName: Schema.optionalKey(Schema.String), - marketCap: Schema.optionalKey(Schema.String), - tokenSymbol: Schema.optionalKey(Schema.String), -}).annotate({ identifier: "ValidatorDto" }); -export type FeeConfigurationWithApyDto = { - readonly id: string; - readonly projectId: string; - readonly integrationId: string; - readonly managementFeeBps: number | null; - readonly performanceFeeBps: number | null; - readonly depositFeeBps: number | null; - readonly chargeOnFirstDepositOnly: boolean; - readonly allocatorVaultContractAddress: string | null; - readonly feeWrapperContractAddress: string | null; - readonly feeRecipientAddress: string | null; - readonly status: FeeConfigurationStatus; - readonly layerzeroOVaultConfig?: { readonly [x: string]: Schema.Json } | null; - readonly computedRewardRate: number; -}; -export const FeeConfigurationWithApyDto = Schema.Struct({ - id: Schema.String, - projectId: Schema.String, - integrationId: Schema.String, - managementFeeBps: Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - .check( - Schema.isGreaterThanOrEqualTo(1).annotate({ - expected: "a value greater than or equal to 1", - }) - ) - .check( - Schema.isLessThanOrEqualTo(10000).annotate({ - expected: "a value less than or equal to 10000", - }) - ), - Schema.Null, - ]).annotate({ examples: ["100"] }), - performanceFeeBps: Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - .check( - Schema.isGreaterThanOrEqualTo(1).annotate({ - expected: "a value greater than or equal to 1", - }) - ) - .check( - Schema.isLessThanOrEqualTo(10000).annotate({ - expected: "a value less than or equal to 10000", - }) - ), - Schema.Null, - ]).annotate({ examples: ["100"] }), - depositFeeBps: Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - .check( - Schema.isGreaterThanOrEqualTo(1).annotate({ - expected: "a value greater than or equal to 1", - }) - ) - .check( - Schema.isLessThanOrEqualTo(10000).annotate({ - expected: "a value less than or equal to 10000", - }) - ), - Schema.Null, - ]).annotate({ examples: ["100"] }), - chargeOnFirstDepositOnly: Schema.Boolean.annotate({ examples: [false] }), - allocatorVaultContractAddress: Schema.Union([Schema.String, Schema.Null]), - feeWrapperContractAddress: Schema.Union([Schema.String, Schema.Null]), - feeRecipientAddress: Schema.Union([Schema.String, Schema.Null]), - status: FeeConfigurationStatus, - layerzeroOVaultConfig: Schema.optionalKey( - Schema.Union([ - Schema.Record( - Schema.String, - Schema.Json.annotate({ expected: "JSON value" }) - ), - Schema.Null, - ]).annotate({ description: "LayerZero OVault configuration" }) - ), - computedRewardRate: Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) + subnetId: Schema.optionalKey( + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) ), -}).annotate({ identifier: "FeeConfigurationWithApyDto" }); -export type FeeConfigurationDto = { + pricePerShare: Schema.optionalKey(Schema.String), + subnetName: Schema.optionalKey(Schema.String), + marketCap: Schema.optionalKey(Schema.String), + tokenSymbol: Schema.optionalKey(Schema.String), +}).annotate({ identifier: "ValidatorDto" }); +export type FeeConfigurationWithApyDto = { readonly id: string; readonly projectId: string; readonly integrationId: string; @@ -6821,13 +8023,15 @@ export type FeeConfigurationDto = { readonly performanceFeeBps: number | null; readonly depositFeeBps: number | null; readonly chargeOnFirstDepositOnly: boolean; + readonly blueBundleOriginationFeeBps: number | null; readonly allocatorVaultContractAddress: string | null; readonly feeWrapperContractAddress: string | null; readonly feeRecipientAddress: string | null; readonly status: FeeConfigurationStatus; readonly layerzeroOVaultConfig?: { readonly [x: string]: Schema.Json } | null; + readonly computedRewardRate: number; }; -export const FeeConfigurationDto = Schema.Struct({ +export const FeeConfigurationWithApyDto = Schema.Struct({ id: Schema.String, projectId: Schema.String, integrationId: Schema.String, @@ -6846,7 +8050,7 @@ export const FeeConfigurationDto = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), + ]), performanceFeeBps: Schema.Union([ Schema.Number.check( Schema.isFinite().annotate({ expected: "a finite number" }) @@ -6862,7 +8066,7 @@ export const FeeConfigurationDto = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), + ]), depositFeeBps: Schema.Union([ Schema.Number.check( Schema.isFinite().annotate({ expected: "a finite number" }) @@ -6878,92 +8082,27 @@ export const FeeConfigurationDto = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), + ]), chargeOnFirstDepositOnly: Schema.Boolean.annotate({ examples: [false] }), - allocatorVaultContractAddress: Schema.Union([Schema.String, Schema.Null]), - feeWrapperContractAddress: Schema.Union([Schema.String, Schema.Null]), - feeRecipientAddress: Schema.Union([Schema.String, Schema.Null]), - status: FeeConfigurationStatus, - layerzeroOVaultConfig: Schema.optionalKey( - Schema.Union([ - Schema.Record( - Schema.String, - Schema.Json.annotate({ expected: "JSON value" }) - ), - Schema.Null, - ]).annotate({ description: "LayerZero OVault configuration" }) - ), -}).annotate({ identifier: "FeeConfigurationDto" }); -export type AdminFeeConfigurationDto = { - readonly id: string; - readonly projectId: string; - readonly integrationId: string; - readonly managementFeeBps: number | null; - readonly performanceFeeBps: number | null; - readonly depositFeeBps: number | null; - readonly chargeOnFirstDepositOnly: boolean; - readonly allocatorVaultContractAddress: string | null; - readonly feeWrapperContractAddress: string | null; - readonly feeRecipientAddress: string | null; - readonly status: FeeConfigurationStatus; - readonly layerzeroOVaultConfig?: { readonly [x: string]: Schema.Json } | null; - readonly teamId?: string | null; - readonly teamName?: string | null; - readonly projectName?: string | null; -}; -export const AdminFeeConfigurationDto = Schema.Struct({ - id: Schema.String, - projectId: Schema.String, - integrationId: Schema.String, - managementFeeBps: Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - .check( - Schema.isGreaterThanOrEqualTo(1).annotate({ - expected: "a value greater than or equal to 1", - }) - ) - .check( - Schema.isLessThanOrEqualTo(10000).annotate({ - expected: "a value less than or equal to 10000", - }) - ), - Schema.Null, - ]).annotate({ examples: ["100"] }), - performanceFeeBps: Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - .check( - Schema.isGreaterThanOrEqualTo(1).annotate({ - expected: "a value greater than or equal to 1", - }) - ) - .check( - Schema.isLessThanOrEqualTo(10000).annotate({ - expected: "a value less than or equal to 10000", - }) - ), - Schema.Null, - ]).annotate({ examples: ["100"] }), - depositFeeBps: Schema.Union([ + blueBundleOriginationFeeBps: Schema.Union([ Schema.Number.check( Schema.isFinite().annotate({ expected: "a finite number" }) ) .check( - Schema.isGreaterThanOrEqualTo(1).annotate({ - expected: "a value greater than or equal to 1", + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", }) ) .check( - Schema.isLessThanOrEqualTo(10000).annotate({ - expected: "a value less than or equal to 10000", + Schema.isLessThanOrEqualTo(9999).annotate({ + expected: "a value less than or equal to 9999", }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), - chargeOnFirstDepositOnly: Schema.Boolean.annotate({ examples: [false] }), + ]).annotate({ + description: + "Config-sourced Morpho BlueBundle origination fee in basis points. Used with feeRecipientAddress for supplyAndBorrow.", + }), allocatorVaultContractAddress: Schema.Union([Schema.String, Schema.Null]), feeWrapperContractAddress: Schema.Union([Schema.String, Schema.Null]), feeRecipientAddress: Schema.Union([Schema.String, Schema.Null]), @@ -6977,313 +8116,230 @@ export const AdminFeeConfigurationDto = Schema.Struct({ Schema.Null, ]).annotate({ description: "LayerZero OVault configuration" }) ), - teamId: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Team ID the project belongs to.", - }) - ), - teamName: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Team name the project belongs to.", - }) - ), - projectName: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Name of the project the fee configuration belongs to.", - }) - ), -}).annotate({ identifier: "AdminFeeConfigurationDto" }); -export type AllocationDto = { - readonly address: string; - readonly network: - | "ethereum" - | "ethereum-goerli" - | "ethereum-holesky" - | "ethereum-sepolia" - | "ethereum-hoodi" - | "arbitrum" - | "base" - | "base-sepolia" - | "gnosis" - | "optimism" - | "polygon" - | "polygon-amoy" - | "starknet" - | "zksync" - | "linea" - | "unichain" - | "plume" - | "monad-testnet" - | "monad" - | "robinhood" - | "robinhood-testnet" - | "avalanche-c" - | "avalanche-c-atomic" - | "avalanche-p" - | "binance" - | "celo" - | "fantom" - | "harmony" - | "moonriver" - | "okc" - | "viction" - | "core" - | "sonic" - | "plasma" - | "katana" - | "hyperevm" - | "tempo" - | "pharos" - | "agoric" - | "akash" - | "axelar" - | "band-protocol" - | "bitsong" - | "canto" - | "chihuahua" - | "comdex" - | "coreum" - | "cosmos" - | "crescent" - | "cronos" - | "cudos" - | "desmos" - | "dydx" - | "evmos" - | "fetch-ai" - | "gravity-bridge" - | "injective" - | "irisnet" - | "juno" - | "kava" - | "ki-network" - | "mars-protocol" - | "nym" - | "okex-chain" - | "onomy" - | "osmosis" - | "persistence" - | "quicksilver" - | "regen" - | "secret" - | "sentinel" - | "sommelier" - | "stafi" - | "stargaze" - | "stride" - | "teritori" - | "tgrade" - | "umee" - | "sei" - | "mantra" - | "celestia" - | "saga" - | "zetachain" - | "dymension" - | "humansai" - | "neutron" - | "polkadot" - | "kusama" - | "westend" - | "bittensor" - | "aptos" - | "binancebeacon" - | "cardano" - | "near" - | "solana" - | "solana-devnet" - | "stellar" - | "stellar-testnet" - | "sui" - | "tezos" - | "tron" - | "ton" - | "ton-testnet" - | "hyperliquid"; - readonly name: string; - readonly yieldId?: string; - readonly providerId?: string; - readonly allocation: string; - readonly allocationUsd: string | null; - readonly weight: number; - readonly targetWeight: number; - readonly rewardRate: AllocationRewardRateDto | null; - readonly tvl: string | null; - readonly tvlUsd: string | null; - readonly maxCapacity: string | null; - readonly remainingCapacity: string | null; + computedRewardRate: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), +}).annotate({ identifier: "FeeConfigurationWithApyDto" }); +export type FeeConfigurationDto = { + readonly id: string; + readonly projectId: string; + readonly integrationId: string; + readonly managementFeeBps: number | null; + readonly performanceFeeBps: number | null; + readonly depositFeeBps: number | null; + readonly chargeOnFirstDepositOnly: boolean; + readonly blueBundleOriginationFeeBps: number | null; + readonly allocatorVaultContractAddress: string | null; + readonly feeWrapperContractAddress: string | null; + readonly feeRecipientAddress: string | null; + readonly status: FeeConfigurationStatus; + readonly layerzeroOVaultConfig?: { readonly [x: string]: Schema.Json } | null; }; -export const AllocationDto = Schema.Struct({ - address: Schema.String.annotate({ - description: "Contract address of the underlying strategy", - examples: ["0x1234567890abcdef1234567890abcdef12345678"], +export const FeeConfigurationDto = Schema.Struct({ + id: Schema.String, + projectId: Schema.String, + integrationId: Schema.String, + managementFeeBps: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + .check( + Schema.isGreaterThanOrEqualTo(1).annotate({ + expected: "a value greater than or equal to 1", + }) + ) + .check( + Schema.isLessThanOrEqualTo(10000).annotate({ + expected: "a value less than or equal to 10000", + }) + ), + Schema.Null, + ]), + performanceFeeBps: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + .check( + Schema.isGreaterThanOrEqualTo(1).annotate({ + expected: "a value greater than or equal to 1", + }) + ) + .check( + Schema.isLessThanOrEqualTo(10000).annotate({ + expected: "a value less than or equal to 10000", + }) + ), + Schema.Null, + ]), + depositFeeBps: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + .check( + Schema.isGreaterThanOrEqualTo(1).annotate({ + expected: "a value greater than or equal to 1", + }) + ) + .check( + Schema.isLessThanOrEqualTo(10000).annotate({ + expected: "a value less than or equal to 10000", + }) + ), + Schema.Null, + ]), + chargeOnFirstDepositOnly: Schema.Boolean.annotate({ examples: [false] }), + blueBundleOriginationFeeBps: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + .check( + Schema.isLessThanOrEqualTo(9999).annotate({ + expected: "a value less than or equal to 9999", + }) + ), + Schema.Null, + ]).annotate({ + description: + "Config-sourced Morpho BlueBundle origination fee in basis points. Used with feeRecipientAddress for supplyAndBorrow.", }), - network: Schema.Literals([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "plume", - "monad-testnet", - "monad", - "robinhood", - "robinhood-testnet", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "tempo", - "pharos", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "aptos", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", + allocatorVaultContractAddress: Schema.Union([Schema.String, Schema.Null]), + feeWrapperContractAddress: Schema.Union([Schema.String, Schema.Null]), + feeRecipientAddress: Schema.Union([Schema.String, Schema.Null]), + status: FeeConfigurationStatus, + layerzeroOVaultConfig: Schema.optionalKey( + Schema.Union([ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), + Schema.Null, + ]).annotate({ description: "LayerZero OVault configuration" }) + ), +}).annotate({ identifier: "FeeConfigurationDto" }); +export type AdminFeeConfigurationDto = { + readonly id: string; + readonly projectId: string; + readonly integrationId: string; + readonly managementFeeBps: number | null; + readonly performanceFeeBps: number | null; + readonly depositFeeBps: number | null; + readonly chargeOnFirstDepositOnly: boolean; + readonly blueBundleOriginationFeeBps: number | null; + readonly allocatorVaultContractAddress: string | null; + readonly feeWrapperContractAddress: string | null; + readonly feeRecipientAddress: string | null; + readonly status: FeeConfigurationStatus; + readonly layerzeroOVaultConfig?: { readonly [x: string]: Schema.Json } | null; + readonly teamId?: string | null; + readonly teamName?: string | null; + readonly projectName?: string | null; +}; +export const AdminFeeConfigurationDto = Schema.Struct({ + id: Schema.String, + projectId: Schema.String, + integrationId: Schema.String, + managementFeeBps: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + .check( + Schema.isGreaterThanOrEqualTo(1).annotate({ + expected: "a value greater than or equal to 1", + }) + ) + .check( + Schema.isLessThanOrEqualTo(10000).annotate({ + expected: "a value less than or equal to 10000", + }) + ), + Schema.Null, + ]), + performanceFeeBps: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + .check( + Schema.isGreaterThanOrEqualTo(1).annotate({ + expected: "a value greater than or equal to 1", + }) + ) + .check( + Schema.isLessThanOrEqualTo(10000).annotate({ + expected: "a value less than or equal to 10000", + }) + ), + Schema.Null, + ]), + depositFeeBps: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + .check( + Schema.isGreaterThanOrEqualTo(1).annotate({ + expected: "a value greater than or equal to 1", + }) + ) + .check( + Schema.isLessThanOrEqualTo(10000).annotate({ + expected: "a value less than or equal to 10000", + }) + ), + Schema.Null, + ]), + chargeOnFirstDepositOnly: Schema.Boolean.annotate({ examples: [false] }), + blueBundleOriginationFeeBps: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + .check( + Schema.isLessThanOrEqualTo(9999).annotate({ + expected: "a value less than or equal to 9999", + }) + ), + Schema.Null, ]).annotate({ - description: "Network the underlying strategy is on", - examples: ["base"], - }), - name: Schema.String.annotate({ - description: "Display name of the underlying strategy", - examples: ["Morpho Moonwell USDC"], + description: + "Config-sourced Morpho BlueBundle origination fee in basis points. Used with feeRecipientAddress for supplyAndBorrow.", }), - yieldId: Schema.optionalKey( - Schema.String.annotate({ - description: - "Yield ID if this strategy is supported as a separate yield opportunity", - examples: ["base-usdc-morpho-moonwell-usdc"], + allocatorVaultContractAddress: Schema.Union([Schema.String, Schema.Null]), + feeWrapperContractAddress: Schema.Union([Schema.String, Schema.Null]), + feeRecipientAddress: Schema.Union([Schema.String, Schema.Null]), + status: FeeConfigurationStatus, + layerzeroOVaultConfig: Schema.optionalKey( + Schema.Union([ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), + Schema.Null, + ]).annotate({ description: "LayerZero OVault configuration" }) + ), + teamId: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Team ID the project belongs to.", }) ), - providerId: Schema.optionalKey( - Schema.String.annotate({ - description: "Provider ID for this strategy (e.g., morpho, aave, lido)", - examples: ["morpho"], + teamName: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Team name the project belongs to.", }) ), - allocation: Schema.String.annotate({ - description: "Amount allocated to this strategy in input token units", - examples: ["50000.00"], - }), - allocationUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "USD value of the allocation", - examples: ["50000.00"], - }), - weight: Schema.Number.annotate({ - description: "Current weight of this strategy as a percentage (0-100)", - examples: [50.5], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - targetWeight: Schema.Number.annotate({ - description: "Target weight of this strategy as a percentage (0-100)", - examples: [50], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - rewardRate: Schema.Union([ - Schema.suspend( - (): Schema.Codec => AllocationRewardRateDto - ).annotate({ description: "Reward rate of the underlying strategy" }), - Schema.Null, - ]), - tvl: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Total value locked in the underlying strategy in input token units", - examples: ["500.25"], - }), - tvlUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Total value locked in USD for the underlying strategy", - examples: ["10000000.00"], - }), - maxCapacity: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Maximum capacity of the underlying strategy", - examples: ["1000000.00"], - }), - remainingCapacity: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Remaining capacity in the underlying strategy", - examples: ["500000.00"], - }), -}).annotate({ identifier: "AllocationDto" }); + projectName: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Name of the project the fee configuration belongs to.", + }) + ), +}).annotate({ identifier: "AdminFeeConfigurationDto" }); export type OAVResponseDto = { readonly id: string; readonly integrationId: string | null; @@ -7387,6 +8443,7 @@ export type CreateOAVDto = { }; export const CreateOAVDto = Schema.Struct({ network: Schema.suspend((): Schema.Codec => Networks).annotate({ + description: "Network of the OAV", examples: ["ethereum"], }), inputTokenAddress: Schema.optionalKey( @@ -7475,7 +8532,9 @@ export type PendingActionConstraintDto = { readonly amount?: PendingActionConstraintAmountDto; }; export const PendingActionConstraintDto = Schema.Struct({ - type: ActionTypes, + type: Schema.suspend((): Schema.Codec => ActionTypes).annotate({ + description: "The pending action type", + }), amount: Schema.optionalKey(PendingActionConstraintAmountDto), }).annotate({ identifier: "PendingActionConstraintDto" }); export type PaginatedBalanceTransferEventDto = { @@ -7513,7 +8572,7 @@ export type StakeViewSuccessDto = { | "deactivated" | "deactivating"; readonly commission: "Net"; - readonly rewards: ReadonlyArray<{}>; + readonly rewards: ReadonlyArray<{ readonly [x: string]: Schema.Json }>; readonly details: | EthDeFiDetailsViewDto | AdaDetailsViewDto @@ -7564,9 +8623,12 @@ export const StakeViewSuccessDto = Schema.Struct({ commission: Schema.Literal("Net").annotate({ description: "The commission type", }), - rewards: Schema.Array(Schema.Struct({})).annotate({ - description: "Rewards information", - }), + rewards: Schema.Array( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ).annotate({ description: "Rewards information" }), details: Schema.Union( [ EthDeFiDetailsViewDto, @@ -7611,7 +8673,7 @@ export type SsoConfigResponseDto = { readonly entryPoint?: string | null; readonly certificate?: string | null; readonly clientId?: string | null; - readonly attributeMapping: {}; + readonly attributeMapping: { readonly [x: string]: Schema.Json }; readonly enabled: boolean; readonly enforced: boolean; readonly jitDefaultRole: Role; @@ -7629,7 +8691,10 @@ export const SsoConfigResponseDto = Schema.Struct({ entryPoint: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), certificate: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - attributeMapping: Schema.Struct({}), + attributeMapping: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), enabled: Schema.Boolean, enforced: Schema.Boolean, jitDefaultRole: Role, @@ -7651,9 +8716,9 @@ export const SsoConfigResponseDto = Schema.Struct({ export type UpsertSsoConfigDto = { readonly protocol: "saml" | "oidc"; readonly issuer: string; - readonly entryPoint?: {}; - readonly certificate?: {}; - readonly clientId?: {}; + readonly entryPoint?: { readonly [x: string]: Schema.Json }; + readonly certificate?: { readonly [x: string]: Schema.Json }; + readonly clientId?: { readonly [x: string]: Schema.Json }; readonly clientSecret?: string; readonly attributeMapping?: SsoAttributeMappingDto; readonly enabled?: boolean; @@ -7666,19 +8731,22 @@ export const UpsertSsoConfigDto = Schema.Struct({ protocol: Schema.Literals(["saml", "oidc"]), issuer: Schema.String.annotate({ examples: ["https://accounts.google.com"] }), entryPoint: Schema.optionalKey( - Schema.Struct({}).annotate({ - examples: ["https://accounts.google.com/o/saml2/idp?idpid=xxx"], - }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) ), certificate: Schema.optionalKey( - Schema.Struct({}).annotate({ - description: "IdP X.509 certificate (PEM format) for SAML", - }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "IdP X.509 certificate (PEM format) for SAML" }) ), clientId: Schema.optionalKey( - Schema.Struct({}).annotate({ - examples: ["your-client-id.apps.googleusercontent.com"], - }) + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) ), clientSecret: Schema.optionalKey( Schema.String.annotate({ @@ -7744,112 +8812,222 @@ export const MfaWebauthnRegistrationOptionsResponseDto = Schema.Struct({ timeout: Schema.Number.annotate({ description: "Milliseconds" }).check( Schema.isFinite().annotate({ expected: "a finite number" }) ), - attestation: Schema.Literals(["none", "indirect", "direct", "enterprise"]), - excludeCredentials: Schema.optionalKey( - Schema.Array(MfaWebauthnPublicKeyDescriptorDto) + attestation: Schema.Literals(["none", "indirect", "direct", "enterprise"]), + excludeCredentials: Schema.optionalKey( + Schema.Array(MfaWebauthnPublicKeyDescriptorDto) + ), + authenticatorSelection: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Authenticator selection criteria" }) + ), + extensions: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + hints: Schema.optionalKey(Schema.Array(Schema.String)), +}).annotate({ identifier: "MfaWebauthnRegistrationOptionsResponseDto" }); +export type MfaWebauthnAuthenticationOptionsResponseDto = { + readonly challenge: string; + readonly timeout?: number; + readonly rpId?: string; + readonly allowCredentials: ReadonlyArray; + readonly userVerification: "required" | "preferred" | "discouraged"; + readonly extensions?: { readonly [x: string]: Schema.Json }; + readonly hints?: ReadonlyArray; +}; +export const MfaWebauthnAuthenticationOptionsResponseDto = Schema.Struct({ + challenge: Schema.String, + timeout: Schema.optionalKey( + Schema.Number.annotate({ description: "Milliseconds" }).check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + ), + rpId: Schema.optionalKey( + Schema.String.annotate({ description: "Relying party id" }) + ), + allowCredentials: Schema.Array(MfaWebauthnPublicKeyDescriptorDto), + userVerification: Schema.Literals(["required", "preferred", "discouraged"]), + extensions: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + hints: Schema.optionalKey(Schema.Array(Schema.String)), +}).annotate({ identifier: "MfaWebauthnAuthenticationOptionsResponseDto" }); +export type ValidatorAdminDto = { + readonly id: string; + readonly integrationId: string; + readonly address: string; + readonly status: ValidatorStatusTypes; + readonly lastFoundAt?: { readonly [x: string]: Schema.Json }; + readonly provider?: ValidatorProviderDto; + readonly providerId?: { readonly [x: string]: Schema.Json }; + readonly name?: { readonly [x: string]: Schema.Json }; + readonly nameOverride?: { readonly [x: string]: Schema.Json }; + readonly website?: { readonly [x: string]: Schema.Json }; + readonly websiteOverride?: { readonly [x: string]: Schema.Json }; + readonly image?: { readonly [x: string]: Schema.Json }; + readonly imageOverride?: { readonly [x: string]: Schema.Json }; + readonly apr?: { readonly [x: string]: Schema.Json }; + readonly aprOverride?: { readonly [x: string]: Schema.Json }; + readonly commission?: { readonly [x: string]: Schema.Json }; + readonly commissionOverride?: { readonly [x: string]: Schema.Json }; + readonly mevCommission?: { readonly [x: string]: Schema.Json }; + readonly mevCommissionOverride?: { readonly [x: string]: Schema.Json }; + readonly stakedBalance?: { readonly [x: string]: Schema.Json }; + readonly votingPower?: { readonly [x: string]: Schema.Json }; + readonly remainingPossibleStake?: { readonly [x: string]: Schema.Json }; + readonly minimumStake?: { readonly [x: string]: Schema.Json }; + readonly remainingSlots?: { readonly [x: string]: Schema.Json }; + readonly endDate?: { readonly [x: string]: Schema.Json }; + readonly nominatorCount?: { readonly [x: string]: Schema.Json }; + readonly subnetId?: { readonly [x: string]: Schema.Json }; + readonly createdAt: string; + readonly updatedAt: string; +}; +export const ValidatorAdminDto = Schema.Struct({ + id: Schema.String, + integrationId: Schema.String, + address: Schema.String, + status: ValidatorStatusTypes, + lastFoundAt: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + provider: Schema.optionalKey(ValidatorProviderDto), + providerId: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + name: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + nameOverride: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + website: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + websiteOverride: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + image: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + imageOverride: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + apr: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + aprOverride: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + commission: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + commissionOverride: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + mevCommission: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) ), - authenticatorSelection: Schema.optionalKey( + mevCommissionOverride: Schema.optionalKey( Schema.Record( Schema.String, Schema.Json.annotate({ expected: "JSON value" }) - ).annotate({ description: "Authenticator selection criteria" }) + ) ), - extensions: Schema.optionalKey( + stakedBalance: Schema.optionalKey( Schema.Record( Schema.String, Schema.Json.annotate({ expected: "JSON value" }) ) ), - hints: Schema.optionalKey(Schema.Array(Schema.String)), -}).annotate({ identifier: "MfaWebauthnRegistrationOptionsResponseDto" }); -export type MfaWebauthnAuthenticationOptionsResponseDto = { - readonly challenge: string; - readonly timeout?: number; - readonly rpId?: string; - readonly allowCredentials: ReadonlyArray; - readonly userVerification: "required" | "preferred" | "discouraged"; - readonly extensions?: { readonly [x: string]: Schema.Json }; - readonly hints?: ReadonlyArray; -}; -export const MfaWebauthnAuthenticationOptionsResponseDto = Schema.Struct({ - challenge: Schema.String, - timeout: Schema.optionalKey( - Schema.Number.annotate({ description: "Milliseconds" }).check( - Schema.isFinite().annotate({ expected: "a finite number" }) + votingPower: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) ) ), - rpId: Schema.optionalKey( - Schema.String.annotate({ description: "Relying party id" }) + remainingPossibleStake: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) ), - allowCredentials: Schema.Array(MfaWebauthnPublicKeyDescriptorDto), - userVerification: Schema.Literals(["required", "preferred", "discouraged"]), - extensions: Schema.optionalKey( + minimumStake: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + remainingSlots: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + endDate: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + nominatorCount: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + subnetId: Schema.optionalKey( Schema.Record( Schema.String, Schema.Json.annotate({ expected: "JSON value" }) ) ), - hints: Schema.optionalKey(Schema.Array(Schema.String)), -}).annotate({ identifier: "MfaWebauthnAuthenticationOptionsResponseDto" }); -export type ValidatorAdminDto = { - readonly id: string; - readonly integrationId: string; - readonly address: string; - readonly status: ValidatorStatusTypes; - readonly lastFoundAt?: {}; - readonly provider?: ValidatorProviderDto; - readonly providerId?: {}; - readonly name?: {}; - readonly nameOverride?: {}; - readonly website?: {}; - readonly websiteOverride?: {}; - readonly image?: {}; - readonly imageOverride?: {}; - readonly apr?: {}; - readonly aprOverride?: {}; - readonly commission?: {}; - readonly commissionOverride?: {}; - readonly mevCommission?: {}; - readonly mevCommissionOverride?: {}; - readonly stakedBalance?: {}; - readonly votingPower?: {}; - readonly remainingPossibleStake?: {}; - readonly minimumStake?: {}; - readonly remainingSlots?: {}; - readonly endDate?: {}; - readonly nominatorCount?: {}; - readonly subnetId?: {}; - readonly createdAt: string; - readonly updatedAt: string; -}; -export const ValidatorAdminDto = Schema.Struct({ - id: Schema.String, - integrationId: Schema.String, - address: Schema.String, - status: ValidatorStatusTypes, - lastFoundAt: Schema.optionalKey(Schema.Struct({})), - provider: Schema.optionalKey(ValidatorProviderDto), - providerId: Schema.optionalKey(Schema.Struct({})), - name: Schema.optionalKey(Schema.Struct({})), - nameOverride: Schema.optionalKey(Schema.Struct({})), - website: Schema.optionalKey(Schema.Struct({})), - websiteOverride: Schema.optionalKey(Schema.Struct({})), - image: Schema.optionalKey(Schema.Struct({})), - imageOverride: Schema.optionalKey(Schema.Struct({})), - apr: Schema.optionalKey(Schema.Struct({})), - aprOverride: Schema.optionalKey(Schema.Struct({})), - commission: Schema.optionalKey(Schema.Struct({})), - commissionOverride: Schema.optionalKey(Schema.Struct({})), - mevCommission: Schema.optionalKey(Schema.Struct({})), - mevCommissionOverride: Schema.optionalKey(Schema.Struct({})), - stakedBalance: Schema.optionalKey(Schema.Struct({})), - votingPower: Schema.optionalKey(Schema.Struct({})), - remainingPossibleStake: Schema.optionalKey(Schema.Struct({})), - minimumStake: Schema.optionalKey(Schema.Struct({})), - remainingSlots: Schema.optionalKey(Schema.Struct({})), - endDate: Schema.optionalKey(Schema.Struct({})), - nominatorCount: Schema.optionalKey(Schema.Struct({})), - subnetId: Schema.optionalKey(Schema.Struct({})), createdAt: Schema.String.annotate({ format: "date-time" }), updatedAt: Schema.String.annotate({ format: "date-time" }), }).annotate({ identifier: "ValidatorAdminDto" }); @@ -7895,6 +9073,27 @@ export type MfaRecoverResponseDto = { readonly user: UserDto }; export const MfaRecoverResponseDto = Schema.Struct({ user: UserDto }).annotate({ identifier: "MfaRecoverResponseDto", }); +export type PaginatedWindowAccrualSummaryDto = { + readonly total: number; + readonly offset: number; + readonly limit: number; + readonly items: ReadonlyArray; +}; +export const PaginatedWindowAccrualSummaryDto = Schema.Struct({ + total: Schema.Number.annotate({ + description: "Total number of items available", + examples: [100], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + offset: Schema.Number.annotate({ + description: "Offset of the current page", + examples: [0], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + limit: Schema.Number.annotate({ + description: "Limit of the current page", + examples: [20], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + items: Schema.Array(WindowAccrualSummaryDto), +}).annotate({ identifier: "PaginatedWindowAccrualSummaryDto" }); export type CampaignSafeBalanceDto = { readonly safeAddress: string; readonly network: Networks; @@ -7941,22 +9140,72 @@ export const CampaignV2SafeBalanceDto = Schema.Struct({ format: "date-time", }), }).annotate({ identifier: "CampaignV2SafeBalanceDto" }); -export type GasEstimateDto = { - readonly amount: string | null; - readonly token: TokenDto; - readonly gasLimit?: string; +export type TransactionDto = { + readonly id: string; + readonly network: Networks; + readonly status: TransactionStatus; + readonly type: TransactionType; + readonly hash: string | null; + readonly createdAt: string; + readonly broadcastedAt: string | null; + readonly signedTransaction: string | null; + readonly unsignedTransaction: string | null; + readonly structuredTransaction: StructuredTransactionTronDto; + readonly annotatedTransaction: { + readonly fields: ReadonlyArray; + }; + readonly stepIndex: number; + readonly error: string | null; + readonly gasEstimate: { + readonly amount: string | null; + readonly token: TokenDto; + readonly gasLimit?: string; + }; + readonly stakeId: string; + readonly explorerUrl: string | null; + readonly ledgerHwAppId: string | null; + readonly isMessage: boolean; + readonly accountAddresses?: ReadonlyArray; }; -export const GasEstimateDto = Schema.Struct({ - amount: Schema.Union([Schema.String, Schema.Null]), - token: TokenDto, - gasLimit: Schema.optionalKey(Schema.String), -}).annotate({ identifier: "GasEstimateDto" }); +export const TransactionDto = Schema.Struct({ + id: Schema.String, + network: Networks, + status: TransactionStatus, + type: TransactionType, + hash: Schema.Union([Schema.String, Schema.Null]), + createdAt: Schema.String.annotate({ format: "date-time" }), + broadcastedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ + format: "date-time", + }), + signedTransaction: Schema.Union([Schema.String, Schema.Null]), + unsignedTransaction: Schema.Union([Schema.String, Schema.Null]), + structuredTransaction: Schema.Union([StructuredTransactionTronDto], { + mode: "oneOf", + }), + annotatedTransaction: Schema.Struct({ + fields: Schema.Array(AnnotatedFieldDto), + }), + stepIndex: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + error: Schema.Union([Schema.String, Schema.Null]), + gasEstimate: Schema.Struct({ + amount: Schema.Union([Schema.String, Schema.Null]), + token: TokenDto, + gasLimit: Schema.optionalKey(Schema.String), + }), + stakeId: Schema.String, + explorerUrl: Schema.Union([Schema.String, Schema.Null]), + ledgerHwAppId: Schema.Union([Schema.String, Schema.Null]), + isMessage: Schema.Boolean, + accountAddresses: Schema.optionalKey(Schema.Array(Schema.String)), +}).annotate({ identifier: "TransactionDto" }); export type TransactionGasEstimateDto = { readonly amount: string | null; readonly token: TokenDto; readonly gasLimit?: string; readonly stepIndex: number; - readonly type: TransactionType | null; + readonly type: TransactionType; }; export const TransactionGasEstimateDto = Schema.Struct({ amount: Schema.Union([Schema.String, Schema.Null]), @@ -7965,7 +9214,7 @@ export const TransactionGasEstimateDto = Schema.Struct({ stepIndex: Schema.Number.check( Schema.isFinite().annotate({ expected: "a finite number" }) ), - type: Schema.Union([TransactionType, Schema.Null]), + type: TransactionType, }).annotate({ identifier: "TransactionGasEstimateDto" }); export type ActionArgumentsDto = { readonly amount: string; @@ -8100,16 +9349,57 @@ export const YieldRewardsSummaryResponseDto = Schema.Struct({ rewards: YieldRewardsSummaryDto, token: TokenDto, }).annotate({ identifier: "YieldRewardsSummaryResponseDto" }); -export type AddressArgumentsDto = { - readonly address?: RequiredArgumentWithNetworkDto; - readonly additionalAddresses?: ReadonlyArray; +export type RequestPayoutDto = { + readonly periodMonth: string; + readonly addressesConfirmed: boolean; + readonly payoutAddresses?: ReadonlyArray; }; -export const AddressArgumentsDto = Schema.Struct({ - address: Schema.optionalKey(RequiredArgumentWithNetworkDto), - additionalAddresses: Schema.optionalKey( - Schema.Array(BinanceAdditionalAddressesStakeArgumentOptionsDto) +export const RequestPayoutDto = Schema.Struct({ + periodMonth: Schema.String.annotate({ + description: "Completed calendar month (YYYY-MM)", + examples: ["2026-07"], + }), + addressesConfirmed: Schema.Boolean.annotate({ + description: + "Must be true. Confirms the client reviewed the payout destinations (stored and/or provided in payoutAddresses).", + }), + payoutAddresses: Schema.optionalKey( + Schema.Array(RequestPayoutAddressDto).annotate({ + description: + "Optional one-shot supply/override of payout destinations for this request. Snapshotted onto items only — not written to Settings.", + }) ), -}).annotate({ identifier: "AddressArgumentsDto" }); +}).annotate({ identifier: "RequestPayoutDto" }); +export type PayoutRequestDto = { + readonly payoutRequestId: string; + readonly status: PayoutRequestStatus; + readonly periodMonth: string; + readonly projectId: string; + readonly usdAmountEstimated: string; + readonly payoutAddress: string | null; + readonly completionDate: string; + readonly createdAt: string; + readonly items: ReadonlyArray; +}; +export const PayoutRequestDto = Schema.Struct({ + payoutRequestId: Schema.String, + status: PayoutRequestStatus, + periodMonth: Schema.String.annotate({ examples: ["2026-07"] }), + projectId: Schema.String.annotate({ + description: "Project this payout request is scoped to", + }), + usdAmountEstimated: Schema.String.annotate({ + description: + "Total estimated USD across all items (accrual-time snapshot). Not the final off-ramp amount — that is recorded later as usdAmountPaid by RevOps.", + }), + payoutAddress: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Primary resolved payout address (first non-null item address)", + }), + completionDate: Schema.String.annotate({ format: "date-time" }), + createdAt: Schema.String.annotate({ format: "date-time" }), + items: Schema.Array(PayoutRequestItemDto), +}).annotate({ identifier: "PayoutRequestDto" }); export type CampaignDto = { readonly id: string; readonly name?: string | null; @@ -8145,7 +9435,12 @@ export const CampaignDto = Schema.Struct({ rewardToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ description: "Campaign reward token.", }), - rewardMode: CampaignRewardMode, + rewardMode: Schema.suspend( + (): Schema.Codec => CampaignRewardMode + ).annotate({ + description: + "Compound requires rewardToken to differ from the yield input token.", + }), safeAddress: Schema.String, totalBudget: Schema.String, distributedBudget: Schema.String, @@ -8172,7 +9467,12 @@ export const CampaignDto = Schema.Struct({ examples: [0.125], }) ), - budgetSpendStrategy: CampaignBudgetSpendStrategy, + budgetSpendStrategy: Schema.suspend( + (): Schema.Codec => CampaignBudgetSpendStrategy + ).annotate({ + description: + "Controls how unspent hourly budget is handled. spend_full_budget redistributes carry-forward across remaining hours; allow_underspend uses a fixed rate and may leave unspent budget at campaign end.", + }), qualificationConfig: CampaignQualificationConfigDto, pausedBy: Schema.optionalKey( Schema.Union([Schema.String, Schema.Null]).annotate({ format: "uuid" }) @@ -8206,7 +9506,15 @@ export const CreateCampaignWithSafeAddressDto = Schema.Struct({ rewardToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ description: "Campaign reward token.", }), - rewardMode: Schema.optionalKey(CampaignRewardMode), + rewardMode: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => CampaignRewardMode + ).annotate({ + description: + "Compound requires rewardToken to differ from the yield input token.", + default: "compound", + }) + ), totalBudget: Schema.String.annotate({ examples: ["10000"] }), apyCeiling: Schema.optionalKey( Schema.Union([ @@ -8226,8 +9534,21 @@ export const CreateCampaignWithSafeAddressDto = Schema.Struct({ (): Schema.Codec => CampaignPayoutFrequency ).annotate({ examples: ["weekly"] }), qualificationConfig: CampaignQualificationConfigDto, - budgetSpendStrategy: Schema.optionalKey(CampaignBudgetSpendStrategy), - status: Schema.optionalKey(CampaignStatus), + budgetSpendStrategy: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => + CampaignBudgetSpendStrategy + ).annotate({ + description: + "Controls how unspent hourly budget is handled. spend_full_budget redistributes carry-forward across remaining hours; allow_underspend uses a fixed rate and may leave unspent budget at campaign end.", + default: "allow_underspend", + }) + ), + status: Schema.optionalKey( + Schema.suspend((): Schema.Codec => CampaignStatus).annotate( + { default: "draft" } + ) + ), safeAddress: Schema.String, }).annotate({ identifier: "CreateCampaignWithSafeAddressDto" }); export type UpdateCampaignDto = { @@ -8253,7 +9574,14 @@ export const UpdateCampaignDto = Schema.Struct({ description: "Campaign reward token.", }) ), - rewardMode: Schema.optionalKey(CampaignRewardMode), + rewardMode: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => CampaignRewardMode + ).annotate({ + description: + "Compound requires rewardToken to differ from the yield input token.", + }) + ), safeAddress: Schema.optionalKey(Schema.String), totalBudget: Schema.optionalKey(Schema.String), apyCeiling: Schema.optionalKey( @@ -8274,7 +9602,15 @@ export const UpdateCampaignDto = Schema.Struct({ endTime: Schema.optionalKey(Schema.String.annotate({ format: "date-time" })), payoutFrequency: Schema.optionalKey(CampaignPayoutFrequency), qualificationConfig: Schema.optionalKey(CampaignQualificationConfigDto), - budgetSpendStrategy: Schema.optionalKey(CampaignBudgetSpendStrategy), + budgetSpendStrategy: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => + CampaignBudgetSpendStrategy + ).annotate({ + description: + "Controls how unspent hourly budget is handled. spend_full_budget redistributes carry-forward across remaining hours; allow_underspend uses a fixed rate and may leave unspent budget at campaign end.", + }) + ), status: Schema.optionalKey(CampaignStatus), }).annotate({ identifier: "UpdateCampaignDto" }); export type CreateCampaignDto = { @@ -8297,7 +9633,15 @@ export const CreateCampaignDto = Schema.Struct({ rewardToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ description: "Campaign reward token.", }), - rewardMode: Schema.optionalKey(CampaignRewardMode), + rewardMode: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => CampaignRewardMode + ).annotate({ + description: + "Compound requires rewardToken to differ from the yield input token.", + default: "compound", + }) + ), totalBudget: Schema.String.annotate({ examples: ["10000"] }), apyCeiling: Schema.optionalKey( Schema.Union([ @@ -8317,8 +9661,21 @@ export const CreateCampaignDto = Schema.Struct({ (): Schema.Codec => CampaignPayoutFrequency ).annotate({ examples: ["weekly"] }), qualificationConfig: CampaignQualificationConfigDto, - budgetSpendStrategy: Schema.optionalKey(CampaignBudgetSpendStrategy), - status: Schema.optionalKey(CampaignStatus), + budgetSpendStrategy: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => + CampaignBudgetSpendStrategy + ).annotate({ + description: + "Controls how unspent hourly budget is handled. spend_full_budget redistributes carry-forward across remaining hours; allow_underspend uses a fixed rate and may leave unspent budget at campaign end.", + default: "allow_underspend", + }) + ), + status: Schema.optionalKey( + Schema.suspend((): Schema.Codec => CampaignStatus).annotate( + { default: "draft" } + ) + ), }).annotate({ identifier: "CreateCampaignDto" }); export type AdminCampaignDto = { readonly id: string; @@ -8356,7 +9713,12 @@ export const AdminCampaignDto = Schema.Struct({ rewardToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ description: "Campaign reward token.", }), - rewardMode: CampaignRewardMode, + rewardMode: Schema.suspend( + (): Schema.Codec => CampaignRewardMode + ).annotate({ + description: + "Compound requires rewardToken to differ from the yield input token.", + }), safeAddress: Schema.String, totalBudget: Schema.String, distributedBudget: Schema.String, @@ -8383,7 +9745,12 @@ export const AdminCampaignDto = Schema.Struct({ examples: [0.125], }) ), - budgetSpendStrategy: CampaignBudgetSpendStrategy, + budgetSpendStrategy: Schema.suspend( + (): Schema.Codec => CampaignBudgetSpendStrategy + ).annotate({ + description: + "Controls how unspent hourly budget is handled. spend_full_budget redistributes carry-forward across remaining hours; allow_underspend uses a fixed rate and may leave unspent budget at campaign end.", + }), qualificationConfig: CampaignQualificationConfigDto, pausedBy: Schema.optionalKey( Schema.Union([Schema.String, Schema.Null]).annotate({ format: "uuid" }) @@ -8430,7 +9797,15 @@ export const CreateCampaignV2Dto = Schema.Struct({ rewardToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ description: "Campaign reward token.", }), - rewardMode: Schema.optionalKey(CampaignRewardMode), + rewardMode: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => CampaignRewardMode + ).annotate({ + description: + "Compound requires rewardToken to differ from the yield input token.", + default: "compound", + }) + ), totalBudget: Schema.String.annotate({ examples: ["10000"] }), apyCeiling: Schema.optionalKey( Schema.Union([ @@ -8440,19 +9815,41 @@ export const CreateCampaignV2Dto = Schema.Struct({ Schema.Null, ]).annotate({ description: - "Optional APY ceiling as a decimal rate, where 0.125 = 12.5%.", - examples: [0.125], + "Optional APY ceiling as a decimal rate, where 0.125 = 12.5%.", + examples: [0.125], + }) + ), + startTime: Schema.String.annotate({ format: "date-time" }), + endTime: Schema.String.annotate({ format: "date-time" }), + payoutFrequency: Schema.suspend( + (): Schema.Codec => CampaignPayoutFrequency + ).annotate({ examples: ["weekly"] }), + qualificationConfig: CampaignV2QualificationConfigDto, + budgetSpendStrategy: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => + CampaignBudgetSpendStrategy + ).annotate({ + description: + "Controls how unspent budget is handled. spend_full_budget redistributes carry-forward across the remaining campaign duration; allow_underspend uses a fixed rate and may leave unspent budget at campaign end.", + default: "allow_underspend", + }) + ), + blacklistBudgetHandling: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => + CampaignBlacklistBudgetHandling + ).annotate({ + description: + "Controls what happens to an excluded address's accrued share. reserve holds it so it stays payable if the exclusion is lifted; redistribute spreads it across the remaining eligible recipients.", + default: "reserve", }) ), - startTime: Schema.String.annotate({ format: "date-time" }), - endTime: Schema.String.annotate({ format: "date-time" }), - payoutFrequency: Schema.suspend( - (): Schema.Codec => CampaignPayoutFrequency - ).annotate({ examples: ["weekly"] }), - qualificationConfig: CampaignV2QualificationConfigDto, - budgetSpendStrategy: Schema.optionalKey(CampaignBudgetSpendStrategy), - blacklistBudgetHandling: Schema.optionalKey(CampaignBlacklistBudgetHandling), - status: Schema.optionalKey(CampaignStatus), + status: Schema.optionalKey( + Schema.suspend((): Schema.Codec => CampaignStatus).annotate( + { default: "draft" } + ) + ), }).annotate({ identifier: "CreateCampaignV2Dto" }); export type UpdateCampaignV2Dto = { readonly yieldId?: string; @@ -8486,7 +9883,14 @@ export const UpdateCampaignV2Dto = Schema.Struct({ description: "Campaign reward token.", }) ), - rewardMode: Schema.optionalKey(CampaignRewardMode), + rewardMode: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => CampaignRewardMode + ).annotate({ + description: + "Compound requires rewardToken to differ from the yield input token.", + }) + ), safeAddress: Schema.optionalKey(Schema.String), totalBudget: Schema.optionalKey(Schema.String), apyCeiling: Schema.optionalKey( @@ -8507,8 +9911,24 @@ export const UpdateCampaignV2Dto = Schema.Struct({ endTime: Schema.optionalKey(Schema.String.annotate({ format: "date-time" })), payoutFrequency: Schema.optionalKey(CampaignPayoutFrequency), qualificationConfig: Schema.optionalKey(CampaignV2QualificationConfigDto), - budgetSpendStrategy: Schema.optionalKey(CampaignBudgetSpendStrategy), - blacklistBudgetHandling: Schema.optionalKey(CampaignBlacklistBudgetHandling), + budgetSpendStrategy: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => + CampaignBudgetSpendStrategy + ).annotate({ + description: + "Controls how unspent budget is handled. spend_full_budget redistributes carry-forward across the remaining campaign duration; allow_underspend uses a fixed rate and may leave unspent budget at campaign end.", + }) + ), + blacklistBudgetHandling: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => + CampaignBlacklistBudgetHandling + ).annotate({ + description: + "Controls what happens to an excluded address's accrued share. reserve holds it so it stays payable if the exclusion is lifted; redistribute spreads it across the remaining eligible recipients.", + }) + ), status: Schema.optionalKey(CampaignStatus), }).annotate({ identifier: "UpdateCampaignV2Dto" }); export type CampaignV2Dto = { @@ -8554,7 +9974,12 @@ export const CampaignV2Dto = Schema.Struct({ rewardToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ description: "Campaign reward token.", }), - rewardMode: CampaignRewardMode, + rewardMode: Schema.suspend( + (): Schema.Codec => CampaignRewardMode + ).annotate({ + description: + "Compound requires rewardToken to differ from the yield input token.", + }), safeAddress: Schema.String, totalBudget: Schema.String, distributedBudget: Schema.String, @@ -8583,8 +10008,19 @@ export const CampaignV2Dto = Schema.Struct({ examples: [0.125], }) ), - budgetSpendStrategy: CampaignBudgetSpendStrategy, - blacklistBudgetHandling: CampaignBlacklistBudgetHandling, + budgetSpendStrategy: Schema.suspend( + (): Schema.Codec => CampaignBudgetSpendStrategy + ).annotate({ + description: + "Controls how unspent budget is handled. spend_full_budget redistributes carry-forward across the remaining campaign duration; allow_underspend uses a fixed rate and may leave unspent budget at campaign end.", + }), + blacklistBudgetHandling: Schema.suspend( + (): Schema.Codec => + CampaignBlacklistBudgetHandling + ).annotate({ + description: + "Controls what happens to an excluded address's accrued share. reserve holds it so it stays payable if the exclusion is lifted; redistribute spreads it across the remaining eligible recipients.", + }), qualificationConfig: CampaignV2QualificationConfigDto, pausedBy: Schema.optionalKey( Schema.Union([Schema.String, Schema.Null]).annotate({ format: "uuid" }) @@ -8627,7 +10063,15 @@ export const CreateCampaignV2WithSafeAddressDto = Schema.Struct({ rewardToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ description: "Campaign reward token.", }), - rewardMode: Schema.optionalKey(CampaignRewardMode), + rewardMode: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => CampaignRewardMode + ).annotate({ + description: + "Compound requires rewardToken to differ from the yield input token.", + default: "compound", + }) + ), totalBudget: Schema.String.annotate({ examples: ["10000"] }), apyCeiling: Schema.optionalKey( Schema.Union([ @@ -8647,9 +10091,31 @@ export const CreateCampaignV2WithSafeAddressDto = Schema.Struct({ (): Schema.Codec => CampaignPayoutFrequency ).annotate({ examples: ["weekly"] }), qualificationConfig: CampaignV2QualificationConfigDto, - budgetSpendStrategy: Schema.optionalKey(CampaignBudgetSpendStrategy), - blacklistBudgetHandling: Schema.optionalKey(CampaignBlacklistBudgetHandling), - status: Schema.optionalKey(CampaignStatus), + budgetSpendStrategy: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => + CampaignBudgetSpendStrategy + ).annotate({ + description: + "Controls how unspent budget is handled. spend_full_budget redistributes carry-forward across the remaining campaign duration; allow_underspend uses a fixed rate and may leave unspent budget at campaign end.", + default: "allow_underspend", + }) + ), + blacklistBudgetHandling: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => + CampaignBlacklistBudgetHandling + ).annotate({ + description: + "Controls what happens to an excluded address's accrued share. reserve holds it so it stays payable if the exclusion is lifted; redistribute spreads it across the remaining eligible recipients.", + default: "reserve", + }) + ), + status: Schema.optionalKey( + Schema.suspend((): Schema.Codec => CampaignStatus).annotate( + { default: "draft" } + ) + ), safeAddress: Schema.String, }).annotate({ identifier: "CreateCampaignV2WithSafeAddressDto" }); export type AdminCampaignV2Dto = { @@ -8696,7 +10162,12 @@ export const AdminCampaignV2Dto = Schema.Struct({ rewardToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ description: "Campaign reward token.", }), - rewardMode: CampaignRewardMode, + rewardMode: Schema.suspend( + (): Schema.Codec => CampaignRewardMode + ).annotate({ + description: + "Compound requires rewardToken to differ from the yield input token.", + }), safeAddress: Schema.String, totalBudget: Schema.String, distributedBudget: Schema.String, @@ -8725,8 +10196,19 @@ export const AdminCampaignV2Dto = Schema.Struct({ examples: [0.125], }) ), - budgetSpendStrategy: CampaignBudgetSpendStrategy, - blacklistBudgetHandling: CampaignBlacklistBudgetHandling, + budgetSpendStrategy: Schema.suspend( + (): Schema.Codec => CampaignBudgetSpendStrategy + ).annotate({ + description: + "Controls how unspent budget is handled. spend_full_budget redistributes carry-forward across the remaining campaign duration; allow_underspend uses a fixed rate and may leave unspent budget at campaign end.", + }), + blacklistBudgetHandling: Schema.suspend( + (): Schema.Codec => + CampaignBlacklistBudgetHandling + ).annotate({ + description: + "Controls what happens to an excluded address's accrued share. reserve holds it so it stays payable if the exclusion is lifted; redistribute spreads it across the remaining eligible recipients.", + }), qualificationConfig: CampaignV2QualificationConfigDto, pausedBy: Schema.optionalKey( Schema.Union([Schema.String, Schema.Null]).annotate({ format: "uuid" }) @@ -8954,6 +10436,120 @@ export const PaginatedCampaignV2ConfigurationRequestDto = Schema.Struct({ }).check(Schema.isFinite().annotate({ expected: "a finite number" })), items: Schema.Array(CampaignV2ConfigurationRequestDto), }).annotate({ identifier: "PaginatedCampaignV2ConfigurationRequestDto" }); +export type CreateCampaignSimulationDto = { + readonly yieldId?: string; + readonly projectId?: string; + readonly sourceCampaignId?: string; + readonly scenario?: "fixed-apy" | "dynamic-apy" | "drip" | "budget-injection"; + readonly config?: CampaignSimulationConfigDto; + readonly users?: number; + readonly seed?: number; + readonly trials?: number; + readonly mode?: "forecast" | "replay" | "synthetic"; + readonly days?: number; +}; +export const CreateCampaignSimulationDto = Schema.Struct({ + yieldId: Schema.optionalKey( + Schema.String.annotate({ + description: + "Forecast/replay without an existing campaign: integration id (e.g. ethereum-eth-lido-staking) to simulate a hypothetical campaign over that yield's real indexed data. Mutually exclusive with sourceCampaignId; requires config.totalBudget.", + }) + ), + projectId: Schema.optionalKey( + Schema.String.annotate({ + description: + "Disambiguates yieldId when multiple projects share the integration", + format: "uuid", + }) + ), + sourceCampaignId: Schema.optionalKey( + Schema.String.annotate({ + description: + "Real campaign to clone and simulate (required for forecast/replay). For synthetic: optional anchor — the finished output is materialized as an isSimulation campaign under this campaign's project/yield for table/dashboard inspection.", + format: "uuid", + }) + ), + scenario: Schema.optionalKey( + Schema.Literals([ + "fixed-apy", + "dynamic-apy", + "drip", + "budget-injection", + ]).annotate({ + description: + "Synthetic only: strategy template applied to config — fixed-apy (needs config.apyCeiling), dynamic-apy, drip (needs config.configuredEmissionRate), budget-injection (needs config.budgetInjections). Omit for free-form config.", + }) + ), + config: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => + CampaignSimulationConfigDto + ).annotate({ + description: + "Synthetic: full campaign/population config (alternative to scenario). Forecast/replay: optional campaign-economics overrides applied to the clone (totalBudget, configuredEmissionRate, payoutFrequency, qualificationThreshold, apyCeiling, maxIncentivizedTvlToken, budgetSpendStrategy, rewardMode) — population/event fields are rejected because real data is used.", + }) + ), + users: Schema.optionalKey( + Schema.Number.annotate({ + description: "Synthetic only: population size (default 10)", + }) + .check(Schema.isFinite().annotate({ expected: "a finite number" })) + .check( + Schema.isGreaterThanOrEqualTo(1).annotate({ + expected: "a value greater than or equal to 1", + }) + ) + .check( + Schema.isLessThanOrEqualTo(500).annotate({ + expected: "a value less than or equal to 500", + }) + ) + ), + seed: Schema.optionalKey( + Schema.Number.annotate({ + description: "Synthetic only: random-population seed", + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + trials: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Synthetic only: Monte Carlo trials (default 1; capped to bound runner CPU)", + }) + .check(Schema.isFinite().annotate({ expected: "a finite number" })) + .check( + Schema.isGreaterThanOrEqualTo(1).annotate({ + expected: "a value greater than or equal to 1", + }) + ) + .check( + Schema.isLessThanOrEqualTo(20).annotate({ + expected: "a value less than or equal to 20", + }) + ) + ), + mode: Schema.optionalKey( + Schema.Literals(["forecast", "replay", "synthetic"]).annotate({ + description: + "forecast (default): clone current accrual state and project forward. replay: fresh clone from campaign start, re-run real history. synthetic: in-memory scenario run, only the result summary is persisted.", + }) + ), + days: Schema.optionalKey( + Schema.Number.annotate({ + description: "Days of simulated time to run (default 7)", + }) + .check(Schema.isFinite().annotate({ expected: "a finite number" })) + .check( + Schema.isGreaterThanOrEqualTo(1).annotate({ + expected: "a value greater than or equal to 1", + }) + ) + .check( + Schema.isLessThanOrEqualTo(90).annotate({ + expected: "a value less than or equal to 90", + }) + ) + ), +}).annotate({ identifier: "CreateCampaignSimulationDto" }); export type CampaignV2PointsMetricsDto = { readonly releasedBudget: string; readonly distributedBudget: string; @@ -9027,6 +10623,14 @@ export const TopIntegrationsDto = Schema.Struct({ }) ), }).annotate({ identifier: "TopIntegrationsDto" }); +export type MonthlyReportListResponseDto = { + readonly reports: ReadonlyArray; +}; +export const MonthlyReportListResponseDto = Schema.Struct({ + reports: Schema.Array(MonthlyReportListItemDto).annotate({ + description: "Reports sorted by month descending", + }), +}).annotate({ identifier: "MonthlyReportListResponseDto" }); export type TransactionVerificationMessageRequestDto = { readonly addresses: AddressesDto; }; @@ -9075,7 +10679,9 @@ export const YieldBalanceScanEvmRequestDto = Schema.Struct({ customValidators: Schema.optionalKey(Schema.Array(CustomValidatorAddresses)), networks: Schema.suspend( (): Schema.Codec => EvmNetworks - ).annotate({ examples: [["ethereum", "arbitrum"]] }), + ).annotate({ + default: ["base", "ethereum", "arbitrum", "polygon", "binance"], + }), }).annotate({ identifier: "YieldBalanceScanEvmRequestDto" }); export type YieldBalanceRequestDto = { readonly addresses: AddressesDto; @@ -9163,6 +10769,134 @@ export const YieldMetadataDto = Schema.Struct({ commission: Schema.optionalKey(Schema.Array(YieldCommissionDto)), tvl: Schema.optionalKey(Schema.Array(YieldTvlDto)), }).annotate({ identifier: "YieldMetadataDto" }); +export type ProgrammaticPerpReportingActionDto = { + readonly id: string; + readonly type: PerpActionTypes; + readonly status: ActionStatus; + readonly providerId: string; + readonly address: string; + readonly args: { readonly [x: string]: Schema.Json }; + readonly summary: { readonly [x: string]: Schema.Json } | null; + readonly createdAt: string; + readonly completedAt: string | null; + readonly transactions: ReadonlyArray; +}; +export const ProgrammaticPerpReportingActionDto = Schema.Struct({ + id: Schema.String.annotate({ + description: "Unique action identifier (UUID)", + examples: ["550e8400-e29b-41d4-a716-446655440000"], + }), + type: Schema.suspend( + (): Schema.Codec => PerpActionTypes + ).annotate({ description: "Action type executed", examples: ["open"] }), + status: Schema.suspend( + (): Schema.Codec => ActionStatus + ).annotate({ description: "Current action status", examples: ["SUCCESS"] }), + providerId: Schema.String.annotate({ + description: "Provider identifier", + examples: ["hyperliquid"], + }), + address: Schema.String.annotate({ + description: "User wallet address", + examples: ["0xb8c8eb8efc68796e766f6ab320db8c165c064949"], + }), + args: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ + description: "Full action arguments", + examples: [ + { marketId: "hyperliquid-eth-usdc", amount: "100", leverage: 10 }, + ], + }), + summary: Schema.Union([ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), + Schema.Null, + ]).annotate({ + description: "Human-readable breakdown of what this action does", + examples: [{ type: "Open Position", asset: "ETH", leverage: 10 }], + }), + createdAt: Schema.String.annotate({ + description: "When the action was created", + examples: ["2026-02-19T10:23:45.000Z"], + format: "date-time", + }), + completedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "When the action completed (null if still in progress)", + examples: ["2026-02-19T10:23:48.000Z"], + format: "date-time", + }), + transactions: Schema.Array(ProgrammaticPerpReportingTransactionDto).annotate({ + description: "Transactions associated with the action", + }), +}).annotate({ identifier: "ProgrammaticPerpReportingActionDto" }); +export type ProgrammaticPerpReportingEventDto = { + readonly id: string; + readonly eventType: PerpEventType; + readonly providerId: string; + readonly address: string; + readonly occurredAt: string; + readonly marketId?: string | null; + readonly perpActionId?: string | null; + readonly providerOrderId?: string | null; + readonly settlementTransactionHash?: string | null; + readonly explorerUrl?: string | null; + readonly order: ProgrammaticPerpReportingEventOrderDto; +}; +export const ProgrammaticPerpReportingEventDto = Schema.Struct({ + id: Schema.String.annotate({ + description: "Unique timeline event identifier (UUID)", + format: "uuid", + }), + eventType: Schema.suspend( + (): Schema.Codec => PerpEventType + ).annotate({ description: "Timeline event type" }), + providerId: Schema.String.annotate({ + description: "Provider identifier", + examples: ["hyperliquid"], + }), + address: Schema.String.annotate({ + description: "User wallet address", + examples: ["0xb8c8eb8efc68796e766f6ab320db8c165c064949"], + }), + occurredAt: Schema.String.annotate({ + description: "When the event occurred", + format: "date-time", + }), + marketId: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Market identifier", + }) + ), + perpActionId: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Linked StakeKit action; null for liquidations", + format: "uuid", + }) + ), + providerOrderId: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Venue order identifier", + }) + ), + settlementTransactionHash: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "L1 / venue settlement transaction hash", + }) + ), + explorerUrl: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Block explorer URL for the settlement transaction", + }) + ), + order: Schema.suspend( + (): Schema.Codec => + ProgrammaticPerpReportingEventOrderDto + ).annotate({ description: "Normalized order details for the venue event" }), +}).annotate({ identifier: "ProgrammaticPerpReportingEventDto" }); export type PendingActionRequestDto = { readonly type: ActionTypes; readonly integrationId: string; @@ -9227,6 +10961,27 @@ export const GasModesDto = Schema.Struct({ }), values: Schema.Array(GasModeValueDto), }).annotate({ identifier: "GasModesDto" }); +export type AddressArgumentsDto = { + readonly address?: RequiredArgumentWithNetworkDto; + readonly additionalAddresses?: + | BinanceAdditionalAddressesStakeArgumentOptionsDto + | CosmosAdditionalAddressesStakeArgumentOptionsDto + | TezosAdditionalAddressesStakeArgumentOptionsDto + | SolanaAdditionalAddressesStakeArgumentOptionsDto + | AvalancheCAdditionalAddressesStakeArgumentOptionsDto; +}; +export const AddressArgumentsDto = Schema.Struct({ + address: Schema.optionalKey(RequiredArgumentWithNetworkDto), + additionalAddresses: Schema.optionalKey( + Schema.Union([ + BinanceAdditionalAddressesStakeArgumentOptionsDto, + CosmosAdditionalAddressesStakeArgumentOptionsDto, + TezosAdditionalAddressesStakeArgumentOptionsDto, + SolanaAdditionalAddressesStakeArgumentOptionsDto, + AvalancheCAdditionalAddressesStakeArgumentOptionsDto, + ]) + ), +}).annotate({ identifier: "AddressArgumentsDto" }); export type ArgumentOptionsDto = { readonly amount?: AmountArgumentOptionsDto; readonly duration?: DurationArgumentOptionsDto; @@ -9292,55 +11047,92 @@ export const StakeResponseDto = Schema.Struct({ mode: "oneOf", }).annotate({ description: "Stake information" }), }).annotate({ identifier: "StakeResponseDto" }); -export type TransactionDto = { +export type ActionWithLivePriceDto = { + readonly id: string; + readonly integrationId: string; + readonly status: ActionStatus; + readonly type: ActionTypes; + readonly currentStepIndex: number; + readonly amount: string | null; + readonly USDAmount: string | null; + readonly tokenId: string | null; + readonly validatorAddress: string | null; + readonly validatorAddresses: ReadonlyArray | null; + readonly transactions: ReadonlyArray; + readonly createdAt: string; + readonly completedAt: string | null; + readonly inputToken?: TokenDto; + readonly addresses: AddressesDto; + readonly accountAddresses?: ReadonlyArray; + readonly projectId: string | null; + readonly currentUSDAmount: string | null; +}; +export const ActionWithLivePriceDto = Schema.Struct({ + id: Schema.String, + integrationId: Schema.String, + status: ActionStatus, + type: ActionTypes, + currentStepIndex: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + amount: Schema.Union([Schema.String, Schema.Null]), + USDAmount: Schema.Union([Schema.String, Schema.Null]), + tokenId: Schema.Union([Schema.String, Schema.Null]), + validatorAddress: Schema.Union([Schema.String, Schema.Null]), + validatorAddresses: Schema.Union([Schema.Array(Schema.String), Schema.Null]), + transactions: Schema.Array(TransactionDto), + createdAt: Schema.String.annotate({ format: "date-time" }), + completedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ + format: "date-time", + }), + inputToken: Schema.optionalKey(TokenDto), + addresses: AddressesDto, + accountAddresses: Schema.optionalKey(Schema.Array(Schema.String)), + projectId: Schema.Union([Schema.String, Schema.Null]), + currentUSDAmount: Schema.Union([Schema.String, Schema.Null]), +}).annotate({ identifier: "ActionWithLivePriceDto" }); +export type ActionDto = { readonly id: string; - readonly network: Networks; - readonly status: TransactionStatus; - readonly type: TransactionType | null; - readonly hash: string | null; + readonly integrationId: string; + readonly status: ActionStatus; + readonly type: ActionTypes; + readonly currentStepIndex: number; + readonly amount: string | null; + readonly USDAmount: string | null; + readonly tokenId: string | null; + readonly validatorAddress: string | null; + readonly validatorAddresses: ReadonlyArray | null; + readonly transactions: ReadonlyArray; readonly createdAt: string; - readonly broadcastedAt: string | null; - readonly signedTransaction: string | null; - readonly unsignedTransaction: string | null; - readonly structuredTransaction: StructuredTransactionTronDto | null; - readonly annotatedTransaction: AnnotatedTransactionDto | null; - readonly stepIndex: number; - readonly error: string | null; - readonly gasEstimate: GasEstimateDto | null; - readonly stakeId: string; - readonly explorerUrl: string | null; - readonly ledgerHwAppId: string | null; - readonly isMessage: boolean; + readonly completedAt: string | null; + readonly inputToken?: TokenDto; + readonly addresses: AddressesDto; readonly accountAddresses?: ReadonlyArray; + readonly projectId: string | null; }; -export const TransactionDto = Schema.Struct({ +export const ActionDto = Schema.Struct({ id: Schema.String, - network: Networks, - status: TransactionStatus, - type: Schema.Union([TransactionType, Schema.Null]), - hash: Schema.Union([Schema.String, Schema.Null]), + integrationId: Schema.String, + status: ActionStatus, + type: ActionTypes, + currentStepIndex: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + amount: Schema.Union([Schema.String, Schema.Null]), + USDAmount: Schema.Union([Schema.String, Schema.Null]), + tokenId: Schema.Union([Schema.String, Schema.Null]), + validatorAddress: Schema.Union([Schema.String, Schema.Null]), + validatorAddresses: Schema.Union([Schema.Array(Schema.String), Schema.Null]), + transactions: Schema.Array(TransactionDto), createdAt: Schema.String.annotate({ format: "date-time" }), - broadcastedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ + completedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ format: "date-time", }), - signedTransaction: Schema.Union([Schema.String, Schema.Null]), - unsignedTransaction: Schema.Union([Schema.String, Schema.Null]), - structuredTransaction: Schema.Union([ - Schema.Union([StructuredTransactionTronDto], { mode: "oneOf" }), - Schema.Null, - ]), - annotatedTransaction: Schema.Union([AnnotatedTransactionDto, Schema.Null]), - stepIndex: Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - error: Schema.Union([Schema.String, Schema.Null]), - gasEstimate: Schema.Union([GasEstimateDto, Schema.Null]), - stakeId: Schema.String, - explorerUrl: Schema.Union([Schema.String, Schema.Null]), - ledgerHwAppId: Schema.Union([Schema.String, Schema.Null]), - isMessage: Schema.Boolean, + inputToken: Schema.optionalKey(TokenDto), + addresses: AddressesDto, accountAddresses: Schema.optionalKey(Schema.Array(Schema.String)), -}).annotate({ identifier: "TransactionDto" }); + projectId: Schema.Union([Schema.String, Schema.Null]), +}).annotate({ identifier: "ActionDto" }); export type ActionGasEstimateDto = { readonly amount: string | null; readonly entryReserveEstimate?: string; @@ -9513,7 +11305,13 @@ export type CreateCampaignConfigurationRequestDto = { readonly metadata?: { readonly [x: string]: Schema.Json }; }; export const CreateCampaignConfigurationRequestDto = Schema.Struct({ - requestType: CampaignConfigurationRequestType, + requestType: Schema.suspend( + (): Schema.Codec => + CampaignConfigurationRequestType + ).annotate({ + description: + "create_campaign (no campaignId required), update_configuration (requires campaignId), or end_campaign (requires campaignId).", + }), campaignId: Schema.optionalKey( Schema.String.annotate({ description: @@ -9574,7 +11372,13 @@ export type CreateCampaignV2ConfigurationRequestDto = { readonly metadata?: { readonly [x: string]: Schema.Json }; }; export const CreateCampaignV2ConfigurationRequestDto = Schema.Struct({ - requestType: CampaignConfigurationRequestType, + requestType: Schema.suspend( + (): Schema.Codec => + CampaignConfigurationRequestType + ).annotate({ + description: + "create_campaign (no campaignId required), update_configuration (requires campaignId), or end_campaign (requires campaignId).", + }), campaignId: Schema.optionalKey( Schema.String.annotate({ description: @@ -9760,92 +11564,49 @@ export const ActionArgumentOptionsDto = Schema.Struct({ addresses: Schema.optionalKey(AddressArgumentsDto), args: Schema.optionalKey(ArgumentOptionsDto), }).annotate({ identifier: "ActionArgumentOptionsDto" }); -export type ActionWithLivePriceDto = { - readonly id: string; - readonly integrationId: string; - readonly status: ActionStatus; - readonly type: ActionTypes; - readonly currentStepIndex: number; - readonly amount: string | null; - readonly USDAmount: string | null; - readonly tokenId: string | null; - readonly validatorAddress: string | null; - readonly validatorAddresses: ReadonlyArray | null; - readonly transactions: ReadonlyArray; - readonly createdAt: string; - readonly completedAt: string | null; - readonly inputToken?: TokenDto; - readonly addresses: AddressesDto; - readonly accountAddresses?: ReadonlyArray; - readonly projectId: string | null; - readonly currentUSDAmount: string | null; -}; -export const ActionWithLivePriceDto = Schema.Struct({ - id: Schema.String, - integrationId: Schema.String, - status: ActionStatus, - type: ActionTypes, - currentStepIndex: Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - amount: Schema.Union([Schema.String, Schema.Null]), - USDAmount: Schema.Union([Schema.String, Schema.Null]), - tokenId: Schema.Union([Schema.String, Schema.Null]), - validatorAddress: Schema.Union([Schema.String, Schema.Null]), - validatorAddresses: Schema.Union([Schema.Array(Schema.String), Schema.Null]), - transactions: Schema.Array(TransactionDto), - createdAt: Schema.String.annotate({ format: "date-time" }), - completedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ - format: "date-time", +export type MonthlyReportDetailDto = { + readonly report_id: string; + readonly month: string; + readonly total_revenue_usd: string | null; + readonly total_tvl_usd: string | null; + readonly status: MonthlyReportStatus; + readonly published_at: string | null; + readonly published_by: string | null; + readonly breakdown: RevenueBreakdownResponseDto; + readonly csv_download_url: string; +}; +export const MonthlyReportDetailDto = Schema.Struct({ + report_id: Schema.String.annotate({ format: "uuid" }), + month: Schema.String.annotate({ + description: "Reporting period in YYYY-MM format", + examples: ["2026-05"], }), - inputToken: Schema.optionalKey(TokenDto), - addresses: AddressesDto, - accountAddresses: Schema.optionalKey(Schema.Array(Schema.String)), - projectId: Schema.Union([Schema.String, Schema.Null]), - currentUSDAmount: Schema.Union([Schema.String, Schema.Null]), -}).annotate({ identifier: "ActionWithLivePriceDto" }); -export type ActionDto = { - readonly id: string; - readonly integrationId: string; - readonly status: ActionStatus; - readonly type: ActionTypes; - readonly currentStepIndex: number; - readonly amount: string | null; - readonly USDAmount: string | null; - readonly tokenId: string | null; - readonly validatorAddress: string | null; - readonly validatorAddresses: ReadonlyArray | null; - readonly transactions: ReadonlyArray; - readonly createdAt: string; - readonly completedAt: string | null; - readonly inputToken?: TokenDto; - readonly addresses: AddressesDto; - readonly accountAddresses?: ReadonlyArray; - readonly projectId: string | null; -}; -export const ActionDto = Schema.Struct({ - id: Schema.String, - integrationId: Schema.String, - status: ActionStatus, - type: ActionTypes, - currentStepIndex: Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - amount: Schema.Union([Schema.String, Schema.Null]), - USDAmount: Schema.Union([Schema.String, Schema.Null]), - tokenId: Schema.Union([Schema.String, Schema.Null]), - validatorAddress: Schema.Union([Schema.String, Schema.Null]), - validatorAddresses: Schema.Union([Schema.Array(Schema.String), Schema.Null]), - transactions: Schema.Array(TransactionDto), - createdAt: Schema.String.annotate({ format: "date-time" }), - completedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ + total_revenue_usd: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Aggregate earned revenue in USD", + }), + total_tvl_usd: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Total TVL in USD, summed across integrations. Integrations report at different freshness cadences, so this figure mixes snapshots from different points in time; see each integration’s data_freshness in the breakdown.", + }), + status: MonthlyReportStatus, + published_at: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "When the report was published", format: "date-time", }), - inputToken: Schema.optionalKey(TokenDto), - addresses: AddressesDto, - accountAddresses: Schema.optionalKey(Schema.Array(Schema.String)), - projectId: Schema.Union([Schema.String, Schema.Null]), -}).annotate({ identifier: "ActionDto" }); + published_by: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "User id of the super admin who published the report", + format: "uuid", + }), + breakdown: Schema.suspend( + (): Schema.Codec => RevenueBreakdownResponseDto + ).annotate({ + description: + "Frozen per-integration breakdown, TVL snapshot, and fee data for the month", + }), + csv_download_url: Schema.String.annotate({ + description: "Relative URL to download the report CSV", + }), +}).annotate({ identifier: "MonthlyReportDetailDto" }); export type ActionArgumentResponseDto = { readonly enter: ActionArgumentOptionsDto; readonly exit?: ActionArgumentOptionsDto; @@ -9861,7 +11622,9 @@ export type PendingActionDto = { readonly amount: string | null; }; export const PendingActionDto = Schema.Struct({ - type: ActionTypes, + type: Schema.suspend((): Schema.Codec => ActionTypes).annotate({ + description: "The pending action type", + }), passthrough: Schema.String.annotate({ description: "A server generated passthrough that must passed back when pulling the transactions for a given pending action", @@ -10017,7 +11780,7 @@ export const CampaignControllerListParams = Schema.Struct({ status: Schema.optionalKey(CampaignStatus), yieldId: Schema.optionalKey(Schema.String.annotate({ format: "uuid" })), offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10026,7 +11789,7 @@ export const CampaignControllerListParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10080,7 +11843,7 @@ export type CampaignControllerGetCampaignBalancesParams = { }; export const CampaignControllerGetCampaignBalancesParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10089,7 +11852,7 @@ export const CampaignControllerGetCampaignBalancesParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10105,7 +11868,9 @@ export const CampaignControllerGetCampaignBalancesParams = Schema.Struct({ address: Schema.optionalKey(Schema.String), qualified: Schema.optionalKey(Schema.Boolean), sortField: Schema.optionalKey(CampaignBalanceSortField), - sortDirection: Schema.optionalKey(Schema.Literals(["asc", "desc"])), + sortDirection: Schema.optionalKey( + Schema.Literals(["asc", "desc"]).annotate({ examples: ["desc"] }) + ), }); export type CampaignControllerGetCampaignBalances200 = CampaignBalancesResponseDto; @@ -10118,7 +11883,9 @@ export type CampaignControllerGetBudgetProjectionParams = { readonly endTime?: string; }; export const CampaignControllerGetBudgetProjectionParams = Schema.Struct({ - totalBudget: Schema.optionalKey(Schema.String), + totalBudget: Schema.optionalKey( + Schema.String.annotate({ examples: ["1500"] }) + ), endTime: Schema.optionalKey(Schema.String.annotate({ format: "date-time" })), }); export type CampaignControllerGetBudgetProjection200 = BudgetProjectionDto; @@ -10142,7 +11909,7 @@ export type CampaignControllerGetPayoutRunsParams = { }; export const CampaignControllerGetPayoutRunsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10151,7 +11918,7 @@ export const CampaignControllerGetPayoutRunsParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10178,7 +11945,7 @@ export type CampaignControllerGetPayoutAuditParams = { }; export const CampaignControllerGetPayoutAuditParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10187,7 +11954,7 @@ export const CampaignControllerGetPayoutAuditParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10211,7 +11978,7 @@ export type CampaignControllerGetWeeklyDistributionParams = { }; export const CampaignControllerGetWeeklyDistributionParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10220,7 +11987,7 @@ export const CampaignControllerGetWeeklyDistributionParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10247,7 +12014,7 @@ export type CampaignControllerGetEligibleUsersParams = { }; export const CampaignControllerGetEligibleUsersParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10256,7 +12023,7 @@ export const CampaignControllerGetEligibleUsersParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10269,9 +12036,13 @@ export const CampaignControllerGetEligibleUsersParams = Schema.Struct({ }) ) ), - minTotalEarned: Schema.optionalKey(Schema.String), + minTotalEarned: Schema.optionalKey( + Schema.String.annotate({ examples: ["0"] }) + ), sortField: Schema.optionalKey(EligibleUserSortField), - sortDirection: Schema.optionalKey(Schema.Literals(["asc", "desc"])), + sortDirection: Schema.optionalKey( + Schema.Literals(["asc", "desc"]).annotate({ examples: ["desc"] }) + ), }); export type CampaignControllerGetEligibleUsers200 = PaginatedEligibleUserDto; export const CampaignControllerGetEligibleUsers200 = PaginatedEligibleUserDto; @@ -10281,7 +12052,7 @@ export type CampaignControllerGetBlacklistedUsersParams = { }; export const CampaignControllerGetBlacklistedUsersParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10290,7 +12061,7 @@ export const CampaignControllerGetBlacklistedUsersParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10315,7 +12086,7 @@ export type CampaignControllerGetAccrualDetailsParams = { }; export const CampaignControllerGetAccrualDetailsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10324,7 +12095,7 @@ export const CampaignControllerGetAccrualDetailsParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10353,7 +12124,7 @@ export type CampaignControllerGetAccrualDetailForHourParams = { }; export const CampaignControllerGetAccrualDetailForHourParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10362,7 +12133,7 @@ export const CampaignControllerGetAccrualDetailForHourParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10378,7 +12149,9 @@ export const CampaignControllerGetAccrualDetailForHourParams = Schema.Struct({ address: Schema.optionalKey(Schema.String), qualified: Schema.optionalKey(Schema.Boolean), sortField: Schema.optionalKey(AccrualHourSortField), - sortDirection: Schema.optionalKey(Schema.Literals(["asc", "desc"])), + sortDirection: Schema.optionalKey( + Schema.Literals(["asc", "desc"]).annotate({ examples: ["desc"] }) + ), }); export type CampaignControllerGetAccrualDetailForHour200 = HourlyAccrualDetailDto; @@ -10390,7 +12163,7 @@ export type CampaignControllerGetUserAccrualHistoryParams = { }; export const CampaignControllerGetUserAccrualHistoryParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10399,7 +12172,7 @@ export const CampaignControllerGetUserAccrualHistoryParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10429,7 +12202,7 @@ export type CampaignControllerGetBlacklistedAddressesParams = { }; export const CampaignControllerGetBlacklistedAddressesParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10438,7 +12211,7 @@ export const CampaignControllerGetBlacklistedAddressesParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10464,7 +12237,7 @@ export type CampaignControllerGetAuditHistoryParams = { }; export const CampaignControllerGetAuditHistoryParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10473,7 +12246,7 @@ export const CampaignControllerGetAuditHistoryParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10503,7 +12276,7 @@ export const CampaignConfigurationRequestControllerListForProjectParams = status: Schema.optionalKey(CampaignConfigurationRequestStatus), requestType: Schema.optionalKey(CampaignConfigurationRequestType), offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10512,7 +12285,7 @@ export const CampaignConfigurationRequestControllerListForProjectParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10553,7 +12326,7 @@ export const CampaignConfigurationRequestControllerListForCampaignParams = status: Schema.optionalKey(CampaignConfigurationRequestStatus), requestType: Schema.optionalKey(CampaignConfigurationRequestType), offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10562,7 +12335,7 @@ export const CampaignConfigurationRequestControllerListForCampaignParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10609,7 +12382,7 @@ export const CampaignConfigurationRequestAdminControllerListParams = requestType: Schema.optionalKey(CampaignConfigurationRequestType), projectId: Schema.optionalKey(Schema.String.annotate({ format: "uuid" })), offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10618,7 +12391,7 @@ export const CampaignConfigurationRequestAdminControllerListParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10668,7 +12441,7 @@ export const CampaignAdminControllerListParams = Schema.Struct({ ), sort: Schema.optionalKey(CampaignAdminSortingOption), offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10677,7 +12450,7 @@ export const CampaignAdminControllerListParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10704,7 +12477,7 @@ export type ProgrammaticCampaignControllerListCampaignsParams = { }; export const ProgrammaticCampaignControllerListCampaignsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10713,7 +12486,7 @@ export const ProgrammaticCampaignControllerListCampaignsParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10743,7 +12516,7 @@ export type ProgrammaticCampaignControllerGetAccrualDetailsParams = { export const ProgrammaticCampaignControllerGetAccrualDetailsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10752,7 +12525,7 @@ export const ProgrammaticCampaignControllerGetAccrualDetailsParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10784,7 +12557,7 @@ export type ProgrammaticCampaignControllerGetAccrualDetailForHourParams = { export const ProgrammaticCampaignControllerGetAccrualDetailForHourParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10793,7 +12566,7 @@ export const ProgrammaticCampaignControllerGetAccrualDetailForHourParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10809,7 +12582,9 @@ export const ProgrammaticCampaignControllerGetAccrualDetailForHourParams = address: Schema.optionalKey(Schema.String), qualified: Schema.optionalKey(Schema.Boolean), sortField: Schema.optionalKey(AccrualHourSortField), - sortDirection: Schema.optionalKey(Schema.Literals(["asc", "desc"])), + sortDirection: Schema.optionalKey( + Schema.Literals(["asc", "desc"]).annotate({ examples: ["desc"] }) + ), "X-ADMIN-API-KEY": Schema.String, }); export type ProgrammaticCampaignControllerGetAccrualDetailForHour200 = @@ -10824,7 +12599,7 @@ export type ProgrammaticCampaignControllerGetUserAccrualHistoryParams = { export const ProgrammaticCampaignControllerGetUserAccrualHistoryParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10833,7 +12608,7 @@ export const ProgrammaticCampaignControllerGetUserAccrualHistoryParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10860,7 +12635,7 @@ export type ProgrammaticCampaignControllerGetPayoutRunsParams = { }; export const ProgrammaticCampaignControllerGetPayoutRunsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10869,7 +12644,7 @@ export const ProgrammaticCampaignControllerGetPayoutRunsParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10897,7 +12672,7 @@ export type ProgrammaticCampaignControllerGetPayoutRunDetailParams = { export const ProgrammaticCampaignControllerGetPayoutRunDetailParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10906,7 +12681,7 @@ export const ProgrammaticCampaignControllerGetPayoutRunDetailParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10933,7 +12708,7 @@ export type ProgrammaticCampaignControllerGetPayoutBatchDetailParams = { export const ProgrammaticCampaignControllerGetPayoutBatchDetailParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10942,7 +12717,7 @@ export const ProgrammaticCampaignControllerGetPayoutBatchDetailParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -10990,7 +12765,7 @@ export type ProgrammaticCampaignControllerGetCampaignBalancesParams = { export const ProgrammaticCampaignControllerGetCampaignBalancesParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -10999,7 +12774,7 @@ export const ProgrammaticCampaignControllerGetCampaignBalancesParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11015,7 +12790,9 @@ export const ProgrammaticCampaignControllerGetCampaignBalancesParams = address: Schema.optionalKey(Schema.String), qualified: Schema.optionalKey(Schema.Boolean), sortField: Schema.optionalKey(CampaignBalanceSortField), - sortDirection: Schema.optionalKey(Schema.Literals(["asc", "desc"])), + sortDirection: Schema.optionalKey( + Schema.Literals(["asc", "desc"]).annotate({ examples: ["desc"] }) + ), "X-ADMIN-API-KEY": Schema.String, }); export type ProgrammaticCampaignControllerGetCampaignBalances200 = @@ -11033,7 +12810,7 @@ export const CampaignV2ConfigurationRequestControllerListForProjectParams = status: Schema.optionalKey(CampaignConfigurationRequestStatus), requestType: Schema.optionalKey(CampaignConfigurationRequestType), offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11042,7 +12819,7 @@ export const CampaignV2ConfigurationRequestControllerListForProjectParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11083,7 +12860,7 @@ export const CampaignV2ConfigurationRequestControllerListForCampaignParams = status: Schema.optionalKey(CampaignConfigurationRequestStatus), requestType: Schema.optionalKey(CampaignConfigurationRequestType), offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11092,7 +12869,7 @@ export const CampaignV2ConfigurationRequestControllerListForCampaignParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11136,7 +12913,7 @@ export const CampaignLifecycleControllerListParams = Schema.Struct({ status: Schema.optionalKey(CampaignStatus), yieldId: Schema.optionalKey(Schema.String.annotate({ format: "uuid" })), offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11145,7 +12922,7 @@ export const CampaignLifecycleControllerListParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11191,6 +12968,8 @@ export type CampaignLifecycleControllerPause200 = CampaignV2Dto; export const CampaignLifecycleControllerPause200 = CampaignV2Dto; export type CampaignLifecycleControllerPause409 = StakeKitErrorDto; export const CampaignLifecycleControllerPause409 = StakeKitErrorDto; +export type CampaignLifecycleControllerResumeRequestJson = ResumeCampaignV2Dto; +export const CampaignLifecycleControllerResumeRequestJson = ResumeCampaignV2Dto; export type CampaignLifecycleControllerResume200 = CampaignV2Dto; export const CampaignLifecycleControllerResume200 = CampaignV2Dto; export type CampaignLifecycleControllerResume409 = StakeKitErrorDto; @@ -11211,7 +12990,9 @@ export type CampaignV2ReadsControllerGetBudgetProjectionParams = { }; export const CampaignV2ReadsControllerGetBudgetProjectionParams = Schema.Struct( { - totalBudget: Schema.optionalKey(Schema.String), + totalBudget: Schema.optionalKey( + Schema.String.annotate({ examples: ["1500"] }) + ), endTime: Schema.optionalKey( Schema.String.annotate({ format: "date-time" }) ), @@ -11240,7 +13021,7 @@ export type CampaignV2ReadsControllerGetPayoutRunsParams = { }; export const CampaignV2ReadsControllerGetPayoutRunsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11249,7 +13030,7 @@ export const CampaignV2ReadsControllerGetPayoutRunsParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11274,7 +13055,7 @@ export type CampaignV2ReadsControllerGetPayoutRunDetailParams = { }; export const CampaignV2ReadsControllerGetPayoutRunDetailParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11283,7 +13064,7 @@ export const CampaignV2ReadsControllerGetPayoutRunDetailParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11307,7 +13088,7 @@ export type CampaignV2ReadsControllerGetPayoutAuditParams = { }; export const CampaignV2ReadsControllerGetPayoutAuditParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11316,7 +13097,7 @@ export const CampaignV2ReadsControllerGetPayoutAuditParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11341,7 +13122,7 @@ export type CampaignV2ReadsControllerGetWeeklyDistributionParams = { export const CampaignV2ReadsControllerGetWeeklyDistributionParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11350,7 +13131,7 @@ export const CampaignV2ReadsControllerGetWeeklyDistributionParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11377,7 +13158,7 @@ export type CampaignV2ReadsControllerGetEligibleUsersParams = { }; export const CampaignV2ReadsControllerGetEligibleUsersParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11386,7 +13167,7 @@ export const CampaignV2ReadsControllerGetEligibleUsersParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11399,9 +13180,13 @@ export const CampaignV2ReadsControllerGetEligibleUsersParams = Schema.Struct({ }) ) ), - minTotalEarned: Schema.optionalKey(Schema.String), + minTotalEarned: Schema.optionalKey( + Schema.String.annotate({ examples: ["0"] }) + ), sortField: Schema.optionalKey(EligibleUserSortField), - sortDirection: Schema.optionalKey(Schema.Literals(["asc", "desc"])), + sortDirection: Schema.optionalKey( + Schema.Literals(["asc", "desc"]).annotate({ examples: ["desc"] }) + ), }); export type CampaignV2ReadsControllerGetEligibleUsers200 = PaginatedEligibleUserV2Dto; @@ -11414,7 +13199,7 @@ export type CampaignV2ReadsControllerGetBlacklistedUsersParams = { export const CampaignV2ReadsControllerGetBlacklistedUsersParams = Schema.Struct( { offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11423,7 +13208,7 @@ export const CampaignV2ReadsControllerGetBlacklistedUsersParams = Schema.Struct( ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11457,7 +13242,7 @@ export type CampaignV2ReadsControllerGetBlacklistedAddressesParams = { export const CampaignV2ReadsControllerGetBlacklistedAddressesParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11466,7 +13251,7 @@ export const CampaignV2ReadsControllerGetBlacklistedAddressesParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11492,7 +13277,7 @@ export type CampaignV2ReadsControllerGetAuditHistoryParams = { }; export const CampaignV2ReadsControllerGetAuditHistoryParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11501,7 +13286,7 @@ export const CampaignV2ReadsControllerGetAuditHistoryParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11534,7 +13319,7 @@ export const CampaignV2ConfigurationRequestAdminControllerListParams = requestType: Schema.optionalKey(CampaignConfigurationRequestType), projectId: Schema.optionalKey(Schema.String.annotate({ format: "uuid" })), offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11543,7 +13328,7 @@ export const CampaignV2ConfigurationRequestAdminControllerListParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11561,6 +13346,51 @@ export type CampaignV2ConfigurationRequestAdminControllerList200 = PaginatedCampaignV2ConfigurationRequestDto; export const CampaignV2ConfigurationRequestAdminControllerList200 = PaginatedCampaignV2ConfigurationRequestDto; +export type CampaignV2SimulationAdminControllerListParams = { + readonly offset?: number; + readonly limit?: number; +}; +export const CampaignV2SimulationAdminControllerListParams = Schema.Struct({ + offset: Schema.optionalKey( + Schema.Number.annotate({ default: 0, examples: [0] }) + .check(Schema.isFinite().annotate({ expected: "a finite number" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + ), + limit: Schema.optionalKey( + Schema.Number.annotate({ default: 20, examples: [20] }) + .check(Schema.isFinite().annotate({ expected: "a finite number" })) + .check( + Schema.isGreaterThanOrEqualTo(1).annotate({ + expected: "a value greater than or equal to 1", + }) + ) + .check( + Schema.isLessThanOrEqualTo(100).annotate({ + expected: "a value less than or equal to 100", + }) + ) + ), +}); +export type CampaignV2SimulationAdminControllerList200 = + PaginatedCampaignSimulationRunDto; +export const CampaignV2SimulationAdminControllerList200 = + PaginatedCampaignSimulationRunDto; +export type CampaignV2SimulationAdminControllerCreateRequestJson = + CreateCampaignSimulationDto; +export const CampaignV2SimulationAdminControllerCreateRequestJson = + CreateCampaignSimulationDto; +export type CampaignV2SimulationAdminControllerCreate201 = + CampaignSimulationRunDto; +export const CampaignV2SimulationAdminControllerCreate201 = + CampaignSimulationRunDto; +export type CampaignV2SimulationAdminControllerGetById200 = + CampaignSimulationRunDto; +export const CampaignV2SimulationAdminControllerGetById200 = + CampaignSimulationRunDto; export type CampaignV2AdminControllerListParams = { readonly status?: CampaignStatus; readonly projectId?: string; @@ -11593,7 +13423,7 @@ export const CampaignV2AdminControllerListParams = Schema.Struct({ ), sort: Schema.optionalKey(CampaignAdminSortingOption), offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11602,7 +13432,7 @@ export const CampaignV2AdminControllerListParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11626,7 +13456,7 @@ export type CampaignV2AdminControllerGetPointsMetricsParams = { }; export const CampaignV2AdminControllerGetPointsMetricsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11635,7 +13465,7 @@ export const CampaignV2AdminControllerGetPointsMetricsParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11677,7 +13507,7 @@ export type ProgrammaticCampaignV2ControllerListCampaignsParams = { export const ProgrammaticCampaignV2ControllerListCampaignsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11686,7 +13516,7 @@ export const ProgrammaticCampaignV2ControllerListCampaignsParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11716,7 +13546,7 @@ export type ProgrammaticCampaignV2ControllerGetAccrualDetailsParams = { export const ProgrammaticCampaignV2ControllerGetAccrualDetailsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11725,7 +13555,7 @@ export const ProgrammaticCampaignV2ControllerGetAccrualDetailsParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11757,7 +13587,7 @@ export type ProgrammaticCampaignV2ControllerGetAccrualDetailForWindowParams = { export const ProgrammaticCampaignV2ControllerGetAccrualDetailForWindowParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11766,7 +13596,7 @@ export const ProgrammaticCampaignV2ControllerGetAccrualDetailForWindowParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11782,7 +13612,9 @@ export const ProgrammaticCampaignV2ControllerGetAccrualDetailForWindowParams = address: Schema.optionalKey(Schema.String), qualified: Schema.optionalKey(Schema.Boolean), sortField: Schema.optionalKey(AccrualWindowSortField), - sortDirection: Schema.optionalKey(Schema.Literals(["asc", "desc"])), + sortDirection: Schema.optionalKey( + Schema.Literals(["asc", "desc"]).annotate({ examples: ["desc"] }) + ), "X-ADMIN-API-KEY": Schema.String, }); export type ProgrammaticCampaignV2ControllerGetAccrualDetailForWindow200 = @@ -11806,7 +13638,7 @@ export type ProgrammaticCampaignV2ControllerGetUserAccrualHistoryParams = { export const ProgrammaticCampaignV2ControllerGetUserAccrualHistoryParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11815,7 +13647,7 @@ export const ProgrammaticCampaignV2ControllerGetUserAccrualHistoryParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11843,7 +13675,7 @@ export type ProgrammaticCampaignV2ControllerGetPayoutRunsParams = { export const ProgrammaticCampaignV2ControllerGetPayoutRunsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11852,7 +13684,7 @@ export const ProgrammaticCampaignV2ControllerGetPayoutRunsParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11880,7 +13712,7 @@ export type ProgrammaticCampaignV2ControllerGetPayoutRunDetailParams = { export const ProgrammaticCampaignV2ControllerGetPayoutRunDetailParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11889,7 +13721,7 @@ export const ProgrammaticCampaignV2ControllerGetPayoutRunDetailParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11916,7 +13748,7 @@ export type ProgrammaticCampaignV2ControllerGetPayoutBatchDetailParams = { export const ProgrammaticCampaignV2ControllerGetPayoutBatchDetailParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11925,7 +13757,7 @@ export const ProgrammaticCampaignV2ControllerGetPayoutBatchDetailParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11973,7 +13805,7 @@ export type ProgrammaticCampaignV2ControllerGetCampaignBalancesParams = { export const ProgrammaticCampaignV2ControllerGetCampaignBalancesParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -11982,7 +13814,7 @@ export const ProgrammaticCampaignV2ControllerGetCampaignBalancesParams = ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -11998,7 +13830,9 @@ export const ProgrammaticCampaignV2ControllerGetCampaignBalancesParams = address: Schema.optionalKey(Schema.String), qualified: Schema.optionalKey(Schema.Boolean), sortField: Schema.optionalKey(CampaignBalanceSortField), - sortDirection: Schema.optionalKey(Schema.Literals(["asc", "desc"])), + sortDirection: Schema.optionalKey( + Schema.Literals(["asc", "desc"]).annotate({ examples: ["desc"] }) + ), "X-ADMIN-API-KEY": Schema.String, }); export type ProgrammaticCampaignV2ControllerGetCampaignBalances200 = @@ -12215,11 +14049,12 @@ export type TeamsControllerFindAll200 = { readonly category: string; readonly deletedAt: string | null; readonly createdAt: string; - readonly contactDetails: {}; + readonly contactDetails: { readonly [x: string]: Schema.Json }; readonly name: string; readonly serviceConditionsAcceptedAt: string | null; readonly oavEnabled: boolean; readonly isMultiTenant: boolean; + readonly clientType: "channelPartner" | "directConsumer" | "endClient"; }>; readonly hasNextPage: boolean; readonly limit: number; @@ -12237,7 +14072,10 @@ export const TeamsControllerFindAll200 = Schema.Struct({ format: "date-time", }), createdAt: Schema.String.annotate({ format: "date-time" }), - contactDetails: Schema.Struct({}), + contactDetails: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), name: Schema.String, serviceConditionsAcceptedAt: Schema.Union([ Schema.String, @@ -12245,6 +14083,11 @@ export const TeamsControllerFindAll200 = Schema.Struct({ ]).annotate({ format: "date-time" }), oavEnabled: Schema.Boolean.annotate({ default: false }), isMultiTenant: Schema.Boolean.annotate({ default: false }), + clientType: Schema.Literals([ + "channelPartner", + "directConsumer", + "endClient", + ]).annotate({ default: "directConsumer" }), }) ).annotate({ description: "Array of data items" }), hasNextPage: Schema.Boolean, @@ -12304,6 +14147,16 @@ export type TeamsControllerUpdateRequestJson = UpdateTeamDto; export const TeamsControllerUpdateRequestJson = UpdateTeamDto; export type TeamsControllerUpdate200 = Team; export const TeamsControllerUpdate200 = Team; +export type ProgrammaticTeamsControllerCreateParams = { + readonly "X-ADMIN-API-KEY"?: string; +}; +export const ProgrammaticTeamsControllerCreateParams = Schema.Struct({ + "X-ADMIN-API-KEY": Schema.optionalKey(Schema.String), +}); +export type ProgrammaticTeamsControllerCreateRequestJson = CreateTeamDto; +export const ProgrammaticTeamsControllerCreateRequestJson = CreateTeamDto; +export type ProgrammaticTeamsControllerCreate201 = Team; +export const ProgrammaticTeamsControllerCreate201 = Team; export type ProjectsControllerGet200 = ReadonlyArray; export const ProjectsControllerGet200 = Schema.Array(Project); export type ProjectsControllerCreateRequestJson = CreateProjectDto; @@ -12495,6 +14348,11 @@ export const PayoutAddressesControllerUpdateRequestJson = UpdatePayoutAddressDto; export type PayoutAddressesControllerUpdate200 = PayoutAddressDto; export const PayoutAddressesControllerUpdate200 = PayoutAddressDto; +export type PayoutRequestsControllerRequestPayoutRequestJson = RequestPayoutDto; +export const PayoutRequestsControllerRequestPayoutRequestJson = + RequestPayoutDto; +export type PayoutRequestsControllerRequestPayout201 = PayoutRequestDto; +export const PayoutRequestsControllerRequestPayout201 = PayoutRequestDto; export type NetworkAddressReferralControllerGetByAddressParams = { readonly "X-API-KEY"?: string; }; @@ -12526,9 +14384,13 @@ export type RevenueBreakdownControllerGetRevenueSummaryParams = { readonly project_ids?: ReadonlyArray; }; export const RevenueBreakdownControllerGetRevenueSummaryParams = Schema.Struct({ - month: Schema.optionalKey(Schema.String), - date_from: Schema.optionalKey(Schema.String), - date_to: Schema.optionalKey(Schema.String), + month: Schema.optionalKey(Schema.String.annotate({ examples: ["2026-05"] })), + date_from: Schema.optionalKey( + Schema.String.annotate({ examples: ["2026-05-01"] }) + ), + date_to: Schema.optionalKey( + Schema.String.annotate({ examples: ["2026-05-31"] }) + ), project_ids: Schema.optionalKey(Schema.Array(Schema.String)), }); export type RevenueBreakdownControllerGetRevenueSummary200 = @@ -12542,9 +14404,13 @@ export type KpiSummaryControllerGetSummaryParams = { readonly project_ids?: ReadonlyArray; }; export const KpiSummaryControllerGetSummaryParams = Schema.Struct({ - month: Schema.optionalKey(Schema.String), - date_from: Schema.optionalKey(Schema.String), - date_to: Schema.optionalKey(Schema.String), + month: Schema.optionalKey(Schema.String.annotate({ examples: ["2026-05"] })), + date_from: Schema.optionalKey( + Schema.String.annotate({ examples: ["2026-05-01"] }) + ), + date_to: Schema.optionalKey( + Schema.String.annotate({ examples: ["2026-05-31"] }) + ), project_ids: Schema.optionalKey(Schema.Array(Schema.String)), }); export type KpiSummaryControllerGetSummary200 = KpiSummaryResponseDto; @@ -12557,6 +14423,18 @@ export const KpiTrendsControllerGetTrendsParams = Schema.Struct({ }); export type KpiTrendsControllerGetTrends200 = KpiTrendsResponseDto; export const KpiTrendsControllerGetTrends200 = KpiTrendsResponseDto; +export type MonthlyReportControllerList200 = MonthlyReportListResponseDto; +export const MonthlyReportControllerList200 = MonthlyReportListResponseDto; +export type MonthlyReportControllerCreateDraftRequestJson = + CreateMonthlyReportDraftDto; +export const MonthlyReportControllerCreateDraftRequestJson = + CreateMonthlyReportDraftDto; +export type MonthlyReportControllerCreateDraft201 = MonthlyReportDetailDto; +export const MonthlyReportControllerCreateDraft201 = MonthlyReportDetailDto; +export type MonthlyReportControllerGetDetail200 = MonthlyReportDetailDto; +export const MonthlyReportControllerGetDetail200 = MonthlyReportDetailDto; +export type MonthlyReportControllerPublish200 = MonthlyReportDetailDto; +export const MonthlyReportControllerPublish200 = MonthlyReportDetailDto; export type ReportEntryControllerListParams = { readonly limit?: number; readonly page?: number; @@ -12758,7 +14636,17 @@ export type ReportProjectControllerGetDailyRevenues200 = { readonly integrationId: string; readonly validatorAddress: string | null; readonly totalRevenueAmountWei: string; - readonly token: TokenDto | null; + readonly token: { + readonly name: string; + readonly network: Networks; + readonly symbol: string; + readonly decimals: number; + readonly address?: string; + readonly coinGeckoId?: string; + readonly logoURI?: string; + readonly isPoints?: boolean; + readonly feeConfigurationId?: string; + }; }>; readonly hasNextPage: boolean; readonly limit: number; @@ -12774,7 +14662,19 @@ export const ReportProjectControllerGetDailyRevenues200 = Schema.Struct({ integrationId: Schema.String, validatorAddress: Schema.Union([Schema.String, Schema.Null]), totalRevenueAmountWei: Schema.String, - token: Schema.Union([TokenDto, Schema.Null]), + token: Schema.Struct({ + name: Schema.String, + network: Networks, + symbol: Schema.String, + decimals: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + address: Schema.optionalKey(Schema.String), + coinGeckoId: Schema.optionalKey(Schema.String), + logoURI: Schema.optionalKey(Schema.String), + isPoints: Schema.optionalKey(Schema.Boolean), + feeConfigurationId: Schema.optionalKey(Schema.String), + }), }) ).annotate({ description: "Array of data items" }), hasNextPage: Schema.Boolean, @@ -12817,7 +14717,17 @@ export type ReportProjectControllerGetDailyPerformance200 = { readonly totalEnteredAmountWei: string | null; readonly totalExitedAmountWei: string | null; readonly totalTvlAmountWei: string | null; - readonly token: TokenDto | null; + readonly token: { + readonly name: string; + readonly network: Networks; + readonly symbol: string; + readonly decimals: number; + readonly address?: string; + readonly coinGeckoId?: string; + readonly logoURI?: string; + readonly isPoints?: boolean; + readonly feeConfigurationId?: string; + }; }>; readonly hasNextPage: boolean; readonly limit: number; @@ -12835,7 +14745,19 @@ export const ReportProjectControllerGetDailyPerformance200 = Schema.Struct({ totalEnteredAmountWei: Schema.Union([Schema.String, Schema.Null]), totalExitedAmountWei: Schema.Union([Schema.String, Schema.Null]), totalTvlAmountWei: Schema.Union([Schema.String, Schema.Null]), - token: Schema.Union([TokenDto, Schema.Null]), + token: Schema.Struct({ + name: Schema.String, + network: Networks, + symbol: Schema.String, + decimals: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + address: Schema.optionalKey(Schema.String), + coinGeckoId: Schema.optionalKey(Schema.String), + logoURI: Schema.optionalKey(Schema.String), + isPoints: Schema.optionalKey(Schema.Boolean), + feeConfigurationId: Schema.optionalKey(Schema.String), + }), }) ).annotate({ description: "Array of data items" }), hasNextPage: Schema.Boolean, @@ -12940,7 +14862,17 @@ export type ProgrammaticReportingControllerGetDailyRevenues200 = { readonly revShare: number | null; readonly projectShare: number | null; readonly performanceFee: number | null; - readonly token: TokenDto | null; + readonly token: { + readonly name: string; + readonly network: Networks; + readonly symbol: string; + readonly decimals: number; + readonly address?: string; + readonly coinGeckoId?: string; + readonly logoURI?: string; + readonly isPoints?: boolean; + readonly feeConfigurationId?: string; + }; }>; readonly hasNextPage: boolean; readonly limit: number; @@ -12982,7 +14914,19 @@ export const ProgrammaticReportingControllerGetDailyRevenues200 = Schema.Struct( ), Schema.Null, ]), - token: Schema.Union([TokenDto, Schema.Null]), + token: Schema.Struct({ + name: Schema.String, + network: Networks, + symbol: Schema.String, + decimals: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + address: Schema.optionalKey(Schema.String), + coinGeckoId: Schema.optionalKey(Schema.String), + logoURI: Schema.optionalKey(Schema.String), + isPoints: Schema.optionalKey(Schema.Boolean), + feeConfigurationId: Schema.optionalKey(Schema.String), + }), }) ).annotate({ description: "Array of data items" }), hasNextPage: Schema.Boolean, @@ -13043,7 +14987,17 @@ export type ProgrammaticReportingControllerGetDailyPerformance200 = { readonly totalEnteredAmountWei: string; readonly totalExitedAmountWei: string; readonly totalTvlAmountWei: string; - readonly token: TokenDto | null; + readonly token: { + readonly name: string; + readonly network: Networks; + readonly symbol: string; + readonly decimals: number; + readonly address?: string; + readonly coinGeckoId?: string; + readonly logoURI?: string; + readonly isPoints?: boolean; + readonly feeConfigurationId?: string; + }; }>; readonly hasNextPage: boolean; readonly limit: number; @@ -13061,7 +15015,19 @@ export const ProgrammaticReportingControllerGetDailyPerformance200 = totalEnteredAmountWei: Schema.String, totalExitedAmountWei: Schema.String, totalTvlAmountWei: Schema.String, - token: Schema.Union([TokenDto, Schema.Null]), + token: Schema.Struct({ + name: Schema.String, + network: Networks, + symbol: Schema.String, + decimals: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + address: Schema.optionalKey(Schema.String), + coinGeckoId: Schema.optionalKey(Schema.String), + logoURI: Schema.optionalKey(Schema.String), + isPoints: Schema.optionalKey(Schema.Boolean), + feeConfigurationId: Schema.optionalKey(Schema.String), + }), }) ).annotate({ description: "Array of data items" }), hasNextPage: Schema.Boolean, @@ -13102,11 +15068,19 @@ export type ProgrammaticReportingControllerGetPerpActionsParams = { }; export const ProgrammaticReportingControllerGetPerpActionsParams = Schema.Struct({ - providerId: Schema.optionalKey(Schema.String), - address: Schema.optionalKey(Schema.String), + providerId: Schema.optionalKey( + Schema.String.annotate({ examples: ["hyperliquid"] }) + ), + address: Schema.optionalKey( + Schema.String.annotate({ + examples: ["0xb8c8eb8efc68796e766f6ab320db8c165c064949"], + }) + ), status: Schema.optionalKey(ActionStatus), type: Schema.optionalKey(PerpActionTypes), - marketId: Schema.optionalKey(Schema.String), + marketId: Schema.optionalKey( + Schema.String.annotate({ examples: ["hyperliquid-eth-usdc"] }) + ), limit: Schema.optionalKey( Schema.Number.check( Schema.isFinite().annotate({ expected: "a finite number" }) @@ -13126,7 +15100,7 @@ export type ProgrammaticReportingControllerGetPerpActions200 = { readonly status: ActionStatus; readonly providerId: string; readonly address: string; - readonly args: {}; + readonly args: { readonly [x: string]: Schema.Json }; readonly summary: { readonly [x: string]: Schema.Json } | null; readonly createdAt: string; readonly completedAt: string | null; @@ -13145,10 +15119,13 @@ export const ProgrammaticReportingControllerGetPerpActions200 = Schema.Struct({ }), type: Schema.suspend( (): Schema.Codec => PerpActionTypes - ).annotate({ examples: ["open"] }), + ).annotate({ description: "Action type executed", examples: ["open"] }), status: Schema.suspend( (): Schema.Codec => ActionStatus - ).annotate({ examples: ["SUCCESS"] }), + ).annotate({ + description: "Current action status", + examples: ["SUCCESS"], + }), providerId: Schema.String.annotate({ description: "Provider identifier", examples: ["hyperliquid"], @@ -13157,7 +15134,10 @@ export const ProgrammaticReportingControllerGetPerpActions200 = Schema.Struct({ description: "User wallet address", examples: ["0xb8c8eb8efc68796e766f6ab320db8c165c064949"], }), - args: Schema.Struct({}).annotate({ + args: Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Full action arguments", examples: [ { marketId: "hyperliquid-eth-usdc", amount: "100", leverage: 10 }, @@ -13196,6 +15176,96 @@ export const ProgrammaticReportingControllerGetPerpActions200 = Schema.Struct({ Schema.isFinite().annotate({ expected: "a finite number" }) ), }); +export type ProgrammaticReportingControllerGetPerpActivityParams = { + readonly providerId?: string; + readonly address?: string; + readonly status?: ActionStatus; + readonly type?: PerpActionTypes; + readonly marketId?: string; + readonly from?: string; + readonly to?: string; + readonly limit?: number; + readonly page?: number; + readonly "X-ADMIN-API-KEY": string; +}; +export const ProgrammaticReportingControllerGetPerpActivityParams = + Schema.Struct({ + providerId: Schema.optionalKey( + Schema.String.annotate({ examples: ["hyperliquid"] }) + ), + address: Schema.optionalKey( + Schema.String.annotate({ + examples: ["0xb8c8eb8efc68796e766f6ab320db8c165c064949"], + }) + ), + status: Schema.optionalKey(ActionStatus), + type: Schema.optionalKey(PerpActionTypes), + marketId: Schema.optionalKey( + Schema.String.annotate({ examples: ["hyperliquid-eth-usdc"] }) + ), + from: Schema.optionalKey( + Schema.String.annotate({ examples: ["2026-04-01T00:00:00.000Z"] }) + ), + to: Schema.optionalKey( + Schema.String.annotate({ examples: ["2026-04-30T23:59:59.999Z"] }) + ), + limit: Schema.optionalKey( + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + ), + page: Schema.optionalKey( + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + ), + "X-ADMIN-API-KEY": Schema.String, + }); +export type ProgrammaticReportingControllerGetPerpActivity200 = { + readonly data: ReadonlyArray< + | { + readonly type: ProgrammaticPerpActivityItemType; + readonly action: ProgrammaticPerpReportingActionDto; + } + | { + readonly type: ProgrammaticPerpActivityItemType; + readonly event: ProgrammaticPerpReportingEventDto; + } + >; + readonly hasNextPage: boolean; + readonly limit: number; + readonly page: number; +}; +export const ProgrammaticReportingControllerGetPerpActivity200 = Schema.Struct({ + data: Schema.Array( + Schema.Union( + [ + Schema.Struct({ + type: Schema.suspend( + (): Schema.Codec => + ProgrammaticPerpActivityItemType + ).annotate({ examples: ["action"] }), + action: ProgrammaticPerpReportingActionDto, + }), + Schema.Struct({ + type: Schema.suspend( + (): Schema.Codec => + ProgrammaticPerpActivityItemType + ).annotate({ examples: ["event"] }), + event: ProgrammaticPerpReportingEventDto, + }), + ], + { mode: "oneOf" } + ) + ).annotate({ description: "Array of data items" }), + hasNextPage: Schema.Boolean, + limit: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + page: Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), +}); export type UsersMeControllerFindMe200 = UserDto; export const UsersMeControllerFindMe200 = UserDto; export type UsersMeControllerPatchMeRequestJson = UpdateUserMeDto; @@ -13279,6 +15349,8 @@ export type UsersControllerUpdateRequestJson = UpdateUserDto; export const UsersControllerUpdateRequestJson = UpdateUserDto; export type UsersControllerUpdate200 = UserDto; export const UsersControllerUpdate200 = UserDto; +export type UsersControllerResendInvitation200 = UserDto; +export const UsersControllerResendInvitation200 = UserDto; export type ActionControllerGetActionParams = { readonly "X-API-KEY"?: string }; export const ActionControllerGetActionParams = Schema.Struct({ "X-API-KEY": Schema.optionalKey(Schema.String), @@ -14540,7 +16612,11 @@ export type OAVControllerFindYieldsByTokenParams = { readonly address?: string; }; export const OAVControllerFindYieldsByTokenParams = Schema.Struct({ - address: Schema.optionalKey(Schema.String), + address: Schema.optionalKey( + Schema.String.annotate({ + examples: ["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"], + }) + ), }); export type OAVControllerFindYieldsByToken200 = ReadonlyArray; export const OAVControllerFindYieldsByToken200 = Schema.Array(YieldDto); @@ -14566,7 +16642,7 @@ export type OAVControllerFindYieldsByToken503 = StakeKitErrorDto; export const OAVControllerFindYieldsByToken503 = StakeKitErrorDto; export type OAVControllerFindAllParams = { readonly active?: boolean }; export const OAVControllerFindAllParams = Schema.Struct({ - active: Schema.optionalKey(Schema.Boolean), + active: Schema.optionalKey(Schema.Boolean.annotate({ examples: [true] })), }); export type OAVControllerFindAll200 = ReadonlyArray; export const OAVControllerFindAll200 = Schema.Array(OAVResponseDto); @@ -15279,10 +17355,12 @@ export type YieldControllerGetBalanceTransferEventsParams = { readonly "X-API-KEY"?: string; }; export const YieldControllerGetBalanceTransferEventsParams = Schema.Struct({ - address: Schema.String, + address: Schema.String.annotate({ + examples: ["0x742d35Cc6634C0532925a3b844Bc454e4438f44e"], + }), sort: Schema.optionalKey(Schema.Literals(["asc", "desc"])), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -15296,7 +17374,7 @@ export const YieldControllerGetBalanceTransferEventsParams = Schema.Struct({ ) ), offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -15304,7 +17382,11 @@ export const YieldControllerGetBalanceTransferEventsParams = Schema.Struct({ }) ) ), - feeConfigurationId: Schema.optionalKey(Schema.String), + feeConfigurationId: Schema.optionalKey( + Schema.String.annotate({ + examples: ["66f299cd-aaaa-bbbb-cccc-d1f26e3a02db"], + }) + ), "X-API-KEY": Schema.optionalKey(Schema.String), }); export type YieldControllerGetBalanceTransferEvents200 = @@ -15488,6 +17570,7 @@ export type YieldV2ControllerYieldsParams = { | "yield-xyz" | "kamino" | "veda" + | "kinetiq" | "lista" | "dolomite" | "midas" @@ -15552,6 +17635,7 @@ export type YieldV2ControllerYieldsParams = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -15702,6 +17786,7 @@ export const YieldV2ControllerYieldsParams = Schema.Struct({ "yield-xyz", "kamino", "veda", + "kinetiq", "lista", "dolomite", "midas", @@ -15781,6 +17866,7 @@ export const YieldV2ControllerYieldsParams = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -16101,6 +18187,7 @@ export type YieldV2ControllerGetFeeConfigurations200 = { readonly performanceFeeBps: number | null; readonly depositFeeBps: number | null; readonly chargeOnFirstDepositOnly: boolean; + readonly blueBundleOriginationFeeBps: number | null; readonly allocatorVaultContractAddress: string | null; readonly feeWrapperContractAddress: string | null; readonly feeRecipientAddress: string | null; @@ -16134,7 +18221,7 @@ export const YieldV2ControllerGetFeeConfigurations200 = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), + ]), performanceFeeBps: Schema.Union([ Schema.Number.check( Schema.isFinite().annotate({ expected: "a finite number" }) @@ -16150,7 +18237,7 @@ export const YieldV2ControllerGetFeeConfigurations200 = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), + ]), depositFeeBps: Schema.Union([ Schema.Number.check( Schema.isFinite().annotate({ expected: "a finite number" }) @@ -16166,8 +18253,27 @@ export const YieldV2ControllerGetFeeConfigurations200 = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), + ]), chargeOnFirstDepositOnly: Schema.Boolean.annotate({ examples: [false] }), + blueBundleOriginationFeeBps: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + .check( + Schema.isLessThanOrEqualTo(9999).annotate({ + expected: "a value less than or equal to 9999", + }) + ), + Schema.Null, + ]).annotate({ + description: + "Config-sourced Morpho BlueBundle origination fee in basis points. Used with feeRecipientAddress for supplyAndBorrow.", + }), allocatorVaultContractAddress: Schema.Union([Schema.String, Schema.Null]), feeWrapperContractAddress: Schema.Union([Schema.String, Schema.Null]), feeRecipientAddress: Schema.Union([Schema.String, Schema.Null]), @@ -16216,7 +18322,11 @@ export type EarnControllerGetStakesParams = { readonly "X-API-KEY"?: string; }; export const EarnControllerGetStakesParams = Schema.Struct({ - stake_addresses: Schema.String, + stake_addresses: Schema.String.annotate({ + examples: [ + "0x1D1479C185d32EB90533a08b36B3CFa5F84A0E6B%2C0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5", + ], + }), "X-API-KEY": Schema.optionalKey(Schema.String), }); export type EarnControllerGetStakes200 = ReadonlyArray; @@ -16287,6 +18397,7 @@ export type FeeConfigurationControllerGet200 = { readonly performanceFeeBps: number | null; readonly depositFeeBps: number | null; readonly chargeOnFirstDepositOnly: boolean; + readonly blueBundleOriginationFeeBps: number | null; readonly allocatorVaultContractAddress: string | null; readonly feeWrapperContractAddress: string | null; readonly feeRecipientAddress: string | null; @@ -16320,7 +18431,7 @@ export const FeeConfigurationControllerGet200 = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), + ]), performanceFeeBps: Schema.Union([ Schema.Number.check( Schema.isFinite().annotate({ expected: "a finite number" }) @@ -16336,7 +18447,7 @@ export const FeeConfigurationControllerGet200 = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), + ]), depositFeeBps: Schema.Union([ Schema.Number.check( Schema.isFinite().annotate({ expected: "a finite number" }) @@ -16352,8 +18463,27 @@ export const FeeConfigurationControllerGet200 = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), + ]), chargeOnFirstDepositOnly: Schema.Boolean.annotate({ examples: [false] }), + blueBundleOriginationFeeBps: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + .check( + Schema.isLessThanOrEqualTo(9999).annotate({ + expected: "a value less than or equal to 9999", + }) + ), + Schema.Null, + ]).annotate({ + description: + "Config-sourced Morpho BlueBundle origination fee in basis points. Used with feeRecipientAddress for supplyAndBorrow.", + }), allocatorVaultContractAddress: Schema.Union([Schema.String, Schema.Null]), feeWrapperContractAddress: Schema.Union([Schema.String, Schema.Null]), feeRecipientAddress: Schema.Union([Schema.String, Schema.Null]), @@ -16414,6 +18544,7 @@ export type ProgrammaticFeeConfigurationControllerGet200 = { readonly performanceFeeBps: number | null; readonly depositFeeBps: number | null; readonly chargeOnFirstDepositOnly: boolean; + readonly blueBundleOriginationFeeBps: number | null; readonly allocatorVaultContractAddress: string | null; readonly feeWrapperContractAddress: string | null; readonly feeRecipientAddress: string | null; @@ -16447,7 +18578,7 @@ export const ProgrammaticFeeConfigurationControllerGet200 = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), + ]), performanceFeeBps: Schema.Union([ Schema.Number.check( Schema.isFinite().annotate({ expected: "a finite number" }) @@ -16463,7 +18594,7 @@ export const ProgrammaticFeeConfigurationControllerGet200 = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), + ]), depositFeeBps: Schema.Union([ Schema.Number.check( Schema.isFinite().annotate({ expected: "a finite number" }) @@ -16479,8 +18610,27 @@ export const ProgrammaticFeeConfigurationControllerGet200 = Schema.Struct({ }) ), Schema.Null, - ]).annotate({ examples: ["100"] }), + ]), chargeOnFirstDepositOnly: Schema.Boolean.annotate({ examples: [false] }), + blueBundleOriginationFeeBps: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + .check( + Schema.isLessThanOrEqualTo(9999).annotate({ + expected: "a value less than or equal to 9999", + }) + ), + Schema.Null, + ]).annotate({ + description: + "Config-sourced Morpho BlueBundle origination fee in basis points. Used with feeRecipientAddress for supplyAndBorrow.", + }), allocatorVaultContractAddress: Schema.Union([Schema.String, Schema.Null]), feeWrapperContractAddress: Schema.Union([Schema.String, Schema.Null]), feeRecipientAddress: Schema.Union([Schema.String, Schema.Null]), @@ -16548,7 +18698,7 @@ export const FeeConfigurationAdminControllerListParams = Schema.Struct({ status: Schema.optionalKey(FeeConfigurationStatus), integrationId: Schema.optionalKey(Schema.String), offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -16557,7 +18707,7 @@ export const FeeConfigurationAdminControllerListParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -16611,11 +18761,11 @@ export type RiskParametersControllerFindMany200 = { readonly category: string; readonly item: string; readonly isDynamic: boolean; - readonly value?: {}; + readonly value?: { readonly [x: string]: Schema.Json }; readonly network?: Networks; - readonly asset?: {}; - readonly protocol?: {}; - readonly integrationId?: {}; + readonly asset?: { readonly [x: string]: Schema.Json }; + readonly protocol?: { readonly [x: string]: Schema.Json }; + readonly integrationId?: { readonly [x: string]: Schema.Json }; readonly createdAt: string; readonly updatedAt: string; }>; @@ -16630,11 +18780,31 @@ export const RiskParametersControllerFindMany200 = Schema.Struct({ category: Schema.String, item: Schema.String, isDynamic: Schema.Boolean, - value: Schema.optionalKey(Schema.Struct({})), + value: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), network: Schema.optionalKey(Networks), - asset: Schema.optionalKey(Schema.Struct({})), - protocol: Schema.optionalKey(Schema.Struct({})), - integrationId: Schema.optionalKey(Schema.Struct({})), + asset: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + protocol: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + integrationId: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), createdAt: Schema.String.annotate({ format: "date-time" }), updatedAt: Schema.String.annotate({ format: "date-time" }), }) @@ -16781,7 +18951,7 @@ export type ValidatorControllerFindAllProviders200 = { readonly website: string; readonly rank: number; readonly preferred: boolean; - readonly revshare?: {}; + readonly revshare?: { readonly [x: string]: Schema.Json }; readonly createdAt: string; readonly updatedAt: string; }>; @@ -16800,7 +18970,12 @@ export const ValidatorControllerFindAllProviders200 = Schema.Struct({ Schema.isFinite().annotate({ expected: "a finite number" }) ), preferred: Schema.Boolean, - revshare: Schema.optionalKey(Schema.Struct({})), + revshare: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), createdAt: Schema.String.annotate({ format: "date-time" }), updatedAt: Schema.String.annotate({ format: "date-time" }), }) @@ -16852,10 +19027,10 @@ export type ValidatorControllerGetAllHistoricalRevshareChanges200 = { readonly validatorId: string; readonly type: "on_chain" | "override"; readonly lastDay: string; - readonly preferred?: {}; - readonly apr?: {}; - readonly commission?: {}; - readonly mevCommission?: {}; + readonly preferred?: { readonly [x: string]: Schema.Json }; + readonly apr?: { readonly [x: string]: Schema.Json }; + readonly commission?: { readonly [x: string]: Schema.Json }; + readonly mevCommission?: { readonly [x: string]: Schema.Json }; }>; readonly hasNextPage: boolean; readonly limit: number; @@ -16869,10 +19044,30 @@ export const ValidatorControllerGetAllHistoricalRevshareChanges200 = validatorId: Schema.String, type: Schema.Literals(["on_chain", "override"]), lastDay: Schema.String.annotate({ format: "date-time" }), - preferred: Schema.optionalKey(Schema.Struct({})), - apr: Schema.optionalKey(Schema.Struct({})), - commission: Schema.optionalKey(Schema.Struct({})), - mevCommission: Schema.optionalKey(Schema.Struct({})), + preferred: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + apr: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + commission: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + mevCommission: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), }) ).annotate({ description: "Array of data items" }), hasNextPage: Schema.Boolean, @@ -16921,29 +19116,29 @@ export type ValidatorControllerFindAll200 = { readonly integrationId: string; readonly address: string; readonly status: ValidatorStatusTypes; - readonly lastFoundAt?: {}; + readonly lastFoundAt?: { readonly [x: string]: Schema.Json }; readonly provider?: ValidatorProviderDto; - readonly providerId?: {}; - readonly name?: {}; - readonly nameOverride?: {}; - readonly website?: {}; - readonly websiteOverride?: {}; - readonly image?: {}; - readonly imageOverride?: {}; - readonly apr?: {}; - readonly aprOverride?: {}; - readonly commission?: {}; - readonly commissionOverride?: {}; - readonly mevCommission?: {}; - readonly mevCommissionOverride?: {}; - readonly stakedBalance?: {}; - readonly votingPower?: {}; - readonly remainingPossibleStake?: {}; - readonly minimumStake?: {}; - readonly remainingSlots?: {}; - readonly endDate?: {}; - readonly nominatorCount?: {}; - readonly subnetId?: {}; + readonly providerId?: { readonly [x: string]: Schema.Json }; + readonly name?: { readonly [x: string]: Schema.Json }; + readonly nameOverride?: { readonly [x: string]: Schema.Json }; + readonly website?: { readonly [x: string]: Schema.Json }; + readonly websiteOverride?: { readonly [x: string]: Schema.Json }; + readonly image?: { readonly [x: string]: Schema.Json }; + readonly imageOverride?: { readonly [x: string]: Schema.Json }; + readonly apr?: { readonly [x: string]: Schema.Json }; + readonly aprOverride?: { readonly [x: string]: Schema.Json }; + readonly commission?: { readonly [x: string]: Schema.Json }; + readonly commissionOverride?: { readonly [x: string]: Schema.Json }; + readonly mevCommission?: { readonly [x: string]: Schema.Json }; + readonly mevCommissionOverride?: { readonly [x: string]: Schema.Json }; + readonly stakedBalance?: { readonly [x: string]: Schema.Json }; + readonly votingPower?: { readonly [x: string]: Schema.Json }; + readonly remainingPossibleStake?: { readonly [x: string]: Schema.Json }; + readonly minimumStake?: { readonly [x: string]: Schema.Json }; + readonly remainingSlots?: { readonly [x: string]: Schema.Json }; + readonly endDate?: { readonly [x: string]: Schema.Json }; + readonly nominatorCount?: { readonly [x: string]: Schema.Json }; + readonly subnetId?: { readonly [x: string]: Schema.Json }; readonly createdAt: string; readonly updatedAt: string; }>; @@ -16958,29 +19153,139 @@ export const ValidatorControllerFindAll200 = Schema.Struct({ integrationId: Schema.String, address: Schema.String, status: ValidatorStatusTypes, - lastFoundAt: Schema.optionalKey(Schema.Struct({})), + lastFoundAt: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), provider: Schema.optionalKey(ValidatorProviderDto), - providerId: Schema.optionalKey(Schema.Struct({})), - name: Schema.optionalKey(Schema.Struct({})), - nameOverride: Schema.optionalKey(Schema.Struct({})), - website: Schema.optionalKey(Schema.Struct({})), - websiteOverride: Schema.optionalKey(Schema.Struct({})), - image: Schema.optionalKey(Schema.Struct({})), - imageOverride: Schema.optionalKey(Schema.Struct({})), - apr: Schema.optionalKey(Schema.Struct({})), - aprOverride: Schema.optionalKey(Schema.Struct({})), - commission: Schema.optionalKey(Schema.Struct({})), - commissionOverride: Schema.optionalKey(Schema.Struct({})), - mevCommission: Schema.optionalKey(Schema.Struct({})), - mevCommissionOverride: Schema.optionalKey(Schema.Struct({})), - stakedBalance: Schema.optionalKey(Schema.Struct({})), - votingPower: Schema.optionalKey(Schema.Struct({})), - remainingPossibleStake: Schema.optionalKey(Schema.Struct({})), - minimumStake: Schema.optionalKey(Schema.Struct({})), - remainingSlots: Schema.optionalKey(Schema.Struct({})), - endDate: Schema.optionalKey(Schema.Struct({})), - nominatorCount: Schema.optionalKey(Schema.Struct({})), - subnetId: Schema.optionalKey(Schema.Struct({})), + providerId: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + name: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + nameOverride: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + website: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + websiteOverride: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + image: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + imageOverride: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + apr: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + aprOverride: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + commission: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + commissionOverride: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + mevCommission: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + mevCommissionOverride: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + stakedBalance: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + votingPower: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + remainingPossibleStake: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + minimumStake: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + remainingSlots: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + endDate: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + nominatorCount: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), + subnetId: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ) + ), createdAt: Schema.String.annotate({ format: "date-time" }), updatedAt: Schema.String.annotate({ format: "date-time" }), }) @@ -17575,7 +19880,7 @@ export type YieldStatusControllerFindAllParams = { }; export const YieldStatusControllerFindAllParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -17584,7 +19889,7 @@ export const YieldStatusControllerFindAllParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ diff --git a/packages/widget/src/generated/api/legacy.ts b/packages/widget/src/generated/api/legacy.ts index 3afe7b455..6a89894a1 100644 --- a/packages/widget/src/generated/api/legacy.ts +++ b/packages/widget/src/generated/api/legacy.ts @@ -2,7 +2,8 @@ // biome-ignore-all lint: generated by Effect OpenAPI import * as Data from "effect/Data"; import * as Effect from "effect/Effect"; -import type * as HttpClient from "effect/unstable/http/HttpClient"; +import * as Stream from "effect/Stream"; +import * as HttpClient from "effect/unstable/http/HttpClient"; import * as HttpClientError from "effect/unstable/http/HttpClientError"; import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest"; import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse"; @@ -23,7 +24,7 @@ export type AuthEmailLoginMfaChallengeResponseDto = { }; export type AuthConfirmEmailDto = { readonly hash: string }; export type AuthUpdateDto = { readonly name: string; readonly surname: string }; -export type CampaignStatus = "draft" | "active" | "paused" | "ended"; +export type CampaignStatus = "draft" | "active"; export type Networks = | "ethereum" | "ethereum-goerli" @@ -46,6 +47,7 @@ export type Networks = | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -143,7 +145,7 @@ export type StakeKitErrorDto = { readonly message: string; readonly code: number; readonly type?: string; - readonly details?: {}; + readonly details?: { readonly [x: string]: unknown }; readonly path?: string; }; export type CampaignAlertFlagsDto = { @@ -361,6 +363,7 @@ export type CampaignV2MilestoneItemDto = { readonly trancheAmount: string; readonly extendedEndTime?: string; }; +export type ResumeCampaignV2Dto = { readonly backfillPausedWindows?: boolean }; export type CampaignV2AlertFlagsDto = { readonly lowBudget: boolean; readonly noQualifyingUsers: boolean; @@ -458,6 +461,37 @@ export type BlacklistedAddressV2Dto = { readonly totalEarned: string; readonly totalUnpaid: string; }; +export type CampaignSimulationRunDto = { + readonly id: string; + readonly sourceCampaignId: string | null; + readonly simulationCampaignId: string | null; + readonly mode: "forecast" | "replay" | "synthetic"; + readonly days: number; + readonly scenario: string | null; + readonly params: { readonly [x: string]: unknown } | null; + readonly status: "pending" | "running" | "completed" | "failed"; + readonly lastError: string | null; + readonly resultSummary: { readonly [x: string]: unknown } | null; + readonly startedAt: string | null; + readonly completedAt: string | null; + readonly createdAt: string; +}; +export type CampaignSimulationRewardTokenDto = { + readonly network: string; + readonly address: string; + readonly decimals: number; + readonly symbol: string; + readonly name: string; +}; +export type CampaignSimulationBalanceEventDto = { + readonly atHour: number; + readonly userIndex: number; + readonly deltaTokens: string; +}; +export type CampaignSimulationBudgetInjectionDto = { + readonly atHour: number; + readonly addBudget: string; +}; export type CampaignV2PointsRunDto = { readonly runId: string; readonly status: string; @@ -477,17 +511,6 @@ export type TopUpCampaignV2BudgetDto = { readonly targetMilestoneOrder?: number; }; export type UnlockCampaignV2MilestoneDto = { readonly reason: string }; -export type WindowAccrualSummaryDto = { - readonly windowStart: string; - readonly windowEnd: string; - readonly qualifyingUserCount: number; - readonly totalQualifyingTvl: string; - readonly windowBudgetAllocated: string; - readonly windowBudgetDistributed: string; - readonly ceilingActive: boolean; - readonly calculatedApr: number | null; - readonly pricePerShare: string | null; -}; export type AccrualWindowSortField = "allocatedReward"; export type UserWindowAccrualDto = { readonly address: string; @@ -569,11 +592,12 @@ export type Team = { readonly updatedAt: string; readonly activated: boolean; readonly deletedAt: string | null; - readonly contactDetails: {}; + readonly contactDetails: { readonly [x: string]: unknown }; readonly category: "pro" | "standard" | "trial"; readonly name: string; readonly serviceConditionsAcceptedAt: string | null; readonly type: "provider" | "integrator"; + readonly clientType: "channelPartner" | "directConsumer" | "endClient"; readonly providerId: string | null; readonly oavEnabled: boolean; readonly isMfaEnforced: boolean; @@ -582,6 +606,7 @@ export type Team = { readonly borrowRevokeAuthorizationEnabled: boolean; readonly referredBy: string | null; readonly referralCode: string | null; + readonly parentTeamId: string | null; }; export type AuditLogDto = { readonly id: string; @@ -595,6 +620,7 @@ export type AuditLogDto = { readonly createdAt: string; }; export type KeyCategory = "pro" | "standard" | "trial"; +export type ClientType = "channelPartner" | "directConsumer" | "endClient"; export type Project = { readonly id: string; readonly createdAt: string; @@ -659,7 +685,7 @@ export type IndexingOwnerDto = { export type CreatePayoutAddressDto = { readonly address: string; readonly network: string; - readonly scope?: "yield" | "trade" | null; + readonly scope?: "yield" | "trade"; readonly providerId?: string | null; readonly note?: string | null; }; @@ -674,6 +700,123 @@ export type PayoutAddressDto = { readonly note?: string | null; readonly addressInvalid: boolean; }; +export type UpdatePayoutAddressDto = { + readonly address: string; + readonly network: + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; + readonly scope?: "yield" | "trade"; + readonly providerId?: string | null; + readonly note?: string | null; +}; +export type PayoutRequestStatus = + | "pending" + | "processing" + | "paid" + | "rejected"; export type ReferralDto = { readonly id: string; readonly code: string }; export type IntegrationFreshness = | "real_time" @@ -695,6 +838,8 @@ export type TrendDataPointDto = { readonly revenue_usd: string | null; readonly active_users: string | null; }; +export type MonthlyReportStatus = "draft" | "published"; +export type CreateMonthlyReportDraftDto = { readonly month: string }; export type CosmosAdditionalAddressesDto = { readonly cosmosPubKey: string }; export type BinanceAdditionalAddressesDto = { readonly binanceBeaconAddress: string; @@ -890,6 +1035,7 @@ export type YieldProviders = | "yield-xyz" | "kamino" | "veda" + | "kinetiq" | "lista" | "dolomite" | "midas" @@ -996,6 +1142,15 @@ export type PerpTransactionStatus = | "CONFIRMED" | "FAILED" | "NOT_FOUND"; +export type ProgrammaticPerpActivityItemType = "event" | "action"; +export type PerpEventType = + | "order_filled" + | "liquidation" + | "stop_loss_triggered" + | "take_profit_triggered"; +export type OrderSide = "buy" | "sell"; +export type OrderType = "market" | "limit" | "stop_loss" | "take_profit"; +export type ProgrammaticPerpEventOrderTimeInForce = "ioc" | "gtc" | "alo"; export type UpdateUserMeDto = { readonly serviceConditionsAccepted?: boolean; readonly active?: boolean; @@ -1031,7 +1186,7 @@ export type GeolocationError = { readonly tags?: ReadonlyArray< "Crypto Ban" | "OFAC" | "OFSI" | "Pending Litigation" | "Staking Ban" >; - readonly details?: {}; + readonly details?: { readonly [x: string]: unknown }; readonly code: number; readonly message: string; readonly type: "GEO_LOCATION"; @@ -1054,13 +1209,13 @@ export type SubmitResponseDto = { }; export type SubmitHashRequestDto = { readonly hash: string }; export type TransactionVerificationMessageDto = { readonly message: string }; -export type PriceResponseDto = {}; +export type PriceResponseDto = { readonly [x: string]: never }; export type CreateEnabledYieldDto = { readonly integrationId: string }; export type EnabledYieldDto = { readonly integrationId: string }; export type DeleteEnabledYieldsDto = { readonly integrationIds: ReadonlyArray; }; -export type BinanceAdditionalAddressesStakeArgumentOptionsDto = {}; +export type RequiredArgumentDto = { readonly required: boolean }; export type AmountArgumentOptionsDto = { readonly required: boolean; readonly minimum?: number; @@ -1071,7 +1226,6 @@ export type DurationArgumentOptionsDto = { readonly minimum?: number; readonly maximum?: number; }; -export type RequiredArgumentDto = { readonly required: boolean }; export type TronResourceArgumentOptionsDto = { readonly required: boolean; readonly options: ReadonlyArray; @@ -1097,128 +1251,247 @@ export type FeeConfigurationStatus = | "PROCESSING" | "LIVE" | "CHANGES_REQUESTED"; -export type AllocationRewardRateDto = { - readonly total: number; - readonly rateType: string; -}; -export type OAVStrategyDto = { - readonly yieldId: string; - readonly weight?: number; -}; -export type BalanceTypes = - | "available" - | "staked" - | "unstaking" - | "unstaked" - | "preparing" - | "rewards" - | "locked" - | "unlocking"; -export type PendingActionConstraintAmountDto = { - readonly minimum?: number; - readonly maximum?: number; -}; -export type YieldBalanceLabelDto = { - readonly type: string; - readonly params: {}; -}; -export type ValidatorAddressesDto = { - readonly validatorAddresses?: ReadonlyArray; -}; -export type CustomValidatorAddresses = { - readonly integrationId: string; - readonly validatorAddresses: ReadonlyArray; -}; -export type EvmNetworks = - | "ethereum" - | "ethereum-goerli" - | "ethereum-holesky" - | "ethereum-sepolia" - | "ethereum-hoodi" - | "arbitrum" - | "base" - | "base-sepolia" - | "gnosis" - | "optimism" - | "polygon" - | "polygon-amoy" - | "starknet" - | "zksync" - | "linea" - | "unichain" - | "plume" - | "monad-testnet" - | "monad" - | "robinhood" - | "robinhood-testnet" - | "avalanche-c" - | "avalanche-c-atomic" - | "avalanche-p" - | "binance" - | "celo" - | "fantom" - | "harmony" - | "moonriver" - | "okc" - | "viction" - | "core" - | "sonic" - | "plasma" - | "katana" - | "hyperevm" - | "tempo" - | "pharos"; -export type BalanceTransferEventDto = { - readonly blockTimestamp: string; - readonly blockNumber: number; - readonly network: string; - readonly address: string; - readonly contractAddress: string; - readonly transactionId: string; - readonly transferAmountWei: string; - readonly cumulativeBalanceWei: string; -}; -export type YieldRewardsSummaryDto = { - readonly total: string; - readonly last24H: string; - readonly last7D: string; - readonly last30D: string; - readonly lastYear: string; -}; -export type CreateFeeConfigurationDtoV2 = { - readonly managementFeeBps?: number; - readonly performanceFeeBps?: number; - readonly depositFeeBps?: number; - readonly chargeOnFirstDepositOnly?: boolean; - readonly layerzeroOVaultConfig?: {}; -}; -export type WalletViewDto = { - readonly network: string; +export type AllocationDto = { readonly address: string; -}; -export type InterestViewDto = { readonly type: string; readonly value: string }; -export type EthDeFiDetailsViewDto = { - readonly contract_address: string; - readonly type?: string; -}; -export type AdaDetailsViewDto = { - readonly poolId: string; - readonly activationEpoch: number; - readonly activationDate: string; -}; -export type CosmosDetailsViewDto = { - readonly validator_address: string; - readonly delegator_address: string; - readonly delegated_at?: string; - readonly undelegated_at?: string; - readonly rewards: number; - readonly available_rewards: number; - readonly balance: number; - readonly net_apy: number; - readonly updated_at: string; -}; -export type EthNativeDetailsViewDto = { - readonly validator_address: string; + readonly network: + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; + readonly name: string; + readonly yieldId?: string; + readonly providerId?: string; + readonly allocation: string; + readonly allocationUsd: string | null; + readonly weight: number; + readonly targetWeight: number; + readonly rewardRate: { readonly total: number; readonly rateType: string }; + readonly tvl: string | null; + readonly tvlUsd: string | null; + readonly maxCapacity: string | null; + readonly remainingCapacity: string | null; +}; +export type OAVStrategyDto = { + readonly yieldId: string; + readonly weight?: number; +}; +export type BalanceTypes = + | "available" + | "staked" + | "unstaking" + | "unstaked" + | "preparing" + | "rewards" + | "locked" + | "unlocking"; +export type PendingActionConstraintAmountDto = { + readonly minimum?: number; + readonly maximum?: number; +}; +export type YieldBalanceLabelDto = { + readonly type: string; + readonly params: { readonly [x: string]: unknown }; +}; +export type ValidatorAddressesDto = { + readonly validatorAddresses?: ReadonlyArray; +}; +export type CustomValidatorAddresses = { + readonly integrationId: string; + readonly validatorAddresses: ReadonlyArray; +}; +export type EvmNetworks = + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos"; +export type BalanceTransferEventDto = { + readonly blockTimestamp: string; + readonly blockNumber: number; + readonly network: string; + readonly address: string; + readonly contractAddress: string; + readonly transactionId: string; + readonly transferAmountWei: string; + readonly cumulativeBalanceWei: string; +}; +export type YieldRewardsSummaryDto = { + readonly total: string; + readonly last24H: string; + readonly last7D: string; + readonly last30D: string; + readonly lastYear: string; +}; +export type CreateFeeConfigurationDtoV2 = { + readonly managementFeeBps?: number; + readonly performanceFeeBps?: number; + readonly depositFeeBps?: number; + readonly chargeOnFirstDepositOnly?: boolean; + readonly blueBundleOriginationFeeBps?: number; + readonly layerzeroOVaultConfig?: { readonly [x: string]: unknown }; +}; +export type WalletViewDto = { + readonly network: string; + readonly address: string; +}; +export type InterestViewDto = { readonly type: string; readonly value: string }; +export type EthDeFiDetailsViewDto = { + readonly contract_address: string; + readonly type?: string; +}; +export type AdaDetailsViewDto = { + readonly poolId: string; + readonly activationEpoch: number; + readonly activationDate: string; +}; +export type CosmosDetailsViewDto = { + readonly validator_address: string; + readonly delegator_address: string; + readonly delegated_at?: string; + readonly undelegated_at?: string; + readonly rewards: number; + readonly available_rewards: number; + readonly balance: number; + readonly net_apy: number; + readonly updated_at: string; +}; +export type EthNativeDetailsViewDto = { + readonly validator_address: string; readonly withdrawal_credentials?: string; readonly deposit_tx_sender?: string; readonly execution_fee_recipient?: string; @@ -1301,7 +1574,7 @@ export type TezosDetailsViewDto = { export type FailureViewDto = { readonly code: number; readonly reason: string; - readonly details: {}; + readonly details: { readonly [x: string]: unknown }; }; export type InvalidRequestDto = { readonly msg: string }; export type UnauthorizedDto = { readonly realm: string }; @@ -1318,13 +1591,15 @@ export type CreateFeeConfigurationDto = { readonly performanceFeeBps?: number; readonly depositFeeBps?: number; readonly chargeOnFirstDepositOnly?: boolean; - readonly layerzeroOVaultConfig?: {}; + readonly blueBundleOriginationFeeBps?: number; + readonly layerzeroOVaultConfig?: { readonly [x: string]: unknown }; }; export type UpdateFeeConfigurationDto = { readonly managementFeeBps?: number | null; readonly performanceFeeBps?: number | null; readonly depositFeeBps?: number | null; readonly chargeOnFirstDepositOnly?: boolean | null; + readonly blueBundleOriginationFeeBps?: number | null; readonly layerzeroOVaultConfig?: { readonly [x: string]: unknown } | null; }; export type InitiateSsoDto = { @@ -1332,7 +1607,7 @@ export type InitiateSsoDto = { readonly teamId?: string; readonly returnUrl?: string; }; -export type InitiateSsoResponseDto = {}; +export type InitiateSsoResponseDto = { readonly [x: string]: never }; export type SpMetadataDto = { readonly acsUrl?: string; readonly entityId?: string; @@ -1387,7 +1662,7 @@ export type MfaWebauthnPublicKeyDescriptorDto = { readonly transports?: ReadonlyArray; }; export type MfaWebauthnRegisterVerifyDto = { - readonly credential: {}; + readonly credential: { readonly [x: string]: unknown }; readonly label?: string; }; export type MfaWebauthnRegisterVerifyResponseDto = { @@ -1397,7 +1672,7 @@ export type MfaWebauthnRegisterVerifyResponseDto = { export type MfaWebauthnLoginOptionsDto = { readonly challengeToken: string }; export type MfaWebauthnLoginVerifyDto = { readonly challengeToken: string; - readonly credential: {}; + readonly credential: { readonly [x: string]: unknown }; }; export type PerpsFeeConfigurationDto = { readonly id: string; @@ -1421,7 +1696,7 @@ export type CreateValidatorProviderDto = { readonly website: string; readonly rank: number; readonly preferred?: boolean; - readonly revshare?: {}; + readonly revshare?: { readonly [x: string]: unknown }; }; export type ValidatorProviderDto = { readonly id: string; @@ -1430,7 +1705,7 @@ export type ValidatorProviderDto = { readonly website: string; readonly rank: number; readonly preferred: boolean; - readonly revshare?: {}; + readonly revshare?: { readonly [x: string]: unknown }; readonly createdAt: string; readonly updatedAt: string; }; @@ -1439,7 +1714,7 @@ export type UpdateValidatorProviderDto = { readonly website?: string; readonly rank?: number; readonly preferred?: boolean; - readonly revshare?: {}; + readonly revshare?: { readonly [x: string]: unknown }; readonly csvFile?: string; }; export type UpdateValidatorHistoricalRevshareChangesDto = { @@ -1450,10 +1725,10 @@ export type ValidatorHistoricalRevshareChangesDto = { readonly validatorId: string; readonly type: "on_chain" | "override"; readonly lastDay: string; - readonly preferred?: {}; - readonly apr?: {}; - readonly commission?: {}; - readonly mevCommission?: {}; + readonly preferred?: { readonly [x: string]: unknown }; + readonly apr?: { readonly [x: string]: unknown }; + readonly commission?: { readonly [x: string]: unknown }; + readonly mevCommission?: { readonly [x: string]: unknown }; }; export type CreateValidatorDto = { readonly integrationId: string; @@ -1514,7 +1789,7 @@ export type WebhookEndpointDto = { readonly projectId: string; readonly url: string; readonly enabled: boolean; - readonly description?: {}; + readonly description?: { readonly [x: string]: unknown }; readonly createdAt: string; readonly updatedAt: string; readonly subscriptionCount: number; @@ -1538,7 +1813,7 @@ export type WebhookSubscriptionDto = { readonly endpointId: string; readonly events: ReadonlyArray; readonly actions: ReadonlyArray; - readonly filtersJson?: {}; + readonly filtersJson?: { readonly [x: string]: unknown }; readonly enabled: boolean; readonly createdAt: string; readonly updatedAt: string; @@ -1546,13 +1821,13 @@ export type WebhookSubscriptionDto = { export type CreateWebhookSubscriptionDto = { readonly events: ReadonlyArray; readonly actions: ReadonlyArray; - readonly filtersJson?: {}; + readonly filtersJson?: { readonly [x: string]: unknown }; readonly enabled?: boolean; }; export type UpdateWebhookSubscriptionDto = { readonly events?: ReadonlyArray; readonly actions?: ReadonlyArray; - readonly filtersJson?: {}; + readonly filtersJson?: { readonly [x: string]: unknown }; readonly enabled?: boolean; }; export type WebhookDeliveryDto = { @@ -1585,8 +1860,8 @@ export type WebhookEventDto = { readonly resource: string; readonly action: string; readonly type: string; - readonly subjectJson: {}; - readonly dataJson: {}; + readonly subjectJson: { readonly [x: string]: unknown }; + readonly dataJson: { readonly [x: string]: unknown }; readonly previousJson: { readonly [x: string]: unknown } | null; readonly changesJson: { readonly [x: string]: unknown } | null; readonly sequence: number; @@ -1658,6 +1933,18 @@ export type CampaignBalanceTotalsDto = { readonly totalInflows: string; readonly totalOutflows: string; }; +export type WindowAccrualSummaryDto = { + readonly windowStart: string; + readonly windowEnd: string; + readonly campaignStatus: CampaignStatus; + readonly qualifyingUserCount: number; + readonly totalQualifyingTvl: string; + readonly windowBudgetAllocated: string; + readonly windowBudgetDistributed: string; + readonly ceilingActive: boolean; + readonly calculatedApr: number | null; + readonly pricePerShare: string | null; +}; export type CampaignV2BalanceTotalsDto = { readonly totalBudget: string; readonly totalDistributed: string; @@ -1683,12 +1970,27 @@ export type TokenDto = { readonly isPoints?: boolean; readonly feeConfigurationId?: string; }; -export type UpdatePayoutAddressDto = { - readonly address: string; +export type RequestPayoutAddressDto = { readonly network: Networks; - readonly scope?: "yield" | "trade" | null; - readonly providerId?: string | null; - readonly note?: string | null; + readonly address: string; +}; +export type PayoutRequestItemDto = { + readonly integrationId: string; + readonly integrationName: string | null; + readonly amount: string; + readonly token: { + readonly name: string; + readonly network: Networks; + readonly symbol: string; + readonly decimals: number; + readonly address?: string; + readonly coinGeckoId?: string; + readonly logoURI?: string; + readonly isPoints?: boolean; + readonly feeConfigurationId?: string; + }; + readonly usdAmountEstimated: string; + readonly payoutAddress: string | null; }; export type CreateCustomUriDto = { readonly network: Networks; @@ -1714,7 +2016,7 @@ export type CreateRiskParameterDto = { readonly category: string; readonly item: string; readonly isDynamic?: boolean; - readonly value: {}; + readonly value: { readonly [x: string]: unknown }; readonly network?: Networks; readonly asset?: string; readonly protocol?: string; @@ -1725,11 +2027,11 @@ export type RiskParameterDto = { readonly category: string; readonly item: string; readonly isDynamic: boolean; - readonly value?: {}; + readonly value?: { readonly [x: string]: unknown }; readonly network?: Networks; - readonly asset?: {}; - readonly protocol?: {}; - readonly integrationId?: {}; + readonly asset?: { readonly [x: string]: unknown }; + readonly protocol?: { readonly [x: string]: unknown }; + readonly integrationId?: { readonly [x: string]: unknown }; readonly createdAt: string; readonly updatedAt: string; }; @@ -1737,11 +2039,11 @@ export type UpdateRiskParameterDto = { readonly category?: string; readonly item?: string; readonly isDynamic?: boolean; - readonly value?: {}; + readonly value?: { readonly [x: string]: unknown }; readonly network?: Networks; - readonly asset?: {}; - readonly protocol?: {}; - readonly integrationId?: {}; + readonly asset?: { readonly [x: string]: unknown }; + readonly protocol?: { readonly [x: string]: unknown }; + readonly integrationId?: { readonly [x: string]: unknown }; }; export type CampaignQualificationConfigDto = { readonly type: CampaignQualificationType; @@ -1985,17 +2287,44 @@ export type PaginatedBlacklistedAddressV2Dto = { readonly limit: number; readonly items: ReadonlyArray; }; -export type CampaignV2UserPointsPageDto = { +export type PaginatedCampaignSimulationRunDto = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items: ReadonlyArray; + readonly items: ReadonlyArray; }; -export type PaginatedWindowAccrualSummaryDto = { +export type CampaignSimulationConfigDto = { + readonly totalBudget?: string; + readonly configuredEmissionRate?: string; + readonly payoutFrequency?: + | "weekly" + | "daily" + | "six_hourly" + | "end_of_campaign"; + readonly qualificationThreshold?: string; + readonly apyCeiling?: number; + readonly maxIncentivizedTvlToken?: string; + readonly budgetSpendStrategy?: "allow_underspend" | "spend_full_budget"; + readonly rewardMode?: "normal" | "compound"; + readonly rewardTokenDecimals?: number; + readonly minDepositTokens?: number; + readonly maxDepositTokens?: number; + readonly topUpProbability?: number; + readonly exitProbability?: number; + readonly startTime?: string; + readonly applyPlatformWide?: boolean; + readonly rewardToken?: CampaignSimulationRewardTokenDto; + readonly populationMode?: "random" | "uniform"; + readonly depositTokens?: string; + readonly balanceEvents?: ReadonlyArray; + readonly milestones?: ReadonlyArray; + readonly budgetInjections?: ReadonlyArray; +}; +export type CampaignV2UserPointsPageDto = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items: ReadonlyArray; + readonly items: ReadonlyArray; }; export type PaginatedUserWindowAccrualDto = { readonly total: number; @@ -2016,7 +2345,7 @@ export type PaginatedCampaignV2UserBalanceDto = { readonly items: ReadonlyArray; }; export type CreateTeamDto = { - readonly contactDetails: {}; + readonly contactDetails: { readonly [x: string]: unknown }; readonly name: string; readonly user: CreateTeamDtoUser; readonly referredBy?: string; @@ -2034,6 +2363,7 @@ export type UpdateTeamDto = { readonly name?: string; readonly isMfaEnforced?: boolean; readonly isMultiTenant?: boolean; + readonly clientType?: ClientType; }; export type HealthStatusDto = { readonly status: HealthStatus; @@ -2062,7 +2392,7 @@ export type IntegrationRevenueRowDto = { readonly integration_id: string; readonly integration_name: string | null; readonly revenue_usd: string | null; - readonly revenue_type: "estimated" | "actual" | null; + readonly revenue_type: "estimated" | "actual"; readonly tvl_usd: string | null; readonly data_freshness: IntegrationFreshness; readonly coverage: boolean; @@ -2088,6 +2418,15 @@ export type KpiSummaryResponseDto = { export type KpiTrendsResponseDto = { readonly data_points: ReadonlyArray; }; +export type MonthlyReportListItemDto = { + readonly report_id: string; + readonly month: string; + readonly total_revenue_usd: string | null; + readonly total_tvl_usd: string | null; + readonly status: MonthlyReportStatus; + readonly published_at: string | null; + readonly published_by: string | null; +}; export type AddressesDto = { readonly address: string; readonly additionalAddresses?: @@ -2114,10 +2453,7 @@ export type TransactionStatusResponseDto = { readonly blockNumber?: string; readonly network: Networks; readonly hash: string; - readonly raw: {}; -}; -export type AnnotatedTransactionDto = { - readonly fields: ReadonlyArray; + readonly raw: { readonly [x: string]: unknown }; }; export type YieldProviderDto = { readonly id: YieldProviders; @@ -2140,6 +2476,25 @@ export type ProgrammaticPerpReportingTransactionDto = { readonly explorerUrl: string | null; readonly confirmedAt: string | null; }; +export type ProgrammaticPerpReportingEventOrderDto = { + readonly orderId: string; + readonly marketId: string; + readonly asset: string; + readonly side: OrderSide; + readonly type: OrderType; + readonly originalSizeBase: string; + readonly remainingSizeBase: string; + readonly limitPrice?: number; + readonly timeInForce?: ProgrammaticPerpEventOrderTimeInForce; + readonly triggerPrice?: number; + readonly reduceOnly: boolean; + readonly isPositionLevel: boolean; + readonly clientOrderId: { readonly [x: string]: unknown } | null; + readonly childOrderIds: ReadonlyArray; + readonly createdAt: string; + readonly closedPnl?: string; + readonly fillPrice?: number; +}; export type PendingActionArgumentsDto = { readonly amount?: string; readonly validatorAddress?: string; @@ -2163,6 +2518,23 @@ export type GasModeValueDto = { | EvmEIP1559GasArgsDto | EvmLegacyGasArgsDto; }; +export type BinanceAdditionalAddressesStakeArgumentOptionsDto = { + readonly binanceBeaconAddress: RequiredArgumentDto; +}; +export type CosmosAdditionalAddressesStakeArgumentOptionsDto = { + readonly cosmosPubKey: RequiredArgumentDto; +}; +export type TezosAdditionalAddressesStakeArgumentOptionsDto = { + readonly tezosPubKey: RequiredArgumentDto; +}; +export type SolanaAdditionalAddressesStakeArgumentOptionsDto = { + readonly stakeAccounts?: RequiredArgumentDto; + readonly lidoStakeAccounts?: RequiredArgumentDto; +}; +export type AvalancheCAdditionalAddressesStakeArgumentOptionsDto = { + readonly pAddressBech: RequiredArgumentDto; + readonly cAddressBech: RequiredArgumentDto; +}; export type ApeNativeArgumentOptionsDto = { readonly baycId?: RequiredArgumentDto; readonly maycId?: RequiredArgumentDto; @@ -2199,6 +2571,7 @@ export type FeeConfigurationWithApyDto = { readonly performanceFeeBps: number | null; readonly depositFeeBps: number | null; readonly chargeOnFirstDepositOnly: boolean; + readonly blueBundleOriginationFeeBps: number | null; readonly allocatorVaultContractAddress: string | null; readonly feeWrapperContractAddress: string | null; readonly feeRecipientAddress: string | null; @@ -2214,6 +2587,7 @@ export type FeeConfigurationDto = { readonly performanceFeeBps: number | null; readonly depositFeeBps: number | null; readonly chargeOnFirstDepositOnly: boolean; + readonly blueBundleOriginationFeeBps: number | null; readonly allocatorVaultContractAddress: string | null; readonly feeWrapperContractAddress: string | null; readonly feeRecipientAddress: string | null; @@ -2228,6 +2602,7 @@ export type AdminFeeConfigurationDto = { readonly performanceFeeBps: number | null; readonly depositFeeBps: number | null; readonly chargeOnFirstDepositOnly: boolean; + readonly blueBundleOriginationFeeBps: number | null; readonly allocatorVaultContractAddress: string | null; readonly feeWrapperContractAddress: string | null; readonly feeRecipientAddress: string | null; @@ -2237,126 +2612,6 @@ export type AdminFeeConfigurationDto = { readonly teamName?: string | null; readonly projectName?: string | null; }; -export type AllocationDto = { - readonly address: string; - readonly network: - | "ethereum" - | "ethereum-goerli" - | "ethereum-holesky" - | "ethereum-sepolia" - | "ethereum-hoodi" - | "arbitrum" - | "base" - | "base-sepolia" - | "gnosis" - | "optimism" - | "polygon" - | "polygon-amoy" - | "starknet" - | "zksync" - | "linea" - | "unichain" - | "plume" - | "monad-testnet" - | "monad" - | "robinhood" - | "robinhood-testnet" - | "avalanche-c" - | "avalanche-c-atomic" - | "avalanche-p" - | "binance" - | "celo" - | "fantom" - | "harmony" - | "moonriver" - | "okc" - | "viction" - | "core" - | "sonic" - | "plasma" - | "katana" - | "hyperevm" - | "tempo" - | "pharos" - | "agoric" - | "akash" - | "axelar" - | "band-protocol" - | "bitsong" - | "canto" - | "chihuahua" - | "comdex" - | "coreum" - | "cosmos" - | "crescent" - | "cronos" - | "cudos" - | "desmos" - | "dydx" - | "evmos" - | "fetch-ai" - | "gravity-bridge" - | "injective" - | "irisnet" - | "juno" - | "kava" - | "ki-network" - | "mars-protocol" - | "nym" - | "okex-chain" - | "onomy" - | "osmosis" - | "persistence" - | "quicksilver" - | "regen" - | "secret" - | "sentinel" - | "sommelier" - | "stafi" - | "stargaze" - | "stride" - | "teritori" - | "tgrade" - | "umee" - | "sei" - | "mantra" - | "celestia" - | "saga" - | "zetachain" - | "dymension" - | "humansai" - | "neutron" - | "polkadot" - | "kusama" - | "westend" - | "bittensor" - | "aptos" - | "binancebeacon" - | "cardano" - | "near" - | "solana" - | "solana-devnet" - | "stellar" - | "stellar-testnet" - | "sui" - | "tezos" - | "tron" - | "ton" - | "ton-testnet" - | "hyperliquid"; - readonly name: string; - readonly yieldId?: string; - readonly providerId?: string; - readonly allocation: string; - readonly allocationUsd: string | null; - readonly weight: number; - readonly targetWeight: number; - readonly rewardRate: AllocationRewardRateDto | null; - readonly tvl: string | null; - readonly tvlUsd: string | null; - readonly maxCapacity: string | null; - readonly remainingCapacity: string | null; -}; export type OAVResponseDto = { readonly id: string; readonly integrationId: string | null; @@ -2416,7 +2671,7 @@ export type StakeViewSuccessDto = { | "deactivated" | "deactivating"; readonly commission: "Net"; - readonly rewards: ReadonlyArray<{}>; + readonly rewards: ReadonlyArray<{ readonly [x: string]: unknown }>; readonly details: | EthDeFiDetailsViewDto | AdaDetailsViewDto @@ -2445,7 +2700,7 @@ export type SsoConfigResponseDto = { readonly entryPoint?: string | null; readonly certificate?: string | null; readonly clientId?: string | null; - readonly attributeMapping: {}; + readonly attributeMapping: { readonly [x: string]: unknown }; readonly enabled: boolean; readonly enforced: boolean; readonly jitDefaultRole: Role; @@ -2458,9 +2713,9 @@ export type SsoConfigResponseDto = { export type UpsertSsoConfigDto = { readonly protocol: "saml" | "oidc"; readonly issuer: string; - readonly entryPoint?: {}; - readonly certificate?: {}; - readonly clientId?: {}; + readonly entryPoint?: { readonly [x: string]: unknown }; + readonly certificate?: { readonly [x: string]: unknown }; + readonly clientId?: { readonly [x: string]: unknown }; readonly clientSecret?: string; readonly attributeMapping?: SsoAttributeMappingDto; readonly enabled?: boolean; @@ -2500,29 +2755,29 @@ export type ValidatorAdminDto = { readonly integrationId: string; readonly address: string; readonly status: ValidatorStatusTypes; - readonly lastFoundAt?: {}; + readonly lastFoundAt?: { readonly [x: string]: unknown }; readonly provider?: ValidatorProviderDto; - readonly providerId?: {}; - readonly name?: {}; - readonly nameOverride?: {}; - readonly website?: {}; - readonly websiteOverride?: {}; - readonly image?: {}; - readonly imageOverride?: {}; - readonly apr?: {}; - readonly aprOverride?: {}; - readonly commission?: {}; - readonly commissionOverride?: {}; - readonly mevCommission?: {}; - readonly mevCommissionOverride?: {}; - readonly stakedBalance?: {}; - readonly votingPower?: {}; - readonly remainingPossibleStake?: {}; - readonly minimumStake?: {}; - readonly remainingSlots?: {}; - readonly endDate?: {}; - readonly nominatorCount?: {}; - readonly subnetId?: {}; + readonly providerId?: { readonly [x: string]: unknown }; + readonly name?: { readonly [x: string]: unknown }; + readonly nameOverride?: { readonly [x: string]: unknown }; + readonly website?: { readonly [x: string]: unknown }; + readonly websiteOverride?: { readonly [x: string]: unknown }; + readonly image?: { readonly [x: string]: unknown }; + readonly imageOverride?: { readonly [x: string]: unknown }; + readonly apr?: { readonly [x: string]: unknown }; + readonly aprOverride?: { readonly [x: string]: unknown }; + readonly commission?: { readonly [x: string]: unknown }; + readonly commissionOverride?: { readonly [x: string]: unknown }; + readonly mevCommission?: { readonly [x: string]: unknown }; + readonly mevCommissionOverride?: { readonly [x: string]: unknown }; + readonly stakedBalance?: { readonly [x: string]: unknown }; + readonly votingPower?: { readonly [x: string]: unknown }; + readonly remainingPossibleStake?: { readonly [x: string]: unknown }; + readonly minimumStake?: { readonly [x: string]: unknown }; + readonly remainingSlots?: { readonly [x: string]: unknown }; + readonly endDate?: { readonly [x: string]: unknown }; + readonly nominatorCount?: { readonly [x: string]: unknown }; + readonly subnetId?: { readonly [x: string]: unknown }; readonly createdAt: string; readonly updatedAt: string; }; @@ -2538,6 +2793,12 @@ export type AuthEmailLoginSessionResponseDto = { }; export type MfaVerifyResponseDto = { readonly user: UserDto }; export type MfaRecoverResponseDto = { readonly user: UserDto }; +export type PaginatedWindowAccrualSummaryDto = { + readonly total: number; + readonly offset: number; + readonly limit: number; + readonly items: ReadonlyArray; +}; export type CampaignSafeBalanceDto = { readonly safeAddress: string; readonly network: Networks; @@ -2552,17 +2813,39 @@ export type CampaignV2SafeBalanceDto = { readonly balance: string; readonly asOf: string; }; -export type GasEstimateDto = { - readonly amount: string | null; - readonly token: TokenDto; - readonly gasLimit?: string; +export type TransactionDto = { + readonly id: string; + readonly network: Networks; + readonly status: TransactionStatus; + readonly type: TransactionType; + readonly hash: string | null; + readonly createdAt: string; + readonly broadcastedAt: string | null; + readonly signedTransaction: string | null; + readonly unsignedTransaction: string | null; + readonly structuredTransaction: StructuredTransactionTronDto; + readonly annotatedTransaction: { + readonly fields: ReadonlyArray; + }; + readonly stepIndex: number; + readonly error: string | null; + readonly gasEstimate: { + readonly amount: string | null; + readonly token: TokenDto; + readonly gasLimit?: string; + }; + readonly stakeId: string; + readonly explorerUrl: string | null; + readonly ledgerHwAppId: string | null; + readonly isMessage: boolean; + readonly accountAddresses?: ReadonlyArray; }; export type TransactionGasEstimateDto = { readonly amount: string | null; readonly token: TokenDto; readonly gasLimit?: string; readonly stepIndex: number; - readonly type: TransactionType | null; + readonly type: TransactionType; }; export type ActionArgumentsDto = { readonly amount: string; @@ -2620,9 +2903,21 @@ export type YieldRewardsSummaryResponseDto = { readonly rewards: YieldRewardsSummaryDto; readonly token: TokenDto; }; -export type AddressArgumentsDto = { - readonly address?: RequiredArgumentWithNetworkDto; - readonly additionalAddresses?: ReadonlyArray; +export type RequestPayoutDto = { + readonly periodMonth: string; + readonly addressesConfirmed: boolean; + readonly payoutAddresses?: ReadonlyArray; +}; +export type PayoutRequestDto = { + readonly payoutRequestId: string; + readonly status: PayoutRequestStatus; + readonly periodMonth: string; + readonly projectId: string; + readonly usdAmountEstimated: string; + readonly payoutAddress: string | null; + readonly completionDate: string; + readonly createdAt: string; + readonly items: ReadonlyArray; }; export type CampaignDto = { readonly id: string; @@ -2897,6 +3192,18 @@ export type PaginatedCampaignV2ConfigurationRequestDto = { readonly limit: number; readonly items: ReadonlyArray; }; +export type CreateCampaignSimulationDto = { + readonly yieldId?: string; + readonly projectId?: string; + readonly sourceCampaignId?: string; + readonly scenario?: "fixed-apy" | "dynamic-apy" | "drip" | "budget-injection"; + readonly config?: CampaignSimulationConfigDto; + readonly users?: number; + readonly seed?: number; + readonly trials?: number; + readonly mode?: "forecast" | "replay" | "synthetic"; + readonly days?: number; +}; export type CampaignV2PointsMetricsDto = { readonly releasedBudget: string; readonly distributedBudget: string; @@ -2923,6 +3230,9 @@ export type TopIntegrationsDto = { readonly by_revenue: ReadonlyArray; readonly by_tvl: ReadonlyArray; }; +export type MonthlyReportListResponseDto = { + readonly reports: ReadonlyArray; +}; export type TransactionVerificationMessageRequestDto = { readonly addresses: AddressesDto; }; @@ -2984,6 +3294,31 @@ export type YieldMetadataDto = { readonly commission?: ReadonlyArray; readonly tvl?: ReadonlyArray; }; +export type ProgrammaticPerpReportingActionDto = { + readonly id: string; + readonly type: PerpActionTypes; + readonly status: ActionStatus; + readonly providerId: string; + readonly address: string; + readonly args: { readonly [x: string]: unknown }; + readonly summary: { readonly [x: string]: unknown } | null; + readonly createdAt: string; + readonly completedAt: string | null; + readonly transactions: ReadonlyArray; +}; +export type ProgrammaticPerpReportingEventDto = { + readonly id: string; + readonly eventType: PerpEventType; + readonly providerId: string; + readonly address: string; + readonly occurredAt: string; + readonly marketId?: string | null; + readonly perpActionId?: string | null; + readonly providerOrderId?: string | null; + readonly settlementTransactionHash?: string | null; + readonly explorerUrl?: string | null; + readonly order: ProgrammaticPerpReportingEventOrderDto; +}; export type PendingActionRequestDto = { readonly type: ActionTypes; readonly integrationId: string; @@ -3004,6 +3339,15 @@ export type GasModesDto = { readonly denom: string; readonly values: ReadonlyArray; }; +export type AddressArgumentsDto = { + readonly address?: RequiredArgumentWithNetworkDto; + readonly additionalAddresses?: + | BinanceAdditionalAddressesStakeArgumentOptionsDto + | CosmosAdditionalAddressesStakeArgumentOptionsDto + | TezosAdditionalAddressesStakeArgumentOptionsDto + | SolanaAdditionalAddressesStakeArgumentOptionsDto + | AvalancheCAdditionalAddressesStakeArgumentOptionsDto; +}; export type ArgumentOptionsDto = { readonly amount?: AmountArgumentOptionsDto; readonly duration?: DurationArgumentOptionsDto; @@ -3031,26 +3375,44 @@ export type StakeResponseDto = { readonly id: WalletViewDto; readonly stake: StakeViewSuccessDto | StakeFailureDto; }; -export type TransactionDto = { +export type ActionWithLivePriceDto = { readonly id: string; - readonly network: Networks; - readonly status: TransactionStatus; - readonly type: TransactionType | null; - readonly hash: string | null; + readonly integrationId: string; + readonly status: ActionStatus; + readonly type: ActionTypes; + readonly currentStepIndex: number; + readonly amount: string | null; + readonly USDAmount: string | null; + readonly tokenId: string | null; + readonly validatorAddress: string | null; + readonly validatorAddresses: ReadonlyArray | null; + readonly transactions: ReadonlyArray; readonly createdAt: string; - readonly broadcastedAt: string | null; - readonly signedTransaction: string | null; - readonly unsignedTransaction: string | null; - readonly structuredTransaction: StructuredTransactionTronDto | null; - readonly annotatedTransaction: AnnotatedTransactionDto | null; - readonly stepIndex: number; - readonly error: string | null; - readonly gasEstimate: GasEstimateDto | null; - readonly stakeId: string; - readonly explorerUrl: string | null; - readonly ledgerHwAppId: string | null; - readonly isMessage: boolean; + readonly completedAt: string | null; + readonly inputToken?: TokenDto; + readonly addresses: AddressesDto; + readonly accountAddresses?: ReadonlyArray; + readonly projectId: string | null; + readonly currentUSDAmount: string | null; +}; +export type ActionDto = { + readonly id: string; + readonly integrationId: string; + readonly status: ActionStatus; + readonly type: ActionTypes; + readonly currentStepIndex: number; + readonly amount: string | null; + readonly USDAmount: string | null; + readonly tokenId: string | null; + readonly validatorAddress: string | null; + readonly validatorAddresses: ReadonlyArray | null; + readonly transactions: ReadonlyArray; + readonly createdAt: string; + readonly completedAt: string | null; + readonly inputToken?: TokenDto; + readonly addresses: AddressesDto; readonly accountAddresses?: ReadonlyArray; + readonly projectId: string | null; }; export type ActionGasEstimateDto = { readonly amount: string | null; @@ -3191,53 +3553,25 @@ export type ActionArgumentOptionsDto = { readonly addresses?: AddressArgumentsDto; readonly args?: ArgumentOptionsDto; }; -export type ActionWithLivePriceDto = { - readonly id: string; - readonly integrationId: string; - readonly status: ActionStatus; +export type MonthlyReportDetailDto = { + readonly report_id: string; + readonly month: string; + readonly total_revenue_usd: string | null; + readonly total_tvl_usd: string | null; + readonly status: MonthlyReportStatus; + readonly published_at: string | null; + readonly published_by: string | null; + readonly breakdown: RevenueBreakdownResponseDto; + readonly csv_download_url: string; +}; +export type ActionArgumentResponseDto = { + readonly enter: ActionArgumentOptionsDto; + readonly exit?: ActionArgumentOptionsDto; +}; +export type PendingActionDto = { readonly type: ActionTypes; - readonly currentStepIndex: number; - readonly amount: string | null; - readonly USDAmount: string | null; - readonly tokenId: string | null; - readonly validatorAddress: string | null; - readonly validatorAddresses: ReadonlyArray | null; - readonly transactions: ReadonlyArray; - readonly createdAt: string; - readonly completedAt: string | null; - readonly inputToken?: TokenDto; - readonly addresses: AddressesDto; - readonly accountAddresses?: ReadonlyArray; - readonly projectId: string | null; - readonly currentUSDAmount: string | null; -}; -export type ActionDto = { - readonly id: string; - readonly integrationId: string; - readonly status: ActionStatus; - readonly type: ActionTypes; - readonly currentStepIndex: number; - readonly amount: string | null; - readonly USDAmount: string | null; - readonly tokenId: string | null; - readonly validatorAddress: string | null; - readonly validatorAddresses: ReadonlyArray | null; - readonly transactions: ReadonlyArray; - readonly createdAt: string; - readonly completedAt: string | null; - readonly inputToken?: TokenDto; - readonly addresses: AddressesDto; - readonly accountAddresses?: ReadonlyArray; - readonly projectId: string | null; -}; -export type ActionArgumentResponseDto = { - readonly enter: ActionArgumentOptionsDto; - readonly exit?: ActionArgumentOptionsDto; -}; -export type PendingActionDto = { - readonly type: ActionTypes; - readonly passthrough: string; - readonly args?: ActionArgumentOptionsDto; + readonly passthrough: string; + readonly args?: ActionArgumentOptionsDto; readonly amount: string | null; }; export type YieldDto = { @@ -3591,6 +3925,7 @@ export type CampaignLifecycleControllerReplaceMilestones200 = ReadonlyArray; export type CampaignLifecycleControllerPause200 = CampaignV2Dto; export type CampaignLifecycleControllerPause409 = StakeKitErrorDto; +export type CampaignLifecycleControllerResumeRequestJson = ResumeCampaignV2Dto; export type CampaignLifecycleControllerResume200 = CampaignV2Dto; export type CampaignLifecycleControllerResume409 = StakeKitErrorDto; export type CampaignLifecycleControllerAcknowledgePause200 = CampaignV2Dto; @@ -3677,6 +4012,18 @@ export type CampaignV2ConfigurationRequestAdminControllerListParams = { }; export type CampaignV2ConfigurationRequestAdminControllerList200 = PaginatedCampaignV2ConfigurationRequestDto; +export type CampaignV2SimulationAdminControllerListParams = { + readonly offset?: number; + readonly limit?: number; +}; +export type CampaignV2SimulationAdminControllerList200 = + PaginatedCampaignSimulationRunDto; +export type CampaignV2SimulationAdminControllerCreateRequestJson = + CreateCampaignSimulationDto; +export type CampaignV2SimulationAdminControllerCreate201 = + CampaignSimulationRunDto; +export type CampaignV2SimulationAdminControllerGetById200 = + CampaignSimulationRunDto; export type CampaignV2AdminControllerListParams = { readonly status?: CampaignStatus; readonly projectId?: string; @@ -3864,11 +4211,12 @@ export type TeamsControllerFindAll200 = { readonly category: string; readonly deletedAt: string | null; readonly createdAt: string; - readonly contactDetails: {}; + readonly contactDetails: { readonly [x: string]: unknown }; readonly name: string; readonly serviceConditionsAcceptedAt: string | null; readonly oavEnabled: boolean; readonly isMultiTenant: boolean; + readonly clientType: "channelPartner" | "directConsumer" | "endClient"; }>; readonly hasNextPage: boolean; readonly limit: number; @@ -3888,6 +4236,11 @@ export type TeamsControllerListAuditLogs200 = PaginatedAuditLogDto; export type TeamsControllerGetById200 = Team; export type TeamsControllerUpdateRequestJson = UpdateTeamDto; export type TeamsControllerUpdate200 = Team; +export type ProgrammaticTeamsControllerCreateParams = { + readonly "X-ADMIN-API-KEY"?: string; +}; +export type ProgrammaticTeamsControllerCreateRequestJson = CreateTeamDto; +export type ProgrammaticTeamsControllerCreate201 = Team; export type ProjectsControllerGet200 = ReadonlyArray; export type ProjectsControllerCreateRequestJson = CreateProjectDto; export type ProjectsControllerCreate200 = Project; @@ -3970,6 +4323,8 @@ export type PayoutAddressesControllerCreateRequestJson = CreatePayoutAddressDto; export type PayoutAddressesControllerCreate200 = PayoutAddressDto; export type PayoutAddressesControllerUpdateRequestJson = UpdatePayoutAddressDto; export type PayoutAddressesControllerUpdate200 = PayoutAddressDto; +export type PayoutRequestsControllerRequestPayoutRequestJson = RequestPayoutDto; +export type PayoutRequestsControllerRequestPayout201 = PayoutRequestDto; export type NetworkAddressReferralControllerGetByAddressParams = { readonly "X-API-KEY"?: string; }; @@ -4001,6 +4356,12 @@ export type KpiTrendsControllerGetTrendsParams = { readonly project_ids?: ReadonlyArray; }; export type KpiTrendsControllerGetTrends200 = KpiTrendsResponseDto; +export type MonthlyReportControllerList200 = MonthlyReportListResponseDto; +export type MonthlyReportControllerCreateDraftRequestJson = + CreateMonthlyReportDraftDto; +export type MonthlyReportControllerCreateDraft201 = MonthlyReportDetailDto; +export type MonthlyReportControllerGetDetail200 = MonthlyReportDetailDto; +export type MonthlyReportControllerPublish200 = MonthlyReportDetailDto; export type ReportEntryControllerListParams = { readonly limit?: number; readonly page?: number; @@ -4079,7 +4440,17 @@ export type ReportProjectControllerGetDailyRevenues200 = { readonly integrationId: string; readonly validatorAddress: string | null; readonly totalRevenueAmountWei: string; - readonly token: TokenDto | null; + readonly token: { + readonly name: string; + readonly network: Networks; + readonly symbol: string; + readonly decimals: number; + readonly address?: string; + readonly coinGeckoId?: string; + readonly logoURI?: string; + readonly isPoints?: boolean; + readonly feeConfigurationId?: string; + }; }>; readonly hasNextPage: boolean; readonly limit: number; @@ -4101,7 +4472,17 @@ export type ReportProjectControllerGetDailyPerformance200 = { readonly totalEnteredAmountWei: string | null; readonly totalExitedAmountWei: string | null; readonly totalTvlAmountWei: string | null; - readonly token: TokenDto | null; + readonly token: { + readonly name: string; + readonly network: Networks; + readonly symbol: string; + readonly decimals: number; + readonly address?: string; + readonly coinGeckoId?: string; + readonly logoURI?: string; + readonly isPoints?: boolean; + readonly feeConfigurationId?: string; + }; }>; readonly hasNextPage: boolean; readonly limit: number; @@ -4148,7 +4529,17 @@ export type ProgrammaticReportingControllerGetDailyRevenues200 = { readonly revShare: number | null; readonly projectShare: number | null; readonly performanceFee: number | null; - readonly token: TokenDto | null; + readonly token: { + readonly name: string; + readonly network: Networks; + readonly symbol: string; + readonly decimals: number; + readonly address?: string; + readonly coinGeckoId?: string; + readonly logoURI?: string; + readonly isPoints?: boolean; + readonly feeConfigurationId?: string; + }; }>; readonly hasNextPage: boolean; readonly limit: number; @@ -4177,7 +4568,17 @@ export type ProgrammaticReportingControllerGetDailyPerformance200 = { readonly totalEnteredAmountWei: string; readonly totalExitedAmountWei: string; readonly totalTvlAmountWei: string; - readonly token: TokenDto | null; + readonly token: { + readonly name: string; + readonly network: Networks; + readonly symbol: string; + readonly decimals: number; + readonly address?: string; + readonly coinGeckoId?: string; + readonly logoURI?: string; + readonly isPoints?: boolean; + readonly feeConfigurationId?: string; + }; }>; readonly hasNextPage: boolean; readonly limit: number; @@ -4209,7 +4610,7 @@ export type ProgrammaticReportingControllerGetPerpActions200 = { readonly status: ActionStatus; readonly providerId: string; readonly address: string; - readonly args: {}; + readonly args: { readonly [x: string]: unknown }; readonly summary: { readonly [x: string]: unknown } | null; readonly createdAt: string; readonly completedAt: string | null; @@ -4219,6 +4620,33 @@ export type ProgrammaticReportingControllerGetPerpActions200 = { readonly limit: number; readonly page: number; }; +export type ProgrammaticReportingControllerGetPerpActivityParams = { + readonly providerId?: string; + readonly address?: string; + readonly status?: ActionStatus; + readonly type?: PerpActionTypes; + readonly marketId?: string; + readonly from?: string; + readonly to?: string; + readonly limit?: number; + readonly page?: number; + readonly "X-ADMIN-API-KEY": string; +}; +export type ProgrammaticReportingControllerGetPerpActivity200 = { + readonly data: ReadonlyArray< + | { + readonly type: ProgrammaticPerpActivityItemType; + readonly action: ProgrammaticPerpReportingActionDto; + } + | { + readonly type: ProgrammaticPerpActivityItemType; + readonly event: ProgrammaticPerpReportingEventDto; + } + >; + readonly hasNextPage: boolean; + readonly limit: number; + readonly page: number; +}; export type UsersMeControllerFindMe200 = UserDto; export type UsersMeControllerPatchMeRequestJson = UpdateUserMeDto; export type UsersMeControllerPatchMe200 = UserDto; @@ -4251,6 +4679,7 @@ export type UsersControllerCreate201 = UserDto; export type UsersControllerFindOne200 = UserDto; export type UsersControllerUpdateRequestJson = UpdateUserDto; export type UsersControllerUpdate200 = UserDto; +export type UsersControllerResendInvitation200 = UserDto; export type ActionControllerGetActionParams = { readonly "X-API-KEY"?: string }; export type ActionControllerGetAction200 = ActionDto; export type ActionControllerGetAction400 = StakeKitErrorDto; @@ -5286,6 +5715,7 @@ export type YieldV2ControllerYieldsParams = { | "yield-xyz" | "kamino" | "veda" + | "kinetiq" | "lista" | "dolomite" | "midas" @@ -5350,6 +5780,7 @@ export type YieldV2ControllerYieldsParams = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -5534,6 +5965,7 @@ export type YieldV2ControllerGetFeeConfigurations200 = { readonly performanceFeeBps: number | null; readonly depositFeeBps: number | null; readonly chargeOnFirstDepositOnly: boolean; + readonly blueBundleOriginationFeeBps: number | null; readonly allocatorVaultContractAddress: string | null; readonly feeWrapperContractAddress: string | null; readonly feeRecipientAddress: string | null; @@ -5590,6 +6022,7 @@ export type FeeConfigurationControllerGet200 = { readonly performanceFeeBps: number | null; readonly depositFeeBps: number | null; readonly chargeOnFirstDepositOnly: boolean; + readonly blueBundleOriginationFeeBps: number | null; readonly allocatorVaultContractAddress: string | null; readonly feeWrapperContractAddress: string | null; readonly feeRecipientAddress: string | null; @@ -5619,6 +6052,7 @@ export type ProgrammaticFeeConfigurationControllerGet200 = { readonly performanceFeeBps: number | null; readonly depositFeeBps: number | null; readonly chargeOnFirstDepositOnly: boolean; + readonly blueBundleOriginationFeeBps: number | null; readonly allocatorVaultContractAddress: string | null; readonly feeWrapperContractAddress: string | null; readonly feeRecipientAddress: string | null; @@ -5671,11 +6105,11 @@ export type RiskParametersControllerFindMany200 = { readonly category: string; readonly item: string; readonly isDynamic: boolean; - readonly value?: {}; + readonly value?: { readonly [x: string]: unknown }; readonly network?: Networks; - readonly asset?: {}; - readonly protocol?: {}; - readonly integrationId?: {}; + readonly asset?: { readonly [x: string]: unknown }; + readonly protocol?: { readonly [x: string]: unknown }; + readonly integrationId?: { readonly [x: string]: unknown }; readonly createdAt: string; readonly updatedAt: string; }>; @@ -5747,7 +6181,7 @@ export type ValidatorControllerFindAllProviders200 = { readonly website: string; readonly rank: number; readonly preferred: boolean; - readonly revshare?: {}; + readonly revshare?: { readonly [x: string]: unknown }; readonly createdAt: string; readonly updatedAt: string; }>; @@ -5773,10 +6207,10 @@ export type ValidatorControllerGetAllHistoricalRevshareChanges200 = { readonly validatorId: string; readonly type: "on_chain" | "override"; readonly lastDay: string; - readonly preferred?: {}; - readonly apr?: {}; - readonly commission?: {}; - readonly mevCommission?: {}; + readonly preferred?: { readonly [x: string]: unknown }; + readonly apr?: { readonly [x: string]: unknown }; + readonly commission?: { readonly [x: string]: unknown }; + readonly mevCommission?: { readonly [x: string]: unknown }; }>; readonly hasNextPage: boolean; readonly limit: number; @@ -5800,29 +6234,29 @@ export type ValidatorControllerFindAll200 = { readonly integrationId: string; readonly address: string; readonly status: ValidatorStatusTypes; - readonly lastFoundAt?: {}; + readonly lastFoundAt?: { readonly [x: string]: unknown }; readonly provider?: ValidatorProviderDto; - readonly providerId?: {}; - readonly name?: {}; - readonly nameOverride?: {}; - readonly website?: {}; - readonly websiteOverride?: {}; - readonly image?: {}; - readonly imageOverride?: {}; - readonly apr?: {}; - readonly aprOverride?: {}; - readonly commission?: {}; - readonly commissionOverride?: {}; - readonly mevCommission?: {}; - readonly mevCommissionOverride?: {}; - readonly stakedBalance?: {}; - readonly votingPower?: {}; - readonly remainingPossibleStake?: {}; - readonly minimumStake?: {}; - readonly remainingSlots?: {}; - readonly endDate?: {}; - readonly nominatorCount?: {}; - readonly subnetId?: {}; + readonly providerId?: { readonly [x: string]: unknown }; + readonly name?: { readonly [x: string]: unknown }; + readonly nameOverride?: { readonly [x: string]: unknown }; + readonly website?: { readonly [x: string]: unknown }; + readonly websiteOverride?: { readonly [x: string]: unknown }; + readonly image?: { readonly [x: string]: unknown }; + readonly imageOverride?: { readonly [x: string]: unknown }; + readonly apr?: { readonly [x: string]: unknown }; + readonly aprOverride?: { readonly [x: string]: unknown }; + readonly commission?: { readonly [x: string]: unknown }; + readonly commissionOverride?: { readonly [x: string]: unknown }; + readonly mevCommission?: { readonly [x: string]: unknown }; + readonly mevCommissionOverride?: { readonly [x: string]: unknown }; + readonly stakedBalance?: { readonly [x: string]: unknown }; + readonly votingPower?: { readonly [x: string]: unknown }; + readonly remainingPossibleStake?: { readonly [x: string]: unknown }; + readonly minimumStake?: { readonly [x: string]: unknown }; + readonly remainingSlots?: { readonly [x: string]: unknown }; + readonly endDate?: { readonly [x: string]: unknown }; + readonly nominatorCount?: { readonly [x: string]: unknown }; + readonly subnetId?: { readonly [x: string]: unknown }; readonly createdAt: string; readonly updatedAt: string; }>; @@ -6111,6 +6545,66 @@ export const make = ( : (request) => Effect.flatMap(httpClient.execute(request), withOptionalResponse); }; + const __encodePathParam = encodeURIComponent; + const __makePathRequest = ( + method: (url: string) => HttpClientRequest.HttpClientRequest, + parameters: ReadonlyArray, + getPath: () => string + ) => + Effect.suspend(() => { + const fail = (description: string, cause?: unknown) => + Effect.fail( + new HttpClientError.HttpClientError({ + reason: new HttpClientError.InvalidUrlError({ + request: method(""), + cause, + description, + }), + }) + ); + if ( + parameters.some( + (value) => value === "" || /^(?:\.|%2e){1,2}$/i.test(value) + ) + ) { + return fail( + "Path parameters must be non-empty and cannot be dot segments" + ); + } + let path: string; + try { + path = getPath(); + } catch (cause) { + return fail("Failed to encode path parameter", cause); + } + if ( + path.split("/").some((segment) => /^(?:\.|%2e){1,2}$/i.test(segment)) + ) { + return fail("Request paths cannot contain dot segments"); + } + return Effect.succeed(method(path)); + }); + const executeStreamRequest = (request: HttpClientRequest.HttpClientRequest) => + Effect.suspend(() => + options.transformClient + ? Effect.flatMap(options.transformClient(httpClient), (client) => + HttpClient.filterStatusOk(client).execute(request) + ) + : HttpClient.filterStatusOk(httpClient).execute(request) + ); + const decodeBinary = (response: HttpClientResponse.HttpClientResponse) => + Effect.map(response.arrayBuffer, (buffer) => new Uint8Array(buffer)); + const decodeVoidError = + (tag: Tag) => + (response: HttpClientResponse.HttpClientResponse) => + Effect.fail(LegacyApiError(tag, undefined, response)); + const binaryRequest = ( + request: HttpClientRequest.HttpClientRequest + ): Stream.Stream => + executeStreamRequest(request).pipe( + Effect.map((response) => response.stream), + Stream.unwrap + ); const decodeSuccess = (response: HttpClientResponse.HttpClientResponse) => response.json as Effect.Effect; const decodeVoid = (_response: HttpClientResponse.HttpClientResponse) => @@ -6131,7 +6625,12 @@ export const make = ( (config: Config | undefined) => ( successCodes: ReadonlyArray, - errorCodes?: Record + errorCodes?: Record, + responseCodes: { + readonly binary: ReadonlyArray; + readonly voidSuccess: ReadonlyArray; + readonly voidError: ReadonlyArray; + } = { binary: [], voidSuccess: [], voidError: [] } ) => { const cases: any = { orElse: unexpectedStatus }; for (const code of successCodes) { @@ -6142,7 +6641,20 @@ export const make = ( cases[code] = decodeError(tag); } } - if (successCodes.length === 0) { + for (const code of responseCodes.binary) { + cases[code] = decodeBinary; + } + for (const code of responseCodes.voidSuccess) { + cases[code] = decodeVoid; + } + for (const code of responseCodes.voidError) { + cases[code] = decodeVoidError(code); + } + if ( + successCodes.length === 0 && + responseCodes.binary.length === 0 && + responseCodes.voidSuccess.length === 0 + ) { cases["2xx"] = decodeVoid; } return withResponse(config)(HttpClientResponse.matchStatus(cases) as any); @@ -6150,78 +6662,168 @@ export const make = ( return { httpClient, AuthControllerRequestLoginCode: (options) => - HttpClientRequest.post(`/v1/auth/login/request-code`).pipe( + HttpClientRequest.post("/v1/auth/login/request-code").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), AuthControllerVerifyLoginCode: (options) => - HttpClientRequest.post(`/v1/auth/login/verify-code`).pipe( + HttpClientRequest.post("/v1/auth/login/verify-code").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), AuthControllerLogout: (options) => - HttpClientRequest.post(`/v1/auth/logout`).pipe( - onRequest(options?.config)([]) + HttpClientRequest.post("/v1/auth/logout").pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["204"], + voidError: [], + }) ), AuthControllerConfirmEmail: (options) => - HttpClientRequest.post(`/v1/auth/email/confirm`).pipe( + HttpClientRequest.post("/v1/auth/email/confirm").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)([]) + onRequest(options.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) ), AuthControllerMe: (options) => - HttpClientRequest.get(`/v1/auth/me`).pipe( + HttpClientRequest.get("/v1/auth/me").pipe( onRequest(options?.config)(["2xx"]) ), AuthControllerUpdate: (options) => - HttpClientRequest.patch(`/v1/auth/me`).pipe( + HttpClientRequest.patch("/v1/auth/me").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), CampaignControllerList: (teamId, projectId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns" ).pipe( - HttpClientRequest.setUrlParams({ - status: options?.params?.["status"] as any, - yieldId: options?.params?.["yieldId"] as any, - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + status: options?.params?.["status"] as any, + yieldId: options?.params?.["yieldId"] as any, + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignControllerCreate: (teamId, projectId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/campaigns` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["403"], + }) + ) + ) ), CampaignControllerGetById: (teamId, projectId, campaignId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignControllerUpdate: (teamId, projectId, campaignId, options) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["403"], + }) + ) + ) ), CampaignControllerPause: (teamId, projectId, campaignId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/pause` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/pause" ).pipe( - onRequest(options?.config)(["2xx"], { - "409": "CampaignControllerPause409", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], { + "409": "CampaignControllerPause409", + }) + ) + ) ), CampaignControllerResume: (teamId, projectId, campaignId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/resume` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/resume" ).pipe( - onRequest(options?.config)(["2xx"], { - "409": "CampaignControllerResume409", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], { + "409": "CampaignControllerResume409", + }) + ) + ) ), CampaignControllerAcknowledgePause: ( teamId, @@ -6229,58 +6831,142 @@ export const make = ( campaignId, options ) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/acknowledge-pause` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/acknowledge-pause" ).pipe( - onRequest(options?.config)(["2xx"], { - "409": "CampaignControllerAcknowledgePause409", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], { + "409": "CampaignControllerAcknowledgePause409", + }) + ) + ) ), CampaignControllerEnd: (teamId, projectId, campaignId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/end` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/end" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["403"], + }) + ) + ) + ), CampaignControllerGetSummary: (teamId, projectId, campaignId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/summary` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/summary" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignControllerGetCampaignBalances: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/balances` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/balances" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - address: options?.params?.["address"] as any, - qualified: options?.params?.["qualified"] as any, - sortField: options?.params?.["sortField"] as any, - sortDirection: options?.params?.["sortDirection"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + address: options?.params?.["address"] as any, + qualified: options?.params?.["qualified"] as any, + sortField: options?.params?.["sortField"] as any, + sortDirection: options?.params?.["sortDirection"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignControllerGetLiability: (teamId, projectId, campaignId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/liability` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/liability" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignControllerGetBudgetProjection: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/budget-projection` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/budget-projection" ).pipe( - HttpClientRequest.setUrlParams({ - totalBudget: options?.params?.["totalBudget"] as any, - endTime: options?.params?.["endTime"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + totalBudget: options?.params?.["totalBudget"] as any, + endTime: options?.params?.["endTime"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignControllerSetUserPayoutEligibility: ( teamId, @@ -6289,11 +6975,26 @@ export const make = ( address, options ) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/accruals/${address}/payout-eligibility` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, campaignId, address], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/accruals/" + + __encodePathParam(address) + + "/payout-eligibility" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), CampaignControllerGetUserEntitlement: ( teamId, @@ -6302,19 +7003,47 @@ export const make = ( address, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/entitlements/${address}` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId, address], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/entitlements/" + + __encodePathParam(address) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignControllerGetPayoutRuns: (teamId, projectId, campaignId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/payout-runs` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-runs" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - status: options?.params?.["status"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + status: options?.params?.["status"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignControllerGetPayoutRunDetail: ( teamId, @@ -6323,23 +7052,51 @@ export const make = ( runId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/payout-runs/${runId}` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId, runId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-runs/" + + __encodePathParam(runId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignControllerGetPayoutAudit: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/payout-audit` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-audit" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignControllerGetWeeklyDistribution: ( teamId, @@ -6347,14 +7104,27 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/weekly-distribution` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/weekly-distribution" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignControllerGetEligibleUsers: ( teamId, @@ -6362,17 +7132,30 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/eligible-users` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/eligible-users" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - minTotalEarned: options?.params?.["minTotalEarned"] as any, - sortField: options?.params?.["sortField"] as any, - sortDirection: options?.params?.["sortDirection"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + minTotalEarned: options?.params?.["minTotalEarned"] as any, + sortField: options?.params?.["sortField"] as any, + sortDirection: options?.params?.["sortDirection"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignControllerGetBlacklistedUsers: ( teamId, @@ -6380,14 +7163,27 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/blacklisted-users` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/blacklisted-users" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignControllerGetAccrualDetails: ( teamId, @@ -6395,15 +7191,28 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/accrual-details` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/accrual-details" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - runId: options?.params?.["runId"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + runId: options?.params?.["runId"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignControllerGetAccrualDetailForHour: ( teamId, @@ -6412,18 +7221,33 @@ export const make = ( hour, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/accrual-details/hour/${hour}` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId, hour], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/accrual-details/hour/" + + __encodePathParam(hour) + + "" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - address: options?.params?.["address"] as any, - qualified: options?.params?.["qualified"] as any, - sortField: options?.params?.["sortField"] as any, - sortDirection: options?.params?.["sortDirection"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + address: options?.params?.["address"] as any, + qualified: options?.params?.["qualified"] as any, + sortField: options?.params?.["sortField"] as any, + sortDirection: options?.params?.["sortDirection"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignControllerGetUserAccrualHistory: ( teamId, @@ -6432,14 +7256,29 @@ export const make = ( address, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/user-accrual/${address}` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId, address], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/user-accrual/" + + __encodePathParam(address) + + "" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignControllerGetSafeBalance: ( teamId, @@ -6447,32 +7286,71 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/safe-balance` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/safe-balance" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignControllerGetPayoutEligibilitySummary: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/payout-eligibility/summary` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-eligibility/summary" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignControllerGetBlacklistedAddresses: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/blacklisted-addresses` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/blacklisted-addresses" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignControllerGetAuditHistory: ( teamId, @@ -6480,43 +7358,78 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/audit-history` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/audit-history" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - address: options?.params?.["address"] as any, - type: options?.params?.["type"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + address: options?.params?.["address"] as any, + type: options?.params?.["type"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignConfigurationRequestControllerListForProject: ( teamId, projectId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/requests` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/requests" ).pipe( - HttpClientRequest.setUrlParams({ - status: options?.params?.["status"] as any, - requestType: options?.params?.["requestType"] as any, - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + status: options?.params?.["status"] as any, + requestType: options?.params?.["requestType"] as any, + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignConfigurationRequestControllerCreate: ( teamId, projectId, options ) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/requests` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/requests" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), CampaignConfigurationRequestControllerGetById: ( teamId, @@ -6524,25 +7437,51 @@ export const make = ( requestId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/requests/${requestId}` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, requestId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/requests/" + + __encodePathParam(requestId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignConfigurationRequestControllerListForCampaign: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/requests` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/requests" ).pipe( - HttpClientRequest.setUrlParams({ - status: options?.params?.["status"] as any, - requestType: options?.params?.["requestType"] as any, - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + status: options?.params?.["status"] as any, + requestType: options?.params?.["requestType"] as any, + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignConfigurationRequestControllerAccept: ( teamId, @@ -6550,11 +7489,24 @@ export const make = ( requestId, options ) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/requests/${requestId}/accept` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, requestId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/requests/" + + __encodePathParam(requestId) + + "/accept" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), CampaignConfigurationRequestControllerReject: ( teamId, @@ -6562,14 +7514,27 @@ export const make = ( requestId, options ) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/campaigns/requests/${requestId}/reject` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, requestId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/requests/" + + __encodePathParam(requestId) + + "/reject" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), CampaignConfigurationRequestAdminControllerList: (options) => - HttpClientRequest.get(`/v1/admin/campaigns/requests`).pipe( + HttpClientRequest.get("/v1/admin/campaigns/requests").pipe( HttpClientRequest.setUrlParams({ status: options?.params?.["status"] as any, requestType: options?.params?.["requestType"] as any, @@ -6580,7 +7545,7 @@ export const make = ( onRequest(options?.config)(["2xx"]) ), CampaignAdminControllerList: (options) => - HttpClientRequest.get(`/v1/admin/campaigns`).pipe( + HttpClientRequest.get("/v1/admin/campaigns").pipe( HttpClientRequest.setUrlParams({ status: options?.params?.["status"] as any, projectId: options?.params?.["projectId"] as any, @@ -6597,41 +7562,73 @@ export const make = ( onRequest(options?.config)(["2xx"]) ), CampaignAdminControllerGetById: (campaignId, options) => - HttpClientRequest.get(`/v1/admin/campaigns/${campaignId}`).pipe( - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [campaignId], + () => "/v1/admin/campaigns/" + __encodePathParam(campaignId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), ProgrammaticCampaignControllerListCampaigns: (projectId, options) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/campaigns` + __makePathRequest( + HttpClientRequest.get, + [projectId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - status: options.params["status"] as any, - integrationId: options.params["integrationId"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + status: options.params["status"] as any, + integrationId: options.params["integrationId"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignControllerGetAccrualDetails: ( projectId, campaignId, options ) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/campaigns/${campaignId}/accrual-details` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/accrual-details" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - runId: options.params["runId"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + runId: options.params["runId"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignControllerGetAccrualDetailForHour: ( projectId, @@ -6639,21 +7636,34 @@ export const make = ( hour, options ) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/campaigns/${campaignId}/accrual-details/hour/${hour}` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId, hour], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/accrual-details/hour/" + + __encodePathParam(hour) + + "" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - address: options.params["address"] as any, - qualified: options.params["qualified"] as any, - sortField: options.params["sortField"] as any, - sortDirection: options.params["sortDirection"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + address: options.params["address"] as any, + qualified: options.params["qualified"] as any, + sortField: options.params["sortField"] as any, + sortDirection: options.params["sortDirection"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignControllerGetUserAccrualHistory: ( projectId, @@ -6661,35 +7671,59 @@ export const make = ( address, options ) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/campaigns/${campaignId}/user-accrual/${address}` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId, address], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/user-accrual/" + + __encodePathParam(address) + + "" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignControllerGetPayoutRuns: ( projectId, campaignId, options ) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/campaigns/${campaignId}/payout-runs` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-runs" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - status: options.params["status"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + status: options.params["status"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignControllerGetPayoutRunDetail: ( projectId, @@ -6697,17 +7731,30 @@ export const make = ( runId, options ) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/campaigns/${campaignId}/payout-runs/${runId}` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId, runId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-runs/" + + __encodePathParam(runId) + + "" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignControllerGetPayoutBatchDetail: ( projectId, @@ -6716,91 +7763,161 @@ export const make = ( batchKey, options ) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/campaigns/${campaignId}/payout-runs/${runId}/batches/${batchKey}` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId, runId, batchKey], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-runs/" + + __encodePathParam(runId) + + "/batches/" + + __encodePathParam(batchKey) + + "" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignControllerGetCampaignSafeBalance: ( projectId, campaignId, options ) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/campaigns/${campaignId}/safe-balance` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/safe-balance" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignControllerGetCampaignPayoutEligibilitySummary: ( projectId, campaignId, options ) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/campaigns/${campaignId}/payout-eligibility/summary` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-eligibility/summary" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignControllerGetCampaignBalances: ( projectId, campaignId, options ) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/campaigns/${campaignId}/balances` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/balances" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - address: options.params["address"] as any, - qualified: options.params["qualified"] as any, - sortField: options.params["sortField"] as any, - sortDirection: options.params["sortDirection"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + address: options.params["address"] as any, + qualified: options.params["qualified"] as any, + sortField: options.params["sortField"] as any, + sortDirection: options.params["sortDirection"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), CampaignV2ConfigurationRequestControllerListForProject: ( teamId, projectId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/requests` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/requests" ).pipe( - HttpClientRequest.setUrlParams({ - status: options?.params?.["status"] as any, - requestType: options?.params?.["requestType"] as any, - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + status: options?.params?.["status"] as any, + requestType: options?.params?.["requestType"] as any, + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignV2ConfigurationRequestControllerCreate: ( teamId, projectId, options ) => - HttpClientRequest.post( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/requests` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/requests" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), CampaignV2ConfigurationRequestControllerGetById: ( teamId, @@ -6808,25 +7925,51 @@ export const make = ( requestId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/requests/${requestId}` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, requestId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/requests/" + + __encodePathParam(requestId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignV2ConfigurationRequestControllerListForCampaign: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/requests` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/requests" ).pipe( - HttpClientRequest.setUrlParams({ - status: options?.params?.["status"] as any, - requestType: options?.params?.["requestType"] as any, - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + status: options?.params?.["status"] as any, + requestType: options?.params?.["requestType"] as any, + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignV2ConfigurationRequestControllerAccept: ( teamId, @@ -6834,11 +7977,24 @@ export const make = ( requestId, options ) => - HttpClientRequest.patch( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/requests/${requestId}/accept` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, requestId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/requests/" + + __encodePathParam(requestId) + + "/accept" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), CampaignV2ConfigurationRequestControllerReject: ( teamId, @@ -6846,30 +8002,69 @@ export const make = ( requestId, options ) => - HttpClientRequest.patch( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/requests/${requestId}/reject` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, requestId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/requests/" + + __encodePathParam(requestId) + + "/reject" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), CampaignLifecycleControllerList: (teamId, projectId, options) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns" ).pipe( - HttpClientRequest.setUrlParams({ - status: options?.params?.["status"] as any, - yieldId: options?.params?.["yieldId"] as any, - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + status: options?.params?.["status"] as any, + yieldId: options?.params?.["yieldId"] as any, + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignLifecycleControllerCreate: (teamId, projectId, options) => - HttpClientRequest.post( - `/v2/teams/${teamId}/projects/${projectId}/campaigns` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["403"], + }) + ) + ) ), CampaignLifecycleControllerGetById: ( teamId, @@ -6877,20 +8072,50 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignLifecycleControllerUpdate: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.patch( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["403"], + }) + ) + ) ), CampaignV2ReadsControllerGetMilestones: ( teamId, @@ -6898,20 +8123,50 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/milestones` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/milestones" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignLifecycleControllerReplaceMilestones: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.put( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/milestones` + __makePathRequest( + HttpClientRequest.put, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/milestones" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["412"], + }) + ) + ) ), CampaignLifecycleControllerPause: ( teamId, @@ -6919,12 +8174,25 @@ export const make = ( campaignId, options ) => - HttpClientRequest.post( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/pause` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/pause" ).pipe( - onRequest(options?.config)(["2xx"], { - "409": "CampaignLifecycleControllerPause409", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], { + "409": "CampaignLifecycleControllerPause409", + }) + ) + ) ), CampaignLifecycleControllerResume: ( teamId, @@ -6932,12 +8200,26 @@ export const make = ( campaignId, options ) => - HttpClientRequest.post( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/resume` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/resume" ).pipe( - onRequest(options?.config)(["2xx"], { - "409": "CampaignLifecycleControllerResume409", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], { + "409": "CampaignLifecycleControllerResume409", + }) + ) + ) ), CampaignLifecycleControllerAcknowledgePause: ( teamId, @@ -6945,49 +8227,120 @@ export const make = ( campaignId, options ) => - HttpClientRequest.post( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/acknowledge-pause` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/acknowledge-pause" ).pipe( - onRequest(options?.config)(["2xx"], { - "409": "CampaignLifecycleControllerAcknowledgePause409", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], { + "409": "CampaignLifecycleControllerAcknowledgePause409", + }) + ) + ) ), CampaignLifecycleControllerEnd: (teamId, projectId, campaignId, options) => - HttpClientRequest.post( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/end` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/end" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["403"], + }) + ) + ) + ), CampaignV2ReadsControllerGetSummary: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/summary` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/summary" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignV2ReadsControllerGetLiability: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/liability` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/liability" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignV2ReadsControllerGetBudgetProjection: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/budget-projection` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/budget-projection" ).pipe( - HttpClientRequest.setUrlParams({ - totalBudget: options?.params?.["totalBudget"] as any, - endTime: options?.params?.["endTime"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + totalBudget: options?.params?.["totalBudget"] as any, + endTime: options?.params?.["endTime"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignV2ReadsControllerSetUserPayoutEligibility: ( teamId, @@ -6996,11 +8349,26 @@ export const make = ( address, options ) => - HttpClientRequest.patch( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/accruals/${address}/payout-eligibility` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, campaignId, address], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/accruals/" + + __encodePathParam(address) + + "/payout-eligibility" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), CampaignV2ReadsControllerGetUserEntitlement: ( teamId, @@ -7009,24 +8377,52 @@ export const make = ( address, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/entitlements/${address}` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId, address], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/entitlements/" + + __encodePathParam(address) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignV2ReadsControllerGetPayoutRuns: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/payout-runs` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-runs" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - status: options?.params?.["status"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + status: options?.params?.["status"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignV2ReadsControllerGetPayoutRunDetail: ( teamId, @@ -7035,14 +8431,29 @@ export const make = ( runId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/payout-runs/${runId}` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId, runId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-runs/" + + __encodePathParam(runId) + + "" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignV2ReadsControllerGetPayoutAudit: ( teamId, @@ -7050,14 +8461,27 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/payout-audit` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-audit" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignV2ReadsControllerGetWeeklyDistribution: ( teamId, @@ -7065,14 +8489,27 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/weekly-distribution` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/weekly-distribution" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignV2ReadsControllerGetEligibleUsers: ( teamId, @@ -7080,17 +8517,30 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/eligible-users` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/eligible-users" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - minTotalEarned: options?.params?.["minTotalEarned"] as any, - sortField: options?.params?.["sortField"] as any, - sortDirection: options?.params?.["sortDirection"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + minTotalEarned: options?.params?.["minTotalEarned"] as any, + sortField: options?.params?.["sortField"] as any, + sortDirection: options?.params?.["sortDirection"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignV2ReadsControllerGetBlacklistedUsers: ( teamId, @@ -7098,14 +8548,27 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/blacklisted-users` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/blacklisted-users" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), CampaignV2ReadsControllerGetSafeBalance: ( teamId, @@ -7113,63 +8576,170 @@ export const make = ( campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/safe-balance` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/safe-balance" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignV2ReadsControllerGetPayoutEligibilitySummary: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/payout-eligibility/summary` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-eligibility/summary" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CampaignV2ReadsControllerGetBlacklistedAddresses: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/blacklisted-addresses` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/blacklisted-addresses" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) - ), + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) + ), CampaignV2ReadsControllerGetAuditHistory: ( teamId, projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/teams/${teamId}/projects/${projectId}/campaigns/${campaignId}/audit-history` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, campaignId], + () => + "/v2/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/audit-history" ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + address: options?.params?.["address"] as any, + type: options?.params?.["type"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) + ), + CampaignV2ConfigurationRequestAdminControllerList: (options) => + HttpClientRequest.get("/v2/admin/campaigns/requests").pipe( HttpClientRequest.setUrlParams({ + status: options?.params?.["status"] as any, + requestType: options?.params?.["requestType"] as any, + projectId: options?.params?.["projectId"] as any, offset: options?.params?.["offset"] as any, limit: options?.params?.["limit"] as any, - address: options?.params?.["address"] as any, - type: options?.params?.["type"] as any, }), onRequest(options?.config)(["2xx"]) ), - CampaignV2ConfigurationRequestAdminControllerList: (options) => - HttpClientRequest.get(`/v2/admin/campaigns/requests`).pipe( + CampaignV2SimulationAdminControllerList: (options) => + HttpClientRequest.get("/v2/admin/campaign-simulations").pipe( HttpClientRequest.setUrlParams({ - status: options?.params?.["status"] as any, - requestType: options?.params?.["requestType"] as any, - projectId: options?.params?.["projectId"] as any, offset: options?.params?.["offset"] as any, limit: options?.params?.["limit"] as any, }), onRequest(options?.config)(["2xx"]) ), + CampaignV2SimulationAdminControllerCreate: (options) => + HttpClientRequest.post("/v2/admin/campaign-simulations").pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404", "412"], + }) + ), + CampaignV2SimulationAdminControllerGetById: (simulationRunId, options) => + __makePathRequest( + HttpClientRequest.get, + [simulationRunId], + () => + "/v2/admin/campaign-simulations/" + + __encodePathParam(simulationRunId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) + ), + CampaignV2SimulationAdminControllerDelete: (simulationRunId, options) => + __makePathRequest( + HttpClientRequest.delete, + [simulationRunId], + () => + "/v2/admin/campaign-simulations/" + + __encodePathParam(simulationRunId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["204"], + voidError: ["404", "409"], + }) + ) + ) + ), CampaignV2AdminControllerList: (options) => - HttpClientRequest.get(`/v2/admin/campaigns`).pipe( + HttpClientRequest.get("/v2/admin/campaigns").pipe( HttpClientRequest.setUrlParams({ status: options?.params?.["status"] as any, projectId: options?.params?.["projectId"] as any, @@ -7186,67 +8756,139 @@ export const make = ( onRequest(options?.config)(["2xx"]) ), CampaignV2AdminControllerGetById: (campaignId, options) => - HttpClientRequest.get(`/v2/admin/campaigns/${campaignId}`).pipe( - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [campaignId], + () => "/v2/admin/campaigns/" + __encodePathParam(campaignId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), CampaignV2AdminControllerGetPointsMetrics: (campaignId, options) => - HttpClientRequest.get( - `/v2/admin/campaigns/${campaignId}/points-metrics` + __makePathRequest( + HttpClientRequest.get, + [campaignId], + () => + "/v2/admin/campaigns/" + + __encodePathParam(campaignId) + + "/points-metrics" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), CampaignV2AdminControllerTopUpBudget: (campaignId, options) => - HttpClientRequest.post(`/v2/admin/campaigns/${campaignId}/top-up`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.post, + [campaignId], + () => "/v2/admin/campaigns/" + __encodePathParam(campaignId) + "/top-up" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404", "412"], + }) + ) + ) ), CampaignV2AdminControllerUnlockMilestone: ( campaignId, milestoneOrder, options ) => - HttpClientRequest.post( - `/v2/admin/campaigns/${campaignId}/milestones/${milestoneOrder}/unlock` + __makePathRequest( + HttpClientRequest.post, + [campaignId, milestoneOrder], + () => + "/v2/admin/campaigns/" + + __encodePathParam(campaignId) + + "/milestones/" + + __encodePathParam(milestoneOrder) + + "/unlock" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404", "409", "412"], + }) + ) + ) ), ProgrammaticCampaignV2ControllerListCampaigns: (projectId, options) => - HttpClientRequest.get( - `/v2/programmatic/projects/${projectId}/campaigns` + __makePathRequest( + HttpClientRequest.get, + [projectId], + () => + "/v2/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - status: options.params["status"] as any, - integrationId: options.params["integrationId"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + status: options.params["status"] as any, + integrationId: options.params["integrationId"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignV2ControllerGetAccrualDetails: ( projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/programmatic/projects/${projectId}/campaigns/${campaignId}/accrual-details` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId], + () => + "/v2/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/accrual-details" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - runId: options.params["runId"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + runId: options.params["runId"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignV2ControllerGetAccrualDetailForWindow: ( projectId, @@ -7254,34 +8896,58 @@ export const make = ( windowStart, options ) => - HttpClientRequest.get( - `/v2/programmatic/projects/${projectId}/campaigns/${campaignId}/accrual-details/window/${windowStart}` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId, windowStart], + () => + "/v2/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/accrual-details/window/" + + __encodePathParam(windowStart) + + "" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - address: options.params["address"] as any, - qualified: options.params["qualified"] as any, - sortField: options.params["sortField"] as any, - sortDirection: options.params["sortDirection"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + address: options.params["address"] as any, + qualified: options.params["qualified"] as any, + sortField: options.params["sortField"] as any, + sortDirection: options.params["sortDirection"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignV2ControllerGetCampaignTvlStats: ( projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/programmatic/projects/${projectId}/campaigns/${campaignId}/tvl-stats` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId], + () => + "/v2/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/tvl-stats" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignV2ControllerGetUserAccrualHistory: ( projectId, @@ -7289,35 +8955,59 @@ export const make = ( address, options ) => - HttpClientRequest.get( - `/v2/programmatic/projects/${projectId}/campaigns/${campaignId}/user-accrual/${address}` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId, address], + () => + "/v2/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/user-accrual/" + + __encodePathParam(address) + + "" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignV2ControllerGetPayoutRuns: ( projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/programmatic/projects/${projectId}/campaigns/${campaignId}/payout-runs` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId], + () => + "/v2/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-runs" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - status: options.params["status"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + status: options.params["status"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignV2ControllerGetPayoutRunDetail: ( projectId, @@ -7325,17 +9015,30 @@ export const make = ( runId, options ) => - HttpClientRequest.get( - `/v2/programmatic/projects/${projectId}/campaigns/${campaignId}/payout-runs/${runId}` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId, runId], + () => + "/v2/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-runs/" + + __encodePathParam(runId) + + "" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignV2ControllerGetPayoutBatchDetail: ( projectId, @@ -7344,67 +9047,115 @@ export const make = ( batchKey, options ) => - HttpClientRequest.get( - `/v2/programmatic/projects/${projectId}/campaigns/${campaignId}/payout-runs/${runId}/batches/${batchKey}` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId, runId, batchKey], + () => + "/v2/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-runs/" + + __encodePathParam(runId) + + "/batches/" + + __encodePathParam(batchKey) + + "" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignV2ControllerGetCampaignSafeBalance: ( projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/programmatic/projects/${projectId}/campaigns/${campaignId}/safe-balance` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId], + () => + "/v2/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/safe-balance" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignV2ControllerGetCampaignPayoutEligibilitySummary: ( projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/programmatic/projects/${projectId}/campaigns/${campaignId}/payout-eligibility/summary` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId], + () => + "/v2/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/payout-eligibility/summary" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticCampaignV2ControllerGetCampaignBalances: ( projectId, campaignId, options ) => - HttpClientRequest.get( - `/v2/programmatic/projects/${projectId}/campaigns/${campaignId}/balances` + __makePathRequest( + HttpClientRequest.get, + [projectId, campaignId], + () => + "/v2/programmatic/projects/" + + __encodePathParam(projectId) + + "/campaigns/" + + __encodePathParam(campaignId) + + "/balances" ).pipe( - HttpClientRequest.setUrlParams({ - offset: options.params["offset"] as any, - limit: options.params["limit"] as any, - address: options.params["address"] as any, - qualified: options.params["qualified"] as any, - sortField: options.params["sortField"] as any, - sortDirection: options.params["sortDirection"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options.params["offset"] as any, + limit: options.params["limit"] as any, + address: options.params["address"] as any, + qualified: options.params["qualified"] as any, + sortField: options.params["sortField"] as any, + sortDirection: options.params["sortDirection"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), MasterBannedRegionControllerList: (options) => - HttpClientRequest.get(`/v1/teams/projects/master-banned-regions`).pipe( + HttpClientRequest.get("/v1/teams/projects/master-banned-regions").pipe( HttpClientRequest.setUrlParams({ limit: options?.params?.["limit"] as any, page: options?.params?.["page"] as any, @@ -7412,41 +9163,82 @@ export const make = ( onRequest(options?.config)(["2xx"]) ), MasterBannedRegionControllerCreate: (options) => - HttpClientRequest.post(`/v1/teams/projects/master-banned-regions`).pipe( + HttpClientRequest.post("/v1/teams/projects/master-banned-regions").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), MasterBannedRegionControllerDelete: (options) => - HttpClientRequest.delete(`/v1/teams/projects/master-banned-regions`).pipe( + HttpClientRequest.delete("/v1/teams/projects/master-banned-regions").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)([]) + onRequest(options.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) ), ProjectBannedRegionControllerList: (teamId, projectId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/banned-regions` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/banned-regions" ).pipe( - HttpClientRequest.setUrlParams({ - limit: options?.params?.["limit"] as any, - page: options?.params?.["page"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + limit: options?.params?.["limit"] as any, + page: options?.params?.["page"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), ProjectBannedRegionControllerCreate: (teamId, projectId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/banned-regions` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/banned-regions" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), ProjectBannedRegionControllerDelete: (teamId, projectId, options) => - HttpClientRequest.delete( - `/v1/teams/${teamId}/projects/${projectId}/banned-regions` + __makePathRequest( + HttpClientRequest.delete, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/banned-regions" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)([]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) ), MasterBannedYieldControllerList: (options) => - HttpClientRequest.get(`/v1/teams/projects/master-banned-yields`).pipe( + HttpClientRequest.get("/v1/teams/projects/master-banned-yields").pipe( HttpClientRequest.setUrlParams({ limit: options?.params?.["limit"] as any, page: options?.params?.["page"] as any, @@ -7454,7 +9246,7 @@ export const make = ( onRequest(options?.config)(["2xx"]) ), TeamsControllerFindAll: (options) => - HttpClientRequest.get(`/v1/teams`).pipe( + HttpClientRequest.get("/v1/teams").pipe( HttpClientRequest.setUrlParams({ sort: options?.params?.["sort"] as any, limit: options?.params?.["limit"] as any, @@ -7465,62 +9257,154 @@ export const make = ( onRequest(options?.config)(["2xx"]) ), TeamsControllerCreate: (options) => - HttpClientRequest.post(`/v1/teams`).pipe( + HttpClientRequest.post("/v1/teams").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), TeamsControllerListAuditLogs: (teamId, options) => - HttpClientRequest.get(`/v1/teams/${teamId}/audit-logs`).pipe( - HttpClientRequest.setUrlParams({ - page: options?.params?.["page"] as any, - limit: options?.params?.["limit"] as any, - event: options?.params?.["event"] as any, - actorId: options?.params?.["actorId"] as any, - from: options?.params?.["from"] as any, - to: options?.params?.["to"] as any, - }), - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/audit-logs" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + page: options?.params?.["page"] as any, + limit: options?.params?.["limit"] as any, + event: options?.params?.["event"] as any, + actorId: options?.params?.["actorId"] as any, + from: options?.params?.["from"] as any, + to: options?.params?.["to"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), TeamsControllerGetById: (teamId, options) => - HttpClientRequest.get(`/v1/teams/${teamId}`).pipe( - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), TeamsControllerSoftDelete: (teamId, options) => - HttpClientRequest.delete(`/v1/teams/${teamId}`).pipe( - onRequest(options?.config)([]) + __makePathRequest( + HttpClientRequest.delete, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) ), TeamsControllerUpdate: (teamId, options) => - HttpClientRequest.patch(`/v1/teams/${teamId}`).pipe( + __makePathRequest( + HttpClientRequest.patch, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) + ), + ProgrammaticTeamsControllerCreate: (options) => + HttpClientRequest.post("/v1/programmatic/teams").pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), ProjectsControllerGet: (teamId, options) => - HttpClientRequest.get(`/v1/teams/${teamId}/projects`).pipe( - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/projects" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) ), ProjectsControllerCreate: (teamId, options) => - HttpClientRequest.post(`/v1/teams/${teamId}/projects`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.post, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/projects" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), ProjectsControllerDelete: (teamId, projectId, options) => - HttpClientRequest.delete( - `/v1/teams/${teamId}/projects/${projectId}` - ).pipe(onRequest(options?.config)([])), + __makePathRequest( + HttpClientRequest.delete, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) + ), ProjectsControllerUpdate: (teamId, projectId, options) => - HttpClientRequest.patch(`/v1/teams/${teamId}/projects/${projectId}`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticProjectsControllerGet: (options) => - HttpClientRequest.get(`/v1/programmatic/projects`).pipe( + HttpClientRequest.get("/v1/programmatic/projects").pipe( HttpClientRequest.setHeaders({ "X-ADMIN-API-KEY": options?.params?.["X-ADMIN-API-KEY"] ?? undefined, }), onRequest(options?.config)(["2xx"]) ), ProgrammaticProjectsControllerCreate: (options) => - HttpClientRequest.post(`/v1/programmatic/projects`).pipe( + HttpClientRequest.post("/v1/programmatic/projects").pipe( HttpClientRequest.setHeaders({ "X-ADMIN-API-KEY": options.params?.["X-ADMIN-API-KEY"] ?? undefined, }), @@ -7528,80 +9412,202 @@ export const make = ( onRequest(options.config)(["2xx"]) ), ProgrammaticProjectsControllerDelete: (projectId, options) => - HttpClientRequest.delete(`/v1/programmatic/projects/${projectId}`).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options?.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options?.config)([]) + __makePathRequest( + HttpClientRequest.delete, + [projectId], + () => "/v1/programmatic/projects/" + __encodePathParam(projectId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options?.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) ), ProgrammaticProjectsControllerUpdate: (projectId, options) => - HttpClientRequest.patch(`/v1/programmatic/projects/${projectId}`).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.patch, + [projectId], + () => "/v1/programmatic/projects/" + __encodePathParam(projectId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), KeysControllerGet: (teamId, projectId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/keys` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/keys" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), KeysControllerCreate: (teamId, projectId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/keys` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/keys" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), KeysControllerDelete: (teamId, projectId, keyId, options) => - HttpClientRequest.delete( - `/v1/teams/${teamId}/projects/${projectId}/keys/${keyId}` - ).pipe(onRequest(options?.config)([])), + __makePathRequest( + HttpClientRequest.delete, + [teamId, projectId, keyId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/keys/" + + __encodePathParam(keyId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) + ), KeysControllerUpdate: (teamId, projectId, keyId, options) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/keys/${keyId}` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, keyId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/keys/" + + __encodePathParam(keyId) + + "" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticKeysControllerGet: (projectId, options) => - HttpClientRequest.get(`/v1/programmatic/projects/${projectId}/keys`).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options?.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [projectId], + () => + "/v1/programmatic/projects/" + __encodePathParam(projectId) + "/keys" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options?.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), ProgrammaticKeysControllerCreate: (projectId, options) => - HttpClientRequest.post( - `/v1/programmatic/projects/${projectId}/keys` + __makePathRequest( + HttpClientRequest.post, + [projectId], + () => + "/v1/programmatic/projects/" + __encodePathParam(projectId) + "/keys" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticKeysControllerDelete: (projectId, keyId, options) => - HttpClientRequest.delete( - `/v1/programmatic/projects/${projectId}/keys/${keyId}` + __makePathRequest( + HttpClientRequest.delete, + [projectId, keyId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/keys/" + + __encodePathParam(keyId) + + "" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options?.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options?.config)([]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options?.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) ), ProgrammaticKeysControllerUpdate: (projectId, keyId, options) => - HttpClientRequest.patch( - `/v1/programmatic/projects/${projectId}/keys/${keyId}` + __makePathRequest( + HttpClientRequest.patch, + [projectId, keyId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/keys/" + + __encodePathParam(keyId) + + "" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), HealthControllerHealthV2: (options) => - HttpClientRequest.get(`/v2/health`).pipe( + HttpClientRequest.get("/v2/health").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, }), @@ -7620,24 +9626,52 @@ export const make = ( }) ), HomeControllerAppInfo: (options) => - HttpClientRequest.get(`/`).pipe(onRequest(options?.config)([])), + HttpClientRequest.get("/").pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ), IndexingStatusControllerGetIndexingStatus: (options) => - HttpClientRequest.get(`/v1/indexing-status`).pipe( + HttpClientRequest.get("/v1/indexing-status").pipe( HttpClientRequest.setUrlParams({ network: options.params["network"] as any, }), onRequest(options.config)(["2xx"]) ), PayoutAddressesControllerGet: (teamId, projectId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/payout-addresses` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/payout-addresses" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), PayoutAddressesControllerCreate: (teamId, projectId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/payout-addresses` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/payout-addresses" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), PayoutAddressesControllerDelete: ( teamId, @@ -7645,92 +9679,328 @@ export const make = ( payoutAddressId, options ) => - HttpClientRequest.delete( - `/v1/teams/${teamId}/projects/${projectId}/payout-addresses/${payoutAddressId}` - ).pipe(onRequest(options?.config)([])), + __makePathRequest( + HttpClientRequest.delete, + [teamId, projectId, payoutAddressId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/payout-addresses/" + + __encodePathParam(payoutAddressId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) + ), PayoutAddressesControllerUpdate: ( teamId, projectId, payoutAddressId, options ) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/payout-addresses/${payoutAddressId}` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, payoutAddressId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/payout-addresses/" + + __encodePathParam(payoutAddressId) + + "" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) + ), + PayoutRequestsControllerRequestPayout: (teamId, projectId, options) => + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/payouts/request" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["400", "409", "412"], + }) + ) + ) ), NetworkAddressReferralControllerGetByAddress: (network, address, options) => - HttpClientRequest.get( - `/v1/networks/${network}/addresses/${address}/referrals` + __makePathRequest( + HttpClientRequest.get, + [network, address], + () => + "/v1/networks/" + + __encodePathParam(network) + + "/addresses/" + + __encodePathParam(address) + + "/referrals" ).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), NetworkAddressReferralControllerCreate: (network, address, options) => - HttpClientRequest.post( - `/v1/networks/${network}/addresses/${address}/referrals` + __makePathRequest( + HttpClientRequest.post, + [network, address], + () => + "/v1/networks/" + + __encodePathParam(network) + + "/addresses/" + + __encodePathParam(address) + + "/referrals" ).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), ReferralControllerGetByCode: (code, options) => - HttpClientRequest.get(`/v1/referrals/${code}`).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [code], + () => "/v1/referrals/" + __encodePathParam(code) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), RevenueBreakdownControllerGetRevenueSummary: (teamId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/reporting/revenue/summary` + __makePathRequest( + HttpClientRequest.get, + [teamId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/reporting/revenue/summary" ).pipe( - HttpClientRequest.setUrlParams({ - month: options?.params?.["month"] as any, - date_from: options?.params?.["date_from"] as any, - date_to: options?.params?.["date_to"] as any, - project_ids: options?.params?.["project_ids"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + month: options?.params?.["month"] as any, + date_from: options?.params?.["date_from"] as any, + date_to: options?.params?.["date_to"] as any, + project_ids: options?.params?.["project_ids"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), KpiSummaryControllerGetSummary: (teamId, options) => - HttpClientRequest.get(`/v1/teams/${teamId}/reporting/summary`).pipe( - HttpClientRequest.setUrlParams({ - month: options?.params?.["month"] as any, - date_from: options?.params?.["date_from"] as any, - date_to: options?.params?.["date_to"] as any, - project_ids: options?.params?.["project_ids"] as any, - }), - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/reporting/summary" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + month: options?.params?.["month"] as any, + date_from: options?.params?.["date_from"] as any, + date_to: options?.params?.["date_to"] as any, + project_ids: options?.params?.["project_ids"] as any, + }), + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["400"], + }) + ) + ) ), KpiTrendsControllerGetTrends: (teamId, options) => - HttpClientRequest.get(`/v1/teams/${teamId}/reporting/trends`).pipe( - HttpClientRequest.setUrlParams({ - project_ids: options?.params?.["project_ids"] as any, - }), - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/reporting/trends" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + project_ids: options?.params?.["project_ids"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) + ), + MonthlyReportControllerList: (teamId, options) => + __makePathRequest( + HttpClientRequest.get, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/reporting/reports" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), + MonthlyReportControllerCreateDraft: (teamId, options) => + __makePathRequest( + HttpClientRequest.post, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/reporting/reports" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["412"], + }) + ) + ) + ), + MonthlyReportControllerGetDetail: (teamId, reportId, options) => + __makePathRequest( + HttpClientRequest.get, + [teamId, reportId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/reporting/reports/" + + __encodePathParam(reportId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) + ), + MonthlyReportControllerPublish: (teamId, reportId, options) => + __makePathRequest( + HttpClientRequest.post, + [teamId, reportId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/reporting/reports/" + + __encodePathParam(reportId) + + "/publish" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) + ), + MonthlyReportControllerDownload: (teamId, reportId, options) => + __makePathRequest( + HttpClientRequest.get, + [teamId, reportId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/reporting/reports/" + + __encodePathParam(reportId) + + "/download" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: ["2xx"], + voidSuccess: [], + voidError: [], + }) + ) + ) + ), + MonthlyReportControllerDownloadStream: (teamId, reportId) => + Stream.unwrap( + __makePathRequest( + HttpClientRequest.get, + [teamId, reportId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/reporting/reports/" + + __encodePathParam(reportId) + + "/download" + ).pipe(Effect.map((request) => request.pipe(binaryRequest))) ), ReportEntryControllerList: (teamId, options) => - HttpClientRequest.get(`/v1/teams/${teamId}/report-entries`).pipe( - HttpClientRequest.setUrlParams({ - limit: options?.params?.["limit"] as any, - page: options?.params?.["page"] as any, - walletAddress: options?.params?.["walletAddress"] as any, - validatorAddress: options?.params?.["validatorAddress"] as any, - type: options?.params?.["type"] as any, - status: options?.params?.["status"] as any, - sort: options?.params?.["sort"] as any, - projectId: options?.params?.["projectId"] as any, - integrationId: options?.params?.["integrationId"] as any, - }), - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/report-entries" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + limit: options?.params?.["limit"] as any, + page: options?.params?.["page"] as any, + walletAddress: options?.params?.["walletAddress"] as any, + validatorAddress: options?.params?.["validatorAddress"] as any, + type: options?.params?.["type"] as any, + status: options?.params?.["status"] as any, + sort: options?.params?.["sort"] as any, + projectId: options?.params?.["projectId"] as any, + integrationId: options?.params?.["integrationId"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), ReportProjectControllerList: (options) => - HttpClientRequest.get(`/v1/reporting/actions`).pipe( + HttpClientRequest.get("/v1/reporting/actions").pipe( HttpClientRequest.setUrlParams({ from: options.params["from"] as any, to: options.params["to"] as any, @@ -7748,20 +10018,28 @@ export const make = ( onRequest(options.config)(["2xx"]) ), ReportProjectControllerGetRewards: (integrationId, options) => - HttpClientRequest.get(`/v1/reporting/rewards/${integrationId}`).pipe( - HttpClientRequest.setUrlParams({ - from: options.params["from"] as any, - to: options.params["to"] as any, - limit: options.params["limit"] as any, - page: options.params["page"] as any, - }), - HttpClientRequest.setHeaders({ - "X-API-KEY": options.params["X-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [integrationId], + () => "/v1/reporting/rewards/" + __encodePathParam(integrationId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + from: options.params["from"] as any, + to: options.params["to"] as any, + limit: options.params["limit"] as any, + page: options.params["page"] as any, + }), + HttpClientRequest.setHeaders({ + "X-API-KEY": options.params["X-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ReportProjectControllerGetDailyRevenues: (options) => - HttpClientRequest.get(`/v1/reporting/revenue`).pipe( + HttpClientRequest.get("/v1/reporting/revenue").pipe( HttpClientRequest.setUrlParams({ from: options.params["from"] as any, to: options.params["to"] as any, @@ -7775,7 +10053,7 @@ export const make = ( onRequest(options.config)(["2xx"]) ), ReportProjectControllerGetDailyPerformance: (options) => - HttpClientRequest.get(`/v1/reporting/performance`).pipe( + HttpClientRequest.get("/v1/reporting/performance").pipe( HttpClientRequest.setUrlParams({ from: options.params["from"] as any, to: options.params["to"] as any, @@ -7789,7 +10067,7 @@ export const make = ( onRequest(options.config)(["2xx"]) ), ProgrammaticReportEntryControllerList: (options) => - HttpClientRequest.get(`/v1/programmatic/report-entries`).pipe( + HttpClientRequest.get("/v1/programmatic/report-entries").pipe( HttpClientRequest.setUrlParams({ limit: options.params["limit"] as any, page: options.params["page"] as any, @@ -7806,169 +10084,331 @@ export const make = ( }), onRequest(options.config)(["2xx"]) ), - ProgrammaticReportingControllerGetDailyRevenues: (projectId, options) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/reporting/revenue` - ).pipe( - HttpClientRequest.setUrlParams({ - date: options.params["date"] as any, - limit: options.params["limit"] as any, - page: options.params["page"] as any, - providerId: options.params["providerId"] as any, - integrationId: options.params["integrationId"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) - ), - ProgrammaticReportingControllerGetDailyRevenueAggregates: ( - projectId, - options - ) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/reporting/revenue/aggregate` - ).pipe( - HttpClientRequest.setUrlParams({ - from: options.params["from"] as any, - to: options.params["to"] as any, - providerId: options.params["providerId"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) - ), - ProgrammaticReportingControllerGetDailyPerformance: (projectId, options) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/reporting/performance` - ).pipe( - HttpClientRequest.setUrlParams({ - date: options.params["date"] as any, - limit: options.params["limit"] as any, - page: options.params["page"] as any, - providerId: options.params["providerId"] as any, - integrationId: options.params["integrationId"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) - ), + ProgrammaticReportingControllerGetDailyRevenues: (projectId, options) => + __makePathRequest( + HttpClientRequest.get, + [projectId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/reporting/revenue" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + date: options.params["date"] as any, + limit: options.params["limit"] as any, + page: options.params["page"] as any, + providerId: options.params["providerId"] as any, + integrationId: options.params["integrationId"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) + ), + ProgrammaticReportingControllerGetDailyRevenueAggregates: ( + projectId, + options + ) => + __makePathRequest( + HttpClientRequest.get, + [projectId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/reporting/revenue/aggregate" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + from: options.params["from"] as any, + to: options.params["to"] as any, + providerId: options.params["providerId"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) + ), + ProgrammaticReportingControllerGetDailyPerformance: (projectId, options) => + __makePathRequest( + HttpClientRequest.get, + [projectId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/reporting/performance" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + date: options.params["date"] as any, + limit: options.params["limit"] as any, + page: options.params["page"] as any, + providerId: options.params["providerId"] as any, + integrationId: options.params["integrationId"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) + ), ProgrammaticReportingControllerGetDailyPerformanceAggregates: ( projectId, options ) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/reporting/performance/aggregate` + __makePathRequest( + HttpClientRequest.get, + [projectId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/reporting/performance/aggregate" ).pipe( - HttpClientRequest.setUrlParams({ - from: options.params["from"] as any, - to: options.params["to"] as any, - providerId: options.params["providerId"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + from: options.params["from"] as any, + to: options.params["to"] as any, + providerId: options.params["providerId"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticReportingControllerGetPerpActions: (projectId, options) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/reporting/perps/actions` + __makePathRequest( + HttpClientRequest.get, + [projectId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/reporting/perps/actions" ).pipe( - HttpClientRequest.setUrlParams({ - providerId: options.params["providerId"] as any, - address: options.params["address"] as any, - status: options.params["status"] as any, - type: options.params["type"] as any, - marketId: options.params["marketId"] as any, - limit: options.params["limit"] as any, - page: options.params["page"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + providerId: options.params["providerId"] as any, + address: options.params["address"] as any, + status: options.params["status"] as any, + type: options.params["type"] as any, + marketId: options.params["marketId"] as any, + limit: options.params["limit"] as any, + page: options.params["page"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) + ), + ProgrammaticReportingControllerGetPerpActivity: (projectId, options) => + __makePathRequest( + HttpClientRequest.get, + [projectId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/reporting/perps/activity" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + providerId: options.params["providerId"] as any, + address: options.params["address"] as any, + status: options.params["status"] as any, + type: options.params["type"] as any, + marketId: options.params["marketId"] as any, + from: options.params["from"] as any, + to: options.params["to"] as any, + limit: options.params["limit"] as any, + page: options.params["page"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": options.params["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), UsersMeControllerFindMe: (options) => - HttpClientRequest.get(`/v1/teams/users/me`).pipe( + HttpClientRequest.get("/v1/teams/users/me").pipe( onRequest(options?.config)(["2xx"]) ), UsersMeControllerPatchMe: (options) => - HttpClientRequest.patch(`/v1/teams/users/me`).pipe( + HttpClientRequest.patch("/v1/teams/users/me").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), UsersMeControllerConfirmMe: (options) => - HttpClientRequest.post(`/v1/teams/users/me/activation`).pipe( + HttpClientRequest.post("/v1/teams/users/me/activation").pipe( onRequest(options?.config)(["2xx"]) ), UsersControllerFindAll: (teamId, options) => - HttpClientRequest.get(`/v1/teams/${teamId}/users`).pipe( - HttpClientRequest.setUrlParams({ - limit: options?.params?.["limit"] as any, - page: options?.params?.["page"] as any, - }), - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/users" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + limit: options?.params?.["limit"] as any, + page: options?.params?.["page"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), UsersControllerCreate: (teamId, options) => - HttpClientRequest.post(`/v1/teams/${teamId}/users`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.post, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/users" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), UsersControllerFindOne: (teamId, id, options) => - HttpClientRequest.get(`/v1/teams/${teamId}/users/${id}`).pipe( - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [teamId, id], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/users/" + + __encodePathParam(id) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) ), UsersControllerRemoveTeamMember: (teamId, id, options) => - HttpClientRequest.delete(`/v1/teams/${teamId}/users/${id}`).pipe( - onRequest(options?.config)([]) + __makePathRequest( + HttpClientRequest.delete, + [teamId, id], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/users/" + + __encodePathParam(id) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["204"], + voidError: [], + }) + ) + ) ), UsersControllerUpdate: (teamId, id, options) => - HttpClientRequest.patch(`/v1/teams/${teamId}/users/${id}`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.patch, + [teamId, id], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/users/" + + __encodePathParam(id) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) + ), + UsersControllerResendInvitation: (teamId, id, options) => + __makePathRequest( + HttpClientRequest.post, + [teamId, id], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/users/" + + __encodePathParam(id) + + "/resend-invitation" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) ), ActionControllerGetAction: (actionId, options) => - HttpClientRequest.get(`/v1/actions/${actionId}`).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "400": "ActionControllerGetAction400", - "401": "ActionControllerGetAction401", - "404": "ActionControllerGetAction404", - "408": "ActionControllerGetAction408", - "409": "ActionControllerGetAction409", - "410": "ActionControllerGetAction410", - "412": "ActionControllerGetAction412", - "429": "ActionControllerGetAction429", - "500": "ActionControllerGetAction500", - "502": "ActionControllerGetAction502", - "503": "ActionControllerGetAction503", - }) + __makePathRequest( + HttpClientRequest.get, + [actionId], + () => "/v1/actions/" + __encodePathParam(actionId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "400": "ActionControllerGetAction400", + "401": "ActionControllerGetAction401", + "404": "ActionControllerGetAction404", + "408": "ActionControllerGetAction408", + "409": "ActionControllerGetAction409", + "410": "ActionControllerGetAction410", + "412": "ActionControllerGetAction412", + "429": "ActionControllerGetAction429", + "500": "ActionControllerGetAction500", + "502": "ActionControllerGetAction502", + "503": "ActionControllerGetAction503", + }) + ) + ) ), ActionControllerGetGasEstimate: (actionId, options) => - HttpClientRequest.get(`/v1/actions/${actionId}/gas-estimate`).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "400": "ActionControllerGetGasEstimate400", - "401": "ActionControllerGetGasEstimate401", - "404": "ActionControllerGetGasEstimate404", - "408": "ActionControllerGetGasEstimate408", - "409": "ActionControllerGetGasEstimate409", - "410": "ActionControllerGetGasEstimate410", - "412": "ActionControllerGetGasEstimate412", - "429": "ActionControllerGetGasEstimate429", - "500": "ActionControllerGetGasEstimate500", - "502": "ActionControllerGetGasEstimate502", - "503": "ActionControllerGetGasEstimate503", - }) + __makePathRequest( + HttpClientRequest.get, + [actionId], + () => "/v1/actions/" + __encodePathParam(actionId) + "/gas-estimate" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "400": "ActionControllerGetGasEstimate400", + "401": "ActionControllerGetGasEstimate401", + "404": "ActionControllerGetGasEstimate404", + "408": "ActionControllerGetGasEstimate408", + "409": "ActionControllerGetGasEstimate409", + "410": "ActionControllerGetGasEstimate410", + "412": "ActionControllerGetGasEstimate412", + "429": "ActionControllerGetGasEstimate429", + "500": "ActionControllerGetGasEstimate500", + "502": "ActionControllerGetGasEstimate502", + "503": "ActionControllerGetGasEstimate503", + }) + ) + ) ), ActionControllerEnter: (options) => - HttpClientRequest.post(`/v1/actions/enter`).pipe( + HttpClientRequest.post("/v1/actions/enter").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, }), @@ -7989,7 +10429,7 @@ export const make = ( }) ), ActionControllerExit: (options) => - HttpClientRequest.post(`/v1/actions/exit`).pipe( + HttpClientRequest.post("/v1/actions/exit").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, }), @@ -8010,7 +10450,7 @@ export const make = ( }) ), ActionControllerPending: (options) => - HttpClientRequest.post(`/v1/actions/pending`).pipe( + HttpClientRequest.post("/v1/actions/pending").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, }), @@ -8031,7 +10471,7 @@ export const make = ( }) ), ActionControllerEnterGasEstimation: (options) => - HttpClientRequest.post(`/v1/actions/enter/estimate-gas`).pipe( + HttpClientRequest.post("/v1/actions/enter/estimate-gas").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, }), @@ -8051,7 +10491,7 @@ export const make = ( }) ), ActionControllerExitGasEstimate: (options) => - HttpClientRequest.post(`/v1/actions/exit/estimate-gas`).pipe( + HttpClientRequest.post("/v1/actions/exit/estimate-gas").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, }), @@ -8071,7 +10511,7 @@ export const make = ( }) ), ActionControllerList: (options) => - HttpClientRequest.get(`/v1/actions`).pipe( + HttpClientRequest.get("/v1/actions").pipe( HttpClientRequest.setUrlParams({ walletAddress: options.params["walletAddress"] as any, statuses: options.params["statuses"] as any, @@ -8100,7 +10540,7 @@ export const make = ( }) ), ActionControllerPendingGasEstimate: (options) => - HttpClientRequest.post(`/v1/actions/pending/estimate-gas`).pipe( + HttpClientRequest.post("/v1/actions/pending/estimate-gas").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, }), @@ -8120,15 +10560,26 @@ export const make = ( }) ), NetworkAddressActionV2ControllerCreate: (network, address, options) => - HttpClientRequest.post( - `/v2/network/${network}/address/${address}/actions` + __makePathRequest( + HttpClientRequest.post, + [network, address], + () => + "/v2/network/" + + __encodePathParam(network) + + "/address/" + + __encodePathParam(address) + + "/actions" ).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "403": "NetworkAddressActionV2ControllerCreate403", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "403": "NetworkAddressActionV2ControllerCreate403", + }) + ) + ) ), NetworkAddressActionV2ControllerGetById: ( network, @@ -8136,251 +10587,376 @@ export const make = ( actionId, options ) => - HttpClientRequest.get( - `/v2/network/${network}/address/${address}/actions/${actionId}` + __makePathRequest( + HttpClientRequest.get, + [network, address, actionId], + () => + "/v2/network/" + + __encodePathParam(network) + + "/address/" + + __encodePathParam(address) + + "/actions/" + + __encodePathParam(actionId) + + "" ).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), NetworkGasControllerV2GetGasPrices: (network, options) => - HttpClientRequest.get(`/v2/networks/${network}/gas`).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [network], + () => "/v2/networks/" + __encodePathParam(network) + "/gas" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), TransactionControllerGetTransaction: (transactionId, options) => - HttpClientRequest.get(`/v1/transactions/${transactionId}`).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "400": "TransactionControllerGetTransaction400", - "401": "TransactionControllerGetTransaction401", - "404": "TransactionControllerGetTransaction404", - "408": "TransactionControllerGetTransaction408", - "409": "TransactionControllerGetTransaction409", - "410": "TransactionControllerGetTransaction410", - "412": "TransactionControllerGetTransaction412", - "429": "TransactionControllerGetTransaction429", - "500": "TransactionControllerGetTransaction500", - "502": "TransactionControllerGetTransaction502", - "503": "TransactionControllerGetTransaction503", - }) + __makePathRequest( + HttpClientRequest.get, + [transactionId], + () => "/v1/transactions/" + __encodePathParam(transactionId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "400": "TransactionControllerGetTransaction400", + "401": "TransactionControllerGetTransaction401", + "404": "TransactionControllerGetTransaction404", + "408": "TransactionControllerGetTransaction408", + "409": "TransactionControllerGetTransaction409", + "410": "TransactionControllerGetTransaction410", + "412": "TransactionControllerGetTransaction412", + "429": "TransactionControllerGetTransaction429", + "500": "TransactionControllerGetTransaction500", + "502": "TransactionControllerGetTransaction502", + "503": "TransactionControllerGetTransaction503", + }) + ) + ) ), TransactionControllerConstruct: (transactionId, options) => - HttpClientRequest.patch(`/v1/transactions/${transactionId}`).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "TransactionControllerConstruct400", - "401": "TransactionControllerConstruct401", - "403": "TransactionControllerConstruct403", - "404": "TransactionControllerConstruct404", - "408": "TransactionControllerConstruct408", - "409": "TransactionControllerConstruct409", - "410": "TransactionControllerConstruct410", - "412": "TransactionControllerConstruct412", - "429": "TransactionControllerConstruct429", - "500": "TransactionControllerConstruct500", - "502": "TransactionControllerConstruct502", - "503": "TransactionControllerConstruct503", - }) + __makePathRequest( + HttpClientRequest.patch, + [transactionId], + () => "/v1/transactions/" + __encodePathParam(transactionId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], { + "400": "TransactionControllerConstruct400", + "401": "TransactionControllerConstruct401", + "403": "TransactionControllerConstruct403", + "404": "TransactionControllerConstruct404", + "408": "TransactionControllerConstruct408", + "409": "TransactionControllerConstruct409", + "410": "TransactionControllerConstruct410", + "412": "TransactionControllerConstruct412", + "429": "TransactionControllerConstruct429", + "500": "TransactionControllerConstruct500", + "502": "TransactionControllerConstruct502", + "503": "TransactionControllerConstruct503", + }) + ) + ) ), TransactionControllerSubmit: (transactionId, options) => - HttpClientRequest.post(`/v1/transactions/${transactionId}/submit`).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "TransactionControllerSubmit400", - "401": "TransactionControllerSubmit401", - "403": "TransactionControllerSubmit403", - "404": "TransactionControllerSubmit404", - "408": "TransactionControllerSubmit408", - "409": "TransactionControllerSubmit409", - "410": "TransactionControllerSubmit410", - "412": "TransactionControllerSubmit412", - "429": "TransactionControllerSubmit429", - "500": "TransactionControllerSubmit500", - "502": "TransactionControllerSubmit502", - "503": "TransactionControllerSubmit503", - }) + __makePathRequest( + HttpClientRequest.post, + [transactionId], + () => "/v1/transactions/" + __encodePathParam(transactionId) + "/submit" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], { + "400": "TransactionControllerSubmit400", + "401": "TransactionControllerSubmit401", + "403": "TransactionControllerSubmit403", + "404": "TransactionControllerSubmit404", + "408": "TransactionControllerSubmit408", + "409": "TransactionControllerSubmit409", + "410": "TransactionControllerSubmit410", + "412": "TransactionControllerSubmit412", + "429": "TransactionControllerSubmit429", + "500": "TransactionControllerSubmit500", + "502": "TransactionControllerSubmit502", + "503": "TransactionControllerSubmit503", + }) + ) + ) ), TransactionControllerSubmitHash: (transactionId, options) => - HttpClientRequest.post( - `/v1/transactions/${transactionId}/submit_hash` + __makePathRequest( + HttpClientRequest.post, + [transactionId], + () => + "/v1/transactions/" + + __encodePathParam(transactionId) + + "/submit_hash" ).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)([], { - "400": "TransactionControllerSubmitHash400", - "401": "TransactionControllerSubmitHash401", - "403": "TransactionControllerSubmitHash403", - "404": "TransactionControllerSubmitHash404", - "408": "TransactionControllerSubmitHash408", - "409": "TransactionControllerSubmitHash409", - "410": "TransactionControllerSubmitHash410", - "412": "TransactionControllerSubmitHash412", - "429": "TransactionControllerSubmitHash429", - "500": "TransactionControllerSubmitHash500", - "502": "TransactionControllerSubmitHash502", - "503": "TransactionControllerSubmitHash503", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)( + [], + { + "400": "TransactionControllerSubmitHash400", + "401": "TransactionControllerSubmitHash401", + "403": "TransactionControllerSubmitHash403", + "404": "TransactionControllerSubmitHash404", + "408": "TransactionControllerSubmitHash408", + "409": "TransactionControllerSubmitHash409", + "410": "TransactionControllerSubmitHash410", + "412": "TransactionControllerSubmitHash412", + "429": "TransactionControllerSubmitHash429", + "500": "TransactionControllerSubmitHash500", + "502": "TransactionControllerSubmitHash502", + "503": "TransactionControllerSubmitHash503", + }, + { binary: [], voidSuccess: ["201"], voidError: [] } + ) + ) + ) ), TransactionControllerGetTransactionStatusFromId: (transactionId, options) => - HttpClientRequest.get(`/v1/transactions/${transactionId}/status`).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "400": "TransactionControllerGetTransactionStatusFromId400", - "401": "TransactionControllerGetTransactionStatusFromId401", - "404": "TransactionControllerGetTransactionStatusFromId404", - "408": "TransactionControllerGetTransactionStatusFromId408", - "409": "TransactionControllerGetTransactionStatusFromId409", - "410": "TransactionControllerGetTransactionStatusFromId410", - "412": "TransactionControllerGetTransactionStatusFromId412", - "429": "TransactionControllerGetTransactionStatusFromId429", - "500": "TransactionControllerGetTransactionStatusFromId500", - "502": "TransactionControllerGetTransactionStatusFromId502", - "503": "TransactionControllerGetTransactionStatusFromId503", - }) + __makePathRequest( + HttpClientRequest.get, + [transactionId], + () => "/v1/transactions/" + __encodePathParam(transactionId) + "/status" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "400": "TransactionControllerGetTransactionStatusFromId400", + "401": "TransactionControllerGetTransactionStatusFromId401", + "404": "TransactionControllerGetTransactionStatusFromId404", + "408": "TransactionControllerGetTransactionStatusFromId408", + "409": "TransactionControllerGetTransactionStatusFromId409", + "410": "TransactionControllerGetTransactionStatusFromId410", + "412": "TransactionControllerGetTransactionStatusFromId412", + "429": "TransactionControllerGetTransactionStatusFromId429", + "500": "TransactionControllerGetTransactionStatusFromId500", + "502": "TransactionControllerGetTransactionStatusFromId502", + "503": "TransactionControllerGetTransactionStatusFromId503", + }) + ) + ) ), TransactionControllerGetGasForNetwork: (network, options) => - HttpClientRequest.get(`/v1/transactions/gas/${network}`).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "400": "TransactionControllerGetGasForNetwork400", - "401": "TransactionControllerGetGasForNetwork401", - "404": "TransactionControllerGetGasForNetwork404", - "408": "TransactionControllerGetGasForNetwork408", - "409": "TransactionControllerGetGasForNetwork409", - "410": "TransactionControllerGetGasForNetwork410", - "412": "TransactionControllerGetGasForNetwork412", - "429": "TransactionControllerGetGasForNetwork429", - "500": "TransactionControllerGetGasForNetwork500", - "502": "TransactionControllerGetGasForNetwork502", - "503": "TransactionControllerGetGasForNetwork503", - }) + __makePathRequest( + HttpClientRequest.get, + [network], + () => "/v1/transactions/gas/" + __encodePathParam(network) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "400": "TransactionControllerGetGasForNetwork400", + "401": "TransactionControllerGetGasForNetwork401", + "404": "TransactionControllerGetGasForNetwork404", + "408": "TransactionControllerGetGasForNetwork408", + "409": "TransactionControllerGetGasForNetwork409", + "410": "TransactionControllerGetGasForNetwork410", + "412": "TransactionControllerGetGasForNetwork412", + "429": "TransactionControllerGetGasForNetwork429", + "500": "TransactionControllerGetGasForNetwork500", + "502": "TransactionControllerGetGasForNetwork502", + "503": "TransactionControllerGetGasForNetwork503", + }) + ) + ) ), TransactionControllerGetTransactionStatusByNetworkAndHash: ( network, hash, options ) => - HttpClientRequest.get(`/v1/transactions/status/${network}/${hash}`).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "400": "TransactionControllerGetTransactionStatusByNetworkAndHash400", - "401": "TransactionControllerGetTransactionStatusByNetworkAndHash401", - "404": "TransactionControllerGetTransactionStatusByNetworkAndHash404", - "408": "TransactionControllerGetTransactionStatusByNetworkAndHash408", - "409": "TransactionControllerGetTransactionStatusByNetworkAndHash409", - "410": "TransactionControllerGetTransactionStatusByNetworkAndHash410", - "412": "TransactionControllerGetTransactionStatusByNetworkAndHash412", - "429": "TransactionControllerGetTransactionStatusByNetworkAndHash429", - "500": "TransactionControllerGetTransactionStatusByNetworkAndHash500", - "502": "TransactionControllerGetTransactionStatusByNetworkAndHash502", - "503": "TransactionControllerGetTransactionStatusByNetworkAndHash503", - }) + __makePathRequest( + HttpClientRequest.get, + [network, hash], + () => + "/v1/transactions/status/" + + __encodePathParam(network) + + "/" + + __encodePathParam(hash) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "400": + "TransactionControllerGetTransactionStatusByNetworkAndHash400", + "401": + "TransactionControllerGetTransactionStatusByNetworkAndHash401", + "404": + "TransactionControllerGetTransactionStatusByNetworkAndHash404", + "408": + "TransactionControllerGetTransactionStatusByNetworkAndHash408", + "409": + "TransactionControllerGetTransactionStatusByNetworkAndHash409", + "410": + "TransactionControllerGetTransactionStatusByNetworkAndHash410", + "412": + "TransactionControllerGetTransactionStatusByNetworkAndHash412", + "429": + "TransactionControllerGetTransactionStatusByNetworkAndHash429", + "500": + "TransactionControllerGetTransactionStatusByNetworkAndHash500", + "502": + "TransactionControllerGetTransactionStatusByNetworkAndHash502", + "503": + "TransactionControllerGetTransactionStatusByNetworkAndHash503", + }) + ) + ) ), TransactionControllerGetTransactionVerificationMessageForNetwork: ( network, options ) => - HttpClientRequest.post(`/v1/transactions/verification/${network}`).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": - "TransactionControllerGetTransactionVerificationMessageForNetwork400", - "401": - "TransactionControllerGetTransactionVerificationMessageForNetwork401", - "403": - "TransactionControllerGetTransactionVerificationMessageForNetwork403", - "404": - "TransactionControllerGetTransactionVerificationMessageForNetwork404", - "408": - "TransactionControllerGetTransactionVerificationMessageForNetwork408", - "409": - "TransactionControllerGetTransactionVerificationMessageForNetwork409", - "410": - "TransactionControllerGetTransactionVerificationMessageForNetwork410", - "412": - "TransactionControllerGetTransactionVerificationMessageForNetwork412", - "429": - "TransactionControllerGetTransactionVerificationMessageForNetwork429", - "500": - "TransactionControllerGetTransactionVerificationMessageForNetwork500", - "502": - "TransactionControllerGetTransactionVerificationMessageForNetwork502", - "503": - "TransactionControllerGetTransactionVerificationMessageForNetwork503", - }) + __makePathRequest( + HttpClientRequest.post, + [network], + () => "/v1/transactions/verification/" + __encodePathParam(network) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], { + "400": + "TransactionControllerGetTransactionVerificationMessageForNetwork400", + "401": + "TransactionControllerGetTransactionVerificationMessageForNetwork401", + "403": + "TransactionControllerGetTransactionVerificationMessageForNetwork403", + "404": + "TransactionControllerGetTransactionVerificationMessageForNetwork404", + "408": + "TransactionControllerGetTransactionVerificationMessageForNetwork408", + "409": + "TransactionControllerGetTransactionVerificationMessageForNetwork409", + "410": + "TransactionControllerGetTransactionVerificationMessageForNetwork410", + "412": + "TransactionControllerGetTransactionVerificationMessageForNetwork412", + "429": + "TransactionControllerGetTransactionVerificationMessageForNetwork429", + "500": + "TransactionControllerGetTransactionVerificationMessageForNetwork500", + "502": + "TransactionControllerGetTransactionVerificationMessageForNetwork502", + "503": + "TransactionControllerGetTransactionVerificationMessageForNetwork503", + }) + ) + ) ), NetworkAddressesTokenV2ControllerGetTokenBalances: ( network, address, options ) => - HttpClientRequest.get( - `/v2/networks/${network}/addresses/${address}/tokens` + __makePathRequest( + HttpClientRequest.get, + [network, address], + () => + "/v2/networks/" + + __encodePathParam(network) + + "/addresses/" + + __encodePathParam(address) + + "/tokens" ).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "400": "NetworkAddressesTokenV2ControllerGetTokenBalances400", - "401": "NetworkAddressesTokenV2ControllerGetTokenBalances401", - "404": "NetworkAddressesTokenV2ControllerGetTokenBalances404", - "408": "NetworkAddressesTokenV2ControllerGetTokenBalances408", - "409": "NetworkAddressesTokenV2ControllerGetTokenBalances409", - "410": "NetworkAddressesTokenV2ControllerGetTokenBalances410", - "412": "NetworkAddressesTokenV2ControllerGetTokenBalances412", - "429": "NetworkAddressesTokenV2ControllerGetTokenBalances429", - "500": "NetworkAddressesTokenV2ControllerGetTokenBalances500", - "502": "NetworkAddressesTokenV2ControllerGetTokenBalances502", - "503": "NetworkAddressesTokenV2ControllerGetTokenBalances503", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "400": "NetworkAddressesTokenV2ControllerGetTokenBalances400", + "401": "NetworkAddressesTokenV2ControllerGetTokenBalances401", + "404": "NetworkAddressesTokenV2ControllerGetTokenBalances404", + "408": "NetworkAddressesTokenV2ControllerGetTokenBalances408", + "409": "NetworkAddressesTokenV2ControllerGetTokenBalances409", + "410": "NetworkAddressesTokenV2ControllerGetTokenBalances410", + "412": "NetworkAddressesTokenV2ControllerGetTokenBalances412", + "429": "NetworkAddressesTokenV2ControllerGetTokenBalances429", + "500": "NetworkAddressesTokenV2ControllerGetTokenBalances500", + "502": "NetworkAddressesTokenV2ControllerGetTokenBalances502", + "503": "NetworkAddressesTokenV2ControllerGetTokenBalances503", + }) + ) + ) ), NetworkTokensV2ControllerGetTokens: (network, options) => - HttpClientRequest.get(`/v2/networks/${network}/addresses/tokens`).pipe( - HttpClientRequest.setUrlParams({ - enabledYieldsOnly: options?.params?.["enabledYieldsOnly"] as any, - }), - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "400": "NetworkTokensV2ControllerGetTokens400", - "401": "NetworkTokensV2ControllerGetTokens401", - "404": "NetworkTokensV2ControllerGetTokens404", - "408": "NetworkTokensV2ControllerGetTokens408", - "409": "NetworkTokensV2ControllerGetTokens409", - "410": "NetworkTokensV2ControllerGetTokens410", - "412": "NetworkTokensV2ControllerGetTokens412", - "429": "NetworkTokensV2ControllerGetTokens429", - "500": "NetworkTokensV2ControllerGetTokens500", - "502": "NetworkTokensV2ControllerGetTokens502", - "503": "NetworkTokensV2ControllerGetTokens503", - }) + __makePathRequest( + HttpClientRequest.get, + [network], + () => "/v2/networks/" + __encodePathParam(network) + "/addresses/tokens" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + enabledYieldsOnly: options?.params?.["enabledYieldsOnly"] as any, + }), + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "400": "NetworkTokensV2ControllerGetTokens400", + "401": "NetworkTokensV2ControllerGetTokens401", + "404": "NetworkTokensV2ControllerGetTokens404", + "408": "NetworkTokensV2ControllerGetTokens408", + "409": "NetworkTokensV2ControllerGetTokens409", + "410": "NetworkTokensV2ControllerGetTokens410", + "412": "NetworkTokensV2ControllerGetTokens412", + "429": "NetworkTokensV2ControllerGetTokens429", + "500": "NetworkTokensV2ControllerGetTokens500", + "502": "NetworkTokensV2ControllerGetTokens502", + "503": "NetworkTokensV2ControllerGetTokens503", + }) + ) + ) ), TokenControllerGetTokens: (options) => - HttpClientRequest.get(`/v1/tokens`).pipe( + HttpClientRequest.get("/v1/tokens").pipe( HttpClientRequest.setUrlParams({ yieldTypes: options?.params?.["yieldTypes"] as any, exit: options?.params?.["exit"] as any, @@ -8406,7 +10982,7 @@ export const make = ( }) ), TokenControllerGetTokenPrices: (options) => - HttpClientRequest.post(`/v1/tokens/prices`).pipe( + HttpClientRequest.post("/v1/tokens/prices").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, }), @@ -8426,7 +11002,7 @@ export const make = ( }) ), TokenControllerGetTokenBalances: (options) => - HttpClientRequest.post(`/v1/tokens/balances`).pipe( + HttpClientRequest.post("/v1/tokens/balances").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, }), @@ -8446,7 +11022,7 @@ export const make = ( }) ), TokenControllerTokenBalancesScan: (options) => - HttpClientRequest.post(`/v1/tokens/balances/scan`).pipe( + HttpClientRequest.post("/v1/tokens/balances/scan").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, }), @@ -8466,230 +11042,489 @@ export const make = ( }) ), CustomUrisControllerGet: (teamId, projectId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/customUris` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/customUris" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), CustomUrisControllerCreate: (teamId, projectId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/customUris` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/customUris" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), CustomUrisControllerDelete: (teamId, projectId, customUriId, options) => - HttpClientRequest.delete( - `/v1/teams/${teamId}/projects/${projectId}/customUris/${customUriId}` - ).pipe(onRequest(options?.config)([])), + __makePathRequest( + HttpClientRequest.delete, + [teamId, projectId, customUriId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/customUris/" + + __encodePathParam(customUriId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) + ), CustomUrisControllerUpdate: (teamId, projectId, customUriId, options) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/customUris/${customUriId}` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, customUriId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/customUris/" + + __encodePathParam(customUriId) + + "" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), EnabledYieldControllerGetByProject: (teamId, projectId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/yields/enabled` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/yields/enabled" ).pipe( - HttpClientRequest.setUrlParams({ - limit: options?.params?.["limit"] as any, - page: options?.params?.["page"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + limit: options?.params?.["limit"] as any, + page: options?.params?.["page"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), EnabledYieldControllerCreate: (teamId, projectId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/yields/enabled` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/yields/enabled" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), EnabledYieldControllerDeleteMany: (teamId, projectId, options) => - HttpClientRequest.delete( - `/v1/teams/${teamId}/projects/${projectId}/yields/enabled` + __makePathRequest( + HttpClientRequest.delete, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/yields/enabled" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)([]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) ), EnabledYieldControllerDelete: (teamId, projectId, integrationId, options) => - HttpClientRequest.delete( - `/v1/teams/${teamId}/projects/${projectId}/yields/enabled/${integrationId}` - ).pipe(onRequest(options?.config)([])), + __makePathRequest( + HttpClientRequest.delete, + [teamId, projectId, integrationId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/yields/enabled/" + + __encodePathParam(integrationId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) + ), ProgrammaticEnabledYieldControllerGetByProject: (projectId, options) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/yields/enabled` + __makePathRequest( + HttpClientRequest.get, + [projectId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/yields/enabled" ).pipe( - HttpClientRequest.setUrlParams({ - limit: options?.params?.["limit"] as any, - page: options?.params?.["page"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options?.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + limit: options?.params?.["limit"] as any, + page: options?.params?.["page"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options?.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), ProgrammaticEnabledYieldControllerCreate: (projectId, options) => - HttpClientRequest.post( - `/v1/programmatic/projects/${projectId}/yields/enabled` + __makePathRequest( + HttpClientRequest.post, + [projectId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/yields/enabled" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticEnabledYieldControllerDeleteMany: (projectId, options) => - HttpClientRequest.delete( - `/v1/programmatic/projects/${projectId}/yields/enabled` + __makePathRequest( + HttpClientRequest.delete, + [projectId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/yields/enabled" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)([]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) ), ProgrammaticEnabledYieldControllerDelete: ( projectId, integrationId, options ) => - HttpClientRequest.delete( - `/v1/programmatic/projects/${projectId}/yields/enabled/${integrationId}` + __makePathRequest( + HttpClientRequest.delete, + [projectId, integrationId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/yields/enabled/" + + __encodePathParam(integrationId) + + "" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options?.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options?.config)([]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options?.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) ), OAVControllerFindAllTokens: (teamId, projectId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/oav/tokens` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/oav/tokens" ).pipe( - onRequest(options?.config)(["2xx"], { - "400": "OAVControllerFindAllTokens400", - "401": "OAVControllerFindAllTokens401", - "404": "OAVControllerFindAllTokens404", - "408": "OAVControllerFindAllTokens408", - "409": "OAVControllerFindAllTokens409", - "410": "OAVControllerFindAllTokens410", - "412": "OAVControllerFindAllTokens412", - "429": "OAVControllerFindAllTokens429", - "500": "OAVControllerFindAllTokens500", - "502": "OAVControllerFindAllTokens502", - "503": "OAVControllerFindAllTokens503", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], { + "400": "OAVControllerFindAllTokens400", + "401": "OAVControllerFindAllTokens401", + "404": "OAVControllerFindAllTokens404", + "408": "OAVControllerFindAllTokens408", + "409": "OAVControllerFindAllTokens409", + "410": "OAVControllerFindAllTokens410", + "412": "OAVControllerFindAllTokens412", + "429": "OAVControllerFindAllTokens429", + "500": "OAVControllerFindAllTokens500", + "502": "OAVControllerFindAllTokens502", + "503": "OAVControllerFindAllTokens503", + }) + ) + ) ), OAVControllerFindYieldsByToken: (teamId, projectId, network, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/oav/yields/${network}` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, network], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/oav/yields/" + + __encodePathParam(network) + + "" ).pipe( - HttpClientRequest.setUrlParams({ - address: options?.params?.["address"] as any, - }), - onRequest(options?.config)(["2xx"], { - "400": "OAVControllerFindYieldsByToken400", - "401": "OAVControllerFindYieldsByToken401", - "408": "OAVControllerFindYieldsByToken408", - "409": "OAVControllerFindYieldsByToken409", - "410": "OAVControllerFindYieldsByToken410", - "412": "OAVControllerFindYieldsByToken412", - "429": "OAVControllerFindYieldsByToken429", - "500": "OAVControllerFindYieldsByToken500", - "502": "OAVControllerFindYieldsByToken502", - "503": "OAVControllerFindYieldsByToken503", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + address: options?.params?.["address"] as any, + }), + onRequest(options?.config)( + ["2xx"], + { + "400": "OAVControllerFindYieldsByToken400", + "401": "OAVControllerFindYieldsByToken401", + "408": "OAVControllerFindYieldsByToken408", + "409": "OAVControllerFindYieldsByToken409", + "410": "OAVControllerFindYieldsByToken410", + "412": "OAVControllerFindYieldsByToken412", + "429": "OAVControllerFindYieldsByToken429", + "500": "OAVControllerFindYieldsByToken500", + "502": "OAVControllerFindYieldsByToken502", + "503": "OAVControllerFindYieldsByToken503", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), OAVControllerFindAll: (teamId, projectId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/oav` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/oav" ).pipe( - HttpClientRequest.setUrlParams({ - active: options?.params?.["active"] as any, - }), - onRequest(options?.config)(["2xx"], { - "400": "OAVControllerFindAll400", - "401": "OAVControllerFindAll401", - "404": "OAVControllerFindAll404", - "408": "OAVControllerFindAll408", - "409": "OAVControllerFindAll409", - "410": "OAVControllerFindAll410", - "412": "OAVControllerFindAll412", - "429": "OAVControllerFindAll429", - "500": "OAVControllerFindAll500", - "502": "OAVControllerFindAll502", - "503": "OAVControllerFindAll503", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + active: options?.params?.["active"] as any, + }), + onRequest(options?.config)(["2xx"], { + "400": "OAVControllerFindAll400", + "401": "OAVControllerFindAll401", + "404": "OAVControllerFindAll404", + "408": "OAVControllerFindAll408", + "409": "OAVControllerFindAll409", + "410": "OAVControllerFindAll410", + "412": "OAVControllerFindAll412", + "429": "OAVControllerFindAll429", + "500": "OAVControllerFindAll500", + "502": "OAVControllerFindAll502", + "503": "OAVControllerFindAll503", + }) + ) + ) ), OAVControllerCreate: (teamId, projectId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/oav` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/oav" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "401": "OAVControllerCreate401", - "404": "OAVControllerCreate404", - "408": "OAVControllerCreate408", - "409": "OAVControllerCreate409", - "410": "OAVControllerCreate410", - "412": "OAVControllerCreate412", - "429": "OAVControllerCreate429", - "500": "OAVControllerCreate500", - "502": "OAVControllerCreate502", - "503": "OAVControllerCreate503", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)( + ["2xx"], + { + "401": "OAVControllerCreate401", + "404": "OAVControllerCreate404", + "408": "OAVControllerCreate408", + "409": "OAVControllerCreate409", + "410": "OAVControllerCreate410", + "412": "OAVControllerCreate412", + "429": "OAVControllerCreate429", + "500": "OAVControllerCreate500", + "502": "OAVControllerCreate502", + "503": "OAVControllerCreate503", + }, + { binary: [], voidSuccess: [], voidError: ["400"] } + ) + ) + ) ), OAVControllerRemove: (teamId, projectId, id, options) => - HttpClientRequest.delete( - `/v1/teams/${teamId}/projects/${projectId}/oav/${id}` - ).pipe( - onRequest(options?.config)([], { - "400": "OAVControllerRemove400", - "401": "OAVControllerRemove401", - "408": "OAVControllerRemove408", - "409": "OAVControllerRemove409", - "410": "OAVControllerRemove410", - "412": "OAVControllerRemove412", - "429": "OAVControllerRemove429", - "500": "OAVControllerRemove500", - "502": "OAVControllerRemove502", - "503": "OAVControllerRemove503", - }) + __makePathRequest( + HttpClientRequest.delete, + [teamId, projectId, id], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/oav/" + + __encodePathParam(id) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + [], + { + "400": "OAVControllerRemove400", + "401": "OAVControllerRemove401", + "408": "OAVControllerRemove408", + "409": "OAVControllerRemove409", + "410": "OAVControllerRemove410", + "412": "OAVControllerRemove412", + "429": "OAVControllerRemove429", + "500": "OAVControllerRemove500", + "502": "OAVControllerRemove502", + "503": "OAVControllerRemove503", + }, + { binary: [], voidSuccess: ["204"], voidError: ["404"] } + ) + ) + ) ), OAVControllerUpdate: (teamId, projectId, id, options) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/oav/${id}` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, id], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/oav/" + + __encodePathParam(id) + + "" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "401": "OAVControllerUpdate401", - "408": "OAVControllerUpdate408", - "409": "OAVControllerUpdate409", - "410": "OAVControllerUpdate410", - "412": "OAVControllerUpdate412", - "429": "OAVControllerUpdate429", - "500": "OAVControllerUpdate500", - "502": "OAVControllerUpdate502", - "503": "OAVControllerUpdate503", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)( + ["2xx"], + { + "401": "OAVControllerUpdate401", + "408": "OAVControllerUpdate408", + "409": "OAVControllerUpdate409", + "410": "OAVControllerUpdate410", + "412": "OAVControllerUpdate412", + "429": "OAVControllerUpdate429", + "500": "OAVControllerUpdate500", + "502": "OAVControllerUpdate502", + "503": "OAVControllerUpdate503", + }, + { binary: [], voidSuccess: [], voidError: ["400", "404"] } + ) + ) + ) ), NetworkAddressesPositionsV2ControllerGetPositions: ( network, address, options ) => - HttpClientRequest.get( - `/v2/networks/${network}/addresses/${address}/positions` + __makePathRequest( + HttpClientRequest.get, + [network, address], + () => + "/v2/networks/" + + __encodePathParam(network) + + "/addresses/" + + __encodePathParam(address) + + "/positions" ).pipe( - HttpClientRequest.setUrlParams({ - currency: options.params["currency"] as any, - }), - HttpClientRequest.setHeaders({ - "X-API-KEY": options.params["X-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + currency: options.params["currency"] as any, + }), + HttpClientRequest.setHeaders({ + "X-API-KEY": options.params["X-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"]) + ) + ) ), YieldControllerYields: (options) => - HttpClientRequest.get(`/v1/yields`).pipe( + HttpClientRequest.get("/v1/yields").pipe( HttpClientRequest.setUrlParams({ preferredValidatorsOnly: options?.params?.[ "preferredValidatorsOnly" @@ -8723,7 +11558,7 @@ export const make = ( }) ), YieldControllerGetMultipleYieldBalances: (options) => - HttpClientRequest.post(`/v1/yields/balances`).pipe( + HttpClientRequest.post("/v1/yields/balances").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, }), @@ -8743,7 +11578,7 @@ export const make = ( }) ), YieldControllerYieldBalancesScan: (options) => - HttpClientRequest.post(`/v1/yields/balances/scan`).pipe( + HttpClientRequest.post("/v1/yields/balances/scan").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, }), @@ -8763,7 +11598,7 @@ export const make = ( }) ), YieldControllerYieldBalancesScanEvm: (options) => - HttpClientRequest.post(`/v1/yields/balances/scan/evm`).pipe( + HttpClientRequest.post("/v1/yields/balances/scan/evm").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, }), @@ -8783,7 +11618,7 @@ export const make = ( }) ), YieldControllerGetMyYields: (options) => - HttpClientRequest.get(`/v1/yields/enabled`).pipe( + HttpClientRequest.get("/v1/yields/enabled").pipe( HttpClientRequest.setUrlParams({ preferredValidatorsOnly: options?.params?.[ "preferredValidatorsOnly" @@ -8815,7 +11650,7 @@ export const make = ( }) ), YieldControllerGetMyNetworks: (options) => - HttpClientRequest.get(`/v1/yields/enabled/networks`).pipe( + HttpClientRequest.get("/v1/yields/enabled/networks").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, }), @@ -8834,7 +11669,7 @@ export const make = ( }) ), YieldControllerFindValidators: (options) => - HttpClientRequest.get(`/v1/yields/validators`).pipe( + HttpClientRequest.get("/v1/yields/validators").pipe( HttpClientRequest.setUrlParams({ ledgerWalletAPICompatible: options?.params?.[ "ledgerWalletAPICompatible" @@ -8860,175 +11695,237 @@ export const make = ( }) ), YieldControllerYieldOpportunity: (integrationId, options) => - HttpClientRequest.get(`/v1/yields/${integrationId}`).pipe( - HttpClientRequest.setUrlParams({ - preferredValidatorsOnly: options?.params?.[ - "preferredValidatorsOnly" - ] as any, - ledgerWalletAPICompatible: options?.params?.[ - "ledgerWalletAPICompatible" - ] as any, - }), - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "400": "YieldControllerYieldOpportunity400", - "401": "YieldControllerYieldOpportunity401", - "404": "YieldControllerYieldOpportunity404", - "408": "YieldControllerYieldOpportunity408", - "409": "YieldControllerYieldOpportunity409", - "410": "YieldControllerYieldOpportunity410", - "412": "YieldControllerYieldOpportunity412", - "429": "YieldControllerYieldOpportunity429", - "500": "YieldControllerYieldOpportunity500", - "502": "YieldControllerYieldOpportunity502", - "503": "YieldControllerYieldOpportunity503", - }) + __makePathRequest( + HttpClientRequest.get, + [integrationId], + () => "/v1/yields/" + __encodePathParam(integrationId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + preferredValidatorsOnly: options?.params?.[ + "preferredValidatorsOnly" + ] as any, + ledgerWalletAPICompatible: options?.params?.[ + "ledgerWalletAPICompatible" + ] as any, + }), + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "400": "YieldControllerYieldOpportunity400", + "401": "YieldControllerYieldOpportunity401", + "404": "YieldControllerYieldOpportunity404", + "408": "YieldControllerYieldOpportunity408", + "409": "YieldControllerYieldOpportunity409", + "410": "YieldControllerYieldOpportunity410", + "412": "YieldControllerYieldOpportunity412", + "429": "YieldControllerYieldOpportunity429", + "500": "YieldControllerYieldOpportunity500", + "502": "YieldControllerYieldOpportunity502", + "503": "YieldControllerYieldOpportunity503", + }) + ) + ) ), YieldControllerGetValidators: (integrationId, options) => - HttpClientRequest.get(`/v1/yields/${integrationId}/validators`).pipe( - HttpClientRequest.setUrlParams({ - preferredValidatorsOnly: options?.params?.[ - "preferredValidatorsOnly" - ] as any, - ledgerWalletAPICompatible: options?.params?.[ - "ledgerWalletAPICompatible" - ] as any, - }), - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "400": "YieldControllerGetValidators400", - "401": "YieldControllerGetValidators401", - "404": "YieldControllerGetValidators404", - "408": "YieldControllerGetValidators408", - "409": "YieldControllerGetValidators409", - "410": "YieldControllerGetValidators410", - "412": "YieldControllerGetValidators412", - "429": "YieldControllerGetValidators429", - "500": "YieldControllerGetValidators500", - "502": "YieldControllerGetValidators502", - "503": "YieldControllerGetValidators503", - }) + __makePathRequest( + HttpClientRequest.get, + [integrationId], + () => "/v1/yields/" + __encodePathParam(integrationId) + "/validators" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + preferredValidatorsOnly: options?.params?.[ + "preferredValidatorsOnly" + ] as any, + ledgerWalletAPICompatible: options?.params?.[ + "ledgerWalletAPICompatible" + ] as any, + }), + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "400": "YieldControllerGetValidators400", + "401": "YieldControllerGetValidators401", + "404": "YieldControllerGetValidators404", + "408": "YieldControllerGetValidators408", + "409": "YieldControllerGetValidators409", + "410": "YieldControllerGetValidators410", + "412": "YieldControllerGetValidators412", + "429": "YieldControllerGetValidators429", + "500": "YieldControllerGetValidators500", + "502": "YieldControllerGetValidators502", + "503": "YieldControllerGetValidators503", + }) + ) + ) ), YieldControllerGetSingleYieldBalances: (integrationId, options) => - HttpClientRequest.post(`/v1/yields/${integrationId}/balances`).pipe( - HttpClientRequest.setUrlParams({ - ledgerWalletAPICompatible: options.params?.[ - "ledgerWalletAPICompatible" - ] as any, - }), - HttpClientRequest.setHeaders({ - "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "YieldControllerGetSingleYieldBalances400", - "401": "YieldControllerGetSingleYieldBalances401", - "404": "YieldControllerGetSingleYieldBalances404", - "408": "YieldControllerGetSingleYieldBalances408", - "409": "YieldControllerGetSingleYieldBalances409", - "410": "YieldControllerGetSingleYieldBalances410", - "412": "YieldControllerGetSingleYieldBalances412", - "429": "YieldControllerGetSingleYieldBalances429", - "500": "YieldControllerGetSingleYieldBalances500", - "502": "YieldControllerGetSingleYieldBalances502", - "503": "YieldControllerGetSingleYieldBalances503", - }) + __makePathRequest( + HttpClientRequest.post, + [integrationId], + () => "/v1/yields/" + __encodePathParam(integrationId) + "/balances" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + ledgerWalletAPICompatible: options.params?.[ + "ledgerWalletAPICompatible" + ] as any, + }), + HttpClientRequest.setHeaders({ + "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], { + "400": "YieldControllerGetSingleYieldBalances400", + "401": "YieldControllerGetSingleYieldBalances401", + "404": "YieldControllerGetSingleYieldBalances404", + "408": "YieldControllerGetSingleYieldBalances408", + "409": "YieldControllerGetSingleYieldBalances409", + "410": "YieldControllerGetSingleYieldBalances410", + "412": "YieldControllerGetSingleYieldBalances412", + "429": "YieldControllerGetSingleYieldBalances429", + "500": "YieldControllerGetSingleYieldBalances500", + "502": "YieldControllerGetSingleYieldBalances502", + "503": "YieldControllerGetSingleYieldBalances503", + }) + ) + ) ), YieldControllerGetBalanceTransferEvents: (integrationId, options) => - HttpClientRequest.get( - `/v1/yields/${integrationId}/balances/transfers` + __makePathRequest( + HttpClientRequest.get, + [integrationId], + () => + "/v1/yields/" + + __encodePathParam(integrationId) + + "/balances/transfers" ).pipe( - HttpClientRequest.setUrlParams({ - address: options.params["address"] as any, - sort: options.params["sort"] as any, - limit: options.params["limit"] as any, - offset: options.params["offset"] as any, - feeConfigurationId: options.params["feeConfigurationId"] as any, - }), - HttpClientRequest.setHeaders({ - "X-API-KEY": options.params["X-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"], { - "400": "YieldControllerGetBalanceTransferEvents400", - "401": "YieldControllerGetBalanceTransferEvents401", - "404": "YieldControllerGetBalanceTransferEvents404", - "408": "YieldControllerGetBalanceTransferEvents408", - "409": "YieldControllerGetBalanceTransferEvents409", - "410": "YieldControllerGetBalanceTransferEvents410", - "412": "YieldControllerGetBalanceTransferEvents412", - "429": "YieldControllerGetBalanceTransferEvents429", - "500": "YieldControllerGetBalanceTransferEvents500", - "502": "YieldControllerGetBalanceTransferEvents502", - "503": "YieldControllerGetBalanceTransferEvents503", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + address: options.params["address"] as any, + sort: options.params["sort"] as any, + limit: options.params["limit"] as any, + offset: options.params["offset"] as any, + feeConfigurationId: options.params["feeConfigurationId"] as any, + }), + HttpClientRequest.setHeaders({ + "X-API-KEY": options.params["X-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"], { + "400": "YieldControllerGetBalanceTransferEvents400", + "401": "YieldControllerGetBalanceTransferEvents401", + "404": "YieldControllerGetBalanceTransferEvents404", + "408": "YieldControllerGetBalanceTransferEvents408", + "409": "YieldControllerGetBalanceTransferEvents409", + "410": "YieldControllerGetBalanceTransferEvents410", + "412": "YieldControllerGetBalanceTransferEvents412", + "429": "YieldControllerGetBalanceTransferEvents429", + "500": "YieldControllerGetBalanceTransferEvents500", + "502": "YieldControllerGetBalanceTransferEvents502", + "503": "YieldControllerGetBalanceTransferEvents503", + }) + ) + ) ), YieldControllerGetSingleYieldRewardsSummary: (integrationId, options) => - HttpClientRequest.post( - `/v1/yields/${integrationId}/rewards-summary` + __makePathRequest( + HttpClientRequest.post, + [integrationId], + () => + "/v1/yields/" + __encodePathParam(integrationId) + "/rewards-summary" ).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "YieldControllerGetSingleYieldRewardsSummary400", - "401": "YieldControllerGetSingleYieldRewardsSummary401", - "404": "YieldControllerGetSingleYieldRewardsSummary404", - "408": "YieldControllerGetSingleYieldRewardsSummary408", - "409": "YieldControllerGetSingleYieldRewardsSummary409", - "410": "YieldControllerGetSingleYieldRewardsSummary410", - "412": "YieldControllerGetSingleYieldRewardsSummary412", - "429": "YieldControllerGetSingleYieldRewardsSummary429", - "500": "YieldControllerGetSingleYieldRewardsSummary500", - "502": "YieldControllerGetSingleYieldRewardsSummary502", - "503": "YieldControllerGetSingleYieldRewardsSummary503", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options.params?.["X-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], { + "400": "YieldControllerGetSingleYieldRewardsSummary400", + "401": "YieldControllerGetSingleYieldRewardsSummary401", + "404": "YieldControllerGetSingleYieldRewardsSummary404", + "408": "YieldControllerGetSingleYieldRewardsSummary408", + "409": "YieldControllerGetSingleYieldRewardsSummary409", + "410": "YieldControllerGetSingleYieldRewardsSummary410", + "412": "YieldControllerGetSingleYieldRewardsSummary412", + "429": "YieldControllerGetSingleYieldRewardsSummary429", + "500": "YieldControllerGetSingleYieldRewardsSummary500", + "502": "YieldControllerGetSingleYieldRewardsSummary502", + "503": "YieldControllerGetSingleYieldRewardsSummary503", + }) + ) + ) ), YieldControllerGetFeeConfiguration: (integrationId, options) => - HttpClientRequest.get( - `/v1/yields/${integrationId}/fee-configuration` + __makePathRequest( + HttpClientRequest.get, + [integrationId], + () => + "/v1/yields/" + + __encodePathParam(integrationId) + + "/fee-configuration" ).pipe( - onRequest(options?.config)(["2xx"], { - "400": "YieldControllerGetFeeConfiguration400", - "401": "YieldControllerGetFeeConfiguration401", - "408": "YieldControllerGetFeeConfiguration408", - "409": "YieldControllerGetFeeConfiguration409", - "410": "YieldControllerGetFeeConfiguration410", - "412": "YieldControllerGetFeeConfiguration412", - "429": "YieldControllerGetFeeConfiguration429", - "500": "YieldControllerGetFeeConfiguration500", - "502": "YieldControllerGetFeeConfiguration502", - "503": "YieldControllerGetFeeConfiguration503", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "400": "YieldControllerGetFeeConfiguration400", + "401": "YieldControllerGetFeeConfiguration401", + "408": "YieldControllerGetFeeConfiguration408", + "409": "YieldControllerGetFeeConfiguration409", + "410": "YieldControllerGetFeeConfiguration410", + "412": "YieldControllerGetFeeConfiguration412", + "429": "YieldControllerGetFeeConfiguration429", + "500": "YieldControllerGetFeeConfiguration500", + "502": "YieldControllerGetFeeConfiguration502", + "503": "YieldControllerGetFeeConfiguration503", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), YieldControllerCreateFeeConfiguration: (integrationId, options) => - HttpClientRequest.post( - `/v1/yields/${integrationId}/fee-configuration` + __makePathRequest( + HttpClientRequest.post, + [integrationId], + () => + "/v1/yields/" + + __encodePathParam(integrationId) + + "/fee-configuration" ).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options.params["X-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "YieldControllerCreateFeeConfiguration400", - "401": "YieldControllerCreateFeeConfiguration401", - "404": "YieldControllerCreateFeeConfiguration404", - "408": "YieldControllerCreateFeeConfiguration408", - "409": "YieldControllerCreateFeeConfiguration409", - "410": "YieldControllerCreateFeeConfiguration410", - "412": "YieldControllerCreateFeeConfiguration412", - "429": "YieldControllerCreateFeeConfiguration429", - "500": "YieldControllerCreateFeeConfiguration500", - "502": "YieldControllerCreateFeeConfiguration502", - "503": "YieldControllerCreateFeeConfiguration503", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options.params["X-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], { + "400": "YieldControllerCreateFeeConfiguration400", + "401": "YieldControllerCreateFeeConfiguration401", + "404": "YieldControllerCreateFeeConfiguration404", + "408": "YieldControllerCreateFeeConfiguration408", + "409": "YieldControllerCreateFeeConfiguration409", + "410": "YieldControllerCreateFeeConfiguration410", + "412": "YieldControllerCreateFeeConfiguration412", + "429": "YieldControllerCreateFeeConfiguration429", + "500": "YieldControllerCreateFeeConfiguration500", + "502": "YieldControllerCreateFeeConfiguration502", + "503": "YieldControllerCreateFeeConfiguration503", + }) + ) + ) ), YieldV2ControllerYields: (options) => - HttpClientRequest.get(`/v2/yields`).pipe( + HttpClientRequest.get("/v2/yields").pipe( HttpClientRequest.setUrlParams({ providerId: options?.params?.["providerId"] as any, inputToken: options?.params?.["inputToken"] as any, @@ -9064,52 +11961,68 @@ export const make = ( }) ), YieldV2ControllerGetYieldById: (yieldId, options) => - HttpClientRequest.get(`/v2/yields/${yieldId}`).pipe( - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "400": "YieldV2ControllerGetYieldById400", - "401": "YieldV2ControllerGetYieldById401", - "404": "YieldV2ControllerGetYieldById404", - "408": "YieldV2ControllerGetYieldById408", - "409": "YieldV2ControllerGetYieldById409", - "410": "YieldV2ControllerGetYieldById410", - "412": "YieldV2ControllerGetYieldById412", - "429": "YieldV2ControllerGetYieldById429", - "500": "YieldV2ControllerGetYieldById500", - "502": "YieldV2ControllerGetYieldById502", - "503": "YieldV2ControllerGetYieldById503", - }) + __makePathRequest( + HttpClientRequest.get, + [yieldId], + () => "/v2/yields/" + __encodePathParam(yieldId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "400": "YieldV2ControllerGetYieldById400", + "401": "YieldV2ControllerGetYieldById401", + "404": "YieldV2ControllerGetYieldById404", + "408": "YieldV2ControllerGetYieldById408", + "409": "YieldV2ControllerGetYieldById409", + "410": "YieldV2ControllerGetYieldById410", + "412": "YieldV2ControllerGetYieldById412", + "429": "YieldV2ControllerGetYieldById429", + "500": "YieldV2ControllerGetYieldById500", + "502": "YieldV2ControllerGetYieldById502", + "503": "YieldV2ControllerGetYieldById503", + }) + ) + ) ), YieldV2ControllerFindYieldValidators: (yieldId, options) => - HttpClientRequest.get(`/v2/yields/${yieldId}/validators`).pipe( - HttpClientRequest.setUrlParams({ - ledgerWalletAPICompatible: options?.params?.[ - "ledgerWalletAPICompatible" - ] as any, - network: options?.params?.["network"] as any, - query: options?.params?.["query"] as any, - }), - HttpClientRequest.setHeaders({ - "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"], { - "400": "YieldV2ControllerFindYieldValidators400", - "401": "YieldV2ControllerFindYieldValidators401", - "404": "YieldV2ControllerFindYieldValidators404", - "408": "YieldV2ControllerFindYieldValidators408", - "409": "YieldV2ControllerFindYieldValidators409", - "410": "YieldV2ControllerFindYieldValidators410", - "412": "YieldV2ControllerFindYieldValidators412", - "429": "YieldV2ControllerFindYieldValidators429", - "500": "YieldV2ControllerFindYieldValidators500", - "502": "YieldV2ControllerFindYieldValidators502", - "503": "YieldV2ControllerFindYieldValidators503", - }) + __makePathRequest( + HttpClientRequest.get, + [yieldId], + () => "/v2/yields/" + __encodePathParam(yieldId) + "/validators" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + ledgerWalletAPICompatible: options?.params?.[ + "ledgerWalletAPICompatible" + ] as any, + network: options?.params?.["network"] as any, + query: options?.params?.["query"] as any, + }), + HttpClientRequest.setHeaders({ + "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"], { + "400": "YieldV2ControllerFindYieldValidators400", + "401": "YieldV2ControllerFindYieldValidators401", + "404": "YieldV2ControllerFindYieldValidators404", + "408": "YieldV2ControllerFindYieldValidators408", + "409": "YieldV2ControllerFindYieldValidators409", + "410": "YieldV2ControllerFindYieldValidators410", + "412": "YieldV2ControllerFindYieldValidators412", + "429": "YieldV2ControllerFindYieldValidators429", + "500": "YieldV2ControllerFindYieldValidators500", + "502": "YieldV2ControllerFindYieldValidators502", + "503": "YieldV2ControllerFindYieldValidators503", + }) + ) + ) ), YieldV2ControllerFindValidators: (options) => - HttpClientRequest.get(`/v2/yields/validators`).pipe( + HttpClientRequest.get("/v2/yields/validators").pipe( HttpClientRequest.setUrlParams({ preferredValidatorsOnly: options?.params?.[ "preferredValidatorsOnly" @@ -9138,43 +12051,64 @@ export const make = ( }) ), YieldV2ControllerGetFeeConfigurations: (integrationId, options) => - HttpClientRequest.get( - `/v2/yields/${integrationId}/fee-configurations` + __makePathRequest( + HttpClientRequest.get, + [integrationId], + () => + "/v2/yields/" + + __encodePathParam(integrationId) + + "/fee-configurations" ).pipe( - HttpClientRequest.setUrlParams({ - page: options?.params?.["page"] as any, - limit: options?.params?.["limit"] as any, - }), - onRequest(options?.config)(["2xx"], { - "400": "YieldV2ControllerGetFeeConfigurations400", - "401": "YieldV2ControllerGetFeeConfigurations401", - "408": "YieldV2ControllerGetFeeConfigurations408", - "409": "YieldV2ControllerGetFeeConfigurations409", - "410": "YieldV2ControllerGetFeeConfigurations410", - "412": "YieldV2ControllerGetFeeConfigurations412", - "429": "YieldV2ControllerGetFeeConfigurations429", - "500": "YieldV2ControllerGetFeeConfigurations500", - "502": "YieldV2ControllerGetFeeConfigurations502", - "503": "YieldV2ControllerGetFeeConfigurations503", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + page: options?.params?.["page"] as any, + limit: options?.params?.["limit"] as any, + }), + onRequest(options?.config)( + ["2xx"], + { + "400": "YieldV2ControllerGetFeeConfigurations400", + "401": "YieldV2ControllerGetFeeConfigurations401", + "408": "YieldV2ControllerGetFeeConfigurations408", + "409": "YieldV2ControllerGetFeeConfigurations409", + "410": "YieldV2ControllerGetFeeConfigurations410", + "412": "YieldV2ControllerGetFeeConfigurations412", + "429": "YieldV2ControllerGetFeeConfigurations429", + "500": "YieldV2ControllerGetFeeConfigurations500", + "502": "YieldV2ControllerGetFeeConfigurations502", + "503": "YieldV2ControllerGetFeeConfigurations503", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), EarnControllerGetStakes: (network, options) => - HttpClientRequest.get(`/v1/earn/${network}/stakes`).pipe( - HttpClientRequest.setUrlParams({ - stake_addresses: options.params["stake_addresses"] as any, - }), - HttpClientRequest.setHeaders({ - "X-API-KEY": options.params["X-API-KEY"] ?? undefined, - }), - onRequest(options.config)(["2xx"], { - "400": "EarnControllerGetStakes400", - "401": "EarnControllerGetStakes401", - "404": "EarnControllerGetStakes404", - "500": "EarnControllerGetStakes500", - }) + __makePathRequest( + HttpClientRequest.get, + [network], + () => "/v1/earn/" + __encodePathParam(network) + "/stakes" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + stake_addresses: options.params["stake_addresses"] as any, + }), + HttpClientRequest.setHeaders({ + "X-API-KEY": options.params["X-API-KEY"] ?? undefined, + }), + onRequest(options.config)(["2xx"], { + "400": "EarnControllerGetStakes400", + "401": "EarnControllerGetStakes401", + "404": "EarnControllerGetStakes404", + "500": "EarnControllerGetStakes500", + }) + ) + ) ), EarnControllerGetGrow: (options) => - HttpClientRequest.get(`/v1/earn/grow`).pipe( + HttpClientRequest.get("/v1/earn/grow").pipe( HttpClientRequest.setHeaders({ "X-API-KEY": options?.params?.["X-API-KEY"] ?? undefined, }), @@ -9185,22 +12119,44 @@ export const make = ( }) ), FeeConfigurationControllerGet: (teamId, projectId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/fee-configuration` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/fee-configuration" ).pipe( - HttpClientRequest.setUrlParams({ - sort: options?.params?.["sort"] as any, - limit: options?.params?.["limit"] as any, - page: options?.params?.["page"] as any, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + sort: options?.params?.["sort"] as any, + limit: options?.params?.["limit"] as any, + page: options?.params?.["page"] as any, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), FeeConfigurationControllerCreate: (teamId, projectId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/fee-configuration` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/fee-configuration" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), FeeConfigurationControllerDelete: ( teamId, @@ -9208,73 +12164,161 @@ export const make = ( feeConfigurationId, options ) => - HttpClientRequest.delete( - `/v1/teams/${teamId}/projects/${projectId}/fee-configuration/${feeConfigurationId}` - ).pipe(onRequest(options?.config)([])), + __makePathRequest( + HttpClientRequest.delete, + [teamId, projectId, feeConfigurationId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/fee-configuration/" + + __encodePathParam(feeConfigurationId) + + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) + ), FeeConfigurationControllerUpdate: ( teamId, projectId, feeConfigurationId, options ) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/fee-configuration/${feeConfigurationId}` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, feeConfigurationId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/fee-configuration/" + + __encodePathParam(feeConfigurationId) + + "" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)([]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) ), ProgrammaticFeeConfigurationControllerGet: (projectId, options) => - HttpClientRequest.get( - `/v1/programmatic/projects/${projectId}/fee-configuration` + __makePathRequest( + HttpClientRequest.get, + [projectId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/fee-configuration" ).pipe( - HttpClientRequest.setUrlParams({ - limit: options?.params?.["limit"] as any, - page: options?.params?.["page"] as any, - }), - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options?.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options?.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + limit: options?.params?.["limit"] as any, + page: options?.params?.["page"] as any, + }), + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options?.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options?.config)(["2xx"]) + ) + ) ), ProgrammaticFeeConfigurationControllerCreate: (projectId, options) => - HttpClientRequest.post( - `/v1/programmatic/projects/${projectId}/fee-configuration` + __makePathRequest( + HttpClientRequest.post, + [projectId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/fee-configuration" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), ProgrammaticFeeConfigurationControllerDelete: ( projectId, feeConfigurationId, options ) => - HttpClientRequest.delete( - `/v1/programmatic/projects/${projectId}/fee-configuration/${feeConfigurationId}` + __makePathRequest( + HttpClientRequest.delete, + [projectId, feeConfigurationId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/fee-configuration/" + + __encodePathParam(feeConfigurationId) + + "" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options?.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - onRequest(options?.config)([]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options?.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) ), ProgrammaticFeeConfigurationControllerUpdate: ( projectId, feeConfigurationId, options ) => - HttpClientRequest.patch( - `/v1/programmatic/projects/${projectId}/fee-configuration/${feeConfigurationId}` + __makePathRequest( + HttpClientRequest.patch, + [projectId, feeConfigurationId], + () => + "/v1/programmatic/projects/" + + __encodePathParam(projectId) + + "/fee-configuration/" + + __encodePathParam(feeConfigurationId) + + "" ).pipe( - HttpClientRequest.setHeaders({ - "X-ADMIN-API-KEY": options.params?.["X-ADMIN-API-KEY"] ?? undefined, - }), - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)([]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setHeaders({ + "X-ADMIN-API-KEY": + options.params?.["X-ADMIN-API-KEY"] ?? undefined, + }), + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) ), FeeConfigurationAdminControllerList: (options) => - HttpClientRequest.get(`/v1/admin/fee-configuration`).pipe( + HttpClientRequest.get("/v1/admin/fee-configuration").pipe( HttpClientRequest.setUrlParams({ teamId: options?.params?.["teamId"] as any, projectId: options?.params?.["projectId"] as any, @@ -9286,7 +12330,7 @@ export const make = ( onRequest(options?.config)(["2xx"]) ), RiskParametersControllerFindMany: (options) => - HttpClientRequest.get(`/v1/risk-parameters`).pipe( + HttpClientRequest.get("/v1/risk-parameters").pipe( HttpClientRequest.setUrlParams({ limit: options?.params?.["limit"] as any, page: options?.params?.["page"] as any, @@ -9301,144 +12345,301 @@ export const make = ( onRequest(options?.config)(["2xx"]) ), RiskParametersControllerCreate: (options) => - HttpClientRequest.post(`/v1/risk-parameters`).pipe( + HttpClientRequest.post("/v1/risk-parameters").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), RiskParametersControllerFindOne: (riskParameterId, options) => - HttpClientRequest.get(`/v1/risk-parameters/${riskParameterId}`).pipe( - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [riskParameterId], + () => "/v1/risk-parameters/" + __encodePathParam(riskParameterId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), RiskParametersControllerDelete: (riskParameterId, options) => - HttpClientRequest.delete(`/v1/risk-parameters/${riskParameterId}`).pipe( - onRequest(options?.config)([]) + __makePathRequest( + HttpClientRequest.delete, + [riskParameterId], + () => "/v1/risk-parameters/" + __encodePathParam(riskParameterId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["204"], + voidError: [], + }) + ) + ) ), RiskParametersControllerUpdate: (riskParameterId, options) => - HttpClientRequest.patch(`/v1/risk-parameters/${riskParameterId}`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.patch, + [riskParameterId], + () => "/v1/risk-parameters/" + __encodePathParam(riskParameterId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), ShieldRegistryControllerGetRegistry: (options) => - HttpClientRequest.get(`/v1/shield/registry`).pipe( - onRequest(options?.config)([]) + HttpClientRequest.get("/v1/shield/registry").pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) ), SsoControllerInitiate: (options) => - HttpClientRequest.post(`/v1/auth/sso/initiate`).pipe( + HttpClientRequest.post("/v1/auth/sso/initiate").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), SsoControllerOidcCallback: (options) => - HttpClientRequest.get(`/v1/auth/sso/callback/oidc`).pipe( + HttpClientRequest.get("/v1/auth/sso/callback/oidc").pipe( HttpClientRequest.setUrlParams({ code: options.params["code"] as any, state: options.params["state"] as any, }), - onRequest(options.config)([]) + onRequest(options.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) ), SsoConfigControllerGet: (teamId, options) => - HttpClientRequest.get(`/v1/teams/${teamId}/sso`).pipe( - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/sso" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), SsoConfigControllerUpsert: (teamId, options) => - HttpClientRequest.put(`/v1/teams/${teamId}/sso`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.put, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/sso" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), SsoConfigControllerDelete: (teamId, options) => - HttpClientRequest.delete(`/v1/teams/${teamId}/sso`).pipe( - onRequest(options?.config)([]) + __makePathRequest( + HttpClientRequest.delete, + [teamId], + () => "/v1/teams/" + __encodePathParam(teamId) + "/sso" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), MfaControllerSetup: (options) => - HttpClientRequest.post(`/v1/auth/mfa/setup`).pipe( + HttpClientRequest.post("/v1/auth/mfa/setup").pipe( onRequest(options?.config)(["2xx"]) ), MfaControllerVerifySetup: (options) => - HttpClientRequest.post(`/v1/auth/mfa/verify-setup`).pipe( + HttpClientRequest.post("/v1/auth/mfa/verify-setup").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), MfaControllerBeginReenrollment: (options) => - HttpClientRequest.post(`/v1/auth/mfa/begin-reenrollment`).pipe( + HttpClientRequest.post("/v1/auth/mfa/begin-reenrollment").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)([]) + onRequest(options.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: ["400", "401", "403", "429"], + }) ), MfaControllerGetStatus: (options) => - HttpClientRequest.get(`/v1/auth/mfa/status`).pipe( + HttpClientRequest.get("/v1/auth/mfa/status").pipe( onRequest(options?.config)(["2xx"]) ), MfaControllerVerify: (options) => - HttpClientRequest.post(`/v1/auth/mfa/verify`).pipe( + HttpClientRequest.post("/v1/auth/mfa/verify").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), MfaControllerRecover: (options) => - HttpClientRequest.post(`/v1/auth/mfa/recover`).pipe( + HttpClientRequest.post("/v1/auth/mfa/recover").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), MfaControllerDisable: (options) => - HttpClientRequest.post(`/v1/auth/mfa/disable`).pipe( + HttpClientRequest.post("/v1/auth/mfa/disable").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)([]) + onRequest(options.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) ), MfaControllerWebauthnRegisterOptions: (options) => - HttpClientRequest.post(`/v1/auth/mfa/webauthn/register/options`).pipe( + HttpClientRequest.post("/v1/auth/mfa/webauthn/register/options").pipe( onRequest(options?.config)(["2xx"]) ), MfaControllerWebauthnRegisterVerify: (options) => - HttpClientRequest.post(`/v1/auth/mfa/webauthn/register/verify`).pipe( + HttpClientRequest.post("/v1/auth/mfa/webauthn/register/verify").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), MfaControllerWebauthnAuthenticationOptions: (options) => HttpClientRequest.post( - `/v1/auth/mfa/webauthn/authentication-options` + "/v1/auth/mfa/webauthn/authentication-options" ).pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), MfaControllerWebauthnAuthenticationVerify: (options) => HttpClientRequest.post( - `/v1/auth/mfa/webauthn/authentication-verify` + "/v1/auth/mfa/webauthn/authentication-verify" ).pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), MfaControllerWebauthnReauthenticationOptions: (options) => HttpClientRequest.post( - `/v1/auth/mfa/webauthn/reauthentication-options` + "/v1/auth/mfa/webauthn/reauthentication-options" ).pipe(onRequest(options?.config)(["2xx"])), MfaControllerDeleteWebauthnCredential: (credentialId, options) => - HttpClientRequest.delete( - `/v1/auth/mfa/webauthn/credentials/${credentialId}` + __makePathRequest( + HttpClientRequest.delete, + [credentialId], + () => + "/v1/auth/mfa/webauthn/credentials/" + + __encodePathParam(credentialId) + + "" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)([]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)([], undefined, { + binary: [], + voidSuccess: ["200"], + voidError: [], + }) + ) + ) ), PerpsFeeConfigurationControllerGet: (teamId, projectId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/perps-fee-configuration` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/perps-fee-configuration" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) + ), PerpsFeeConfigurationControllerCreate: (teamId, projectId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/perps-fee-configuration` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/perps-fee-configuration" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), PerpsFeeConfigurationControllerDelete: (teamId, projectId, options) => - HttpClientRequest.delete( - `/v1/teams/${teamId}/projects/${projectId}/perps-fee-configuration` - ).pipe(onRequest(options?.config)([])), + __makePathRequest( + HttpClientRequest.delete, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/perps-fee-configuration" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) + ), PerpsFeeConfigurationControllerUpdate: (teamId, projectId, options) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/perps-fee-configuration` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/perps-fee-configuration" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), ValidatorControllerFindAllProviders: (options) => - HttpClientRequest.get(`/v1/validator/providers`).pipe( + HttpClientRequest.get("/v1/validator/providers").pipe( HttpClientRequest.setUrlParams({ limit: options?.params?.["limit"] as any, page: options?.params?.["page"] as any, @@ -9447,25 +12648,61 @@ export const make = ( onRequest(options?.config)(["2xx"]) ), ValidatorControllerCreateProvider: (options) => - HttpClientRequest.post(`/v1/validator/providers`).pipe( + HttpClientRequest.post("/v1/validator/providers").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), ValidatorControllerFindOneProvider: (id, options) => - HttpClientRequest.get(`/v1/validator/providers/${id}`).pipe( - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [id], + () => "/v1/validator/providers/" + __encodePathParam(id) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), ValidatorControllerUpdateProvider: (id, options) => - HttpClientRequest.put(`/v1/validator/providers/${id}`).pipe( - HttpClientRequest.bodyFormDataRecord(options.payload as any), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.put, + [id], + () => "/v1/validator/providers/" + __encodePathParam(id) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyFormDataRecord(options.payload as any), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["400", "404"], + }) + ) + ) ), ValidatorControllerRemoveProvider: (id, options) => - HttpClientRequest.delete(`/v1/validator/providers/${id}`).pipe( - onRequest(options?.config)([]) + __makePathRequest( + HttpClientRequest.delete, + [id], + () => "/v1/validator/providers/" + __encodePathParam(id) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["204"], + voidError: ["404"], + }) + ) + ) ), ValidatorControllerGetAllHistoricalRevshareChanges: (options) => - HttpClientRequest.get(`/v1/validator/historical-revshare-changes`).pipe( + HttpClientRequest.get("/v1/validator/historical-revshare-changes").pipe( HttpClientRequest.setUrlParams({ validatorId: options.params["validatorId"] as any, limit: options.params["limit"] as any, @@ -9474,14 +12711,27 @@ export const make = ( onRequest(options.config)(["2xx"]) ), ValidatorControllerUpdateHistoricalRevshareChange: (id, options) => - HttpClientRequest.put( - `/v1/validator/historical-revshare-changes/${id}` + __makePathRequest( + HttpClientRequest.put, + [id], + () => + "/v1/validator/historical-revshare-changes/" + + __encodePathParam(id) + + "" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), ValidatorControllerFindAll: (options) => - HttpClientRequest.get(`/v1/validator`).pipe( + HttpClientRequest.get("/v1/validator").pipe( HttpClientRequest.setUrlParams({ integrationId: options?.params?.["integrationId"] as any, providerId: options?.params?.["providerId"] as any, @@ -9493,72 +12743,167 @@ export const make = ( onRequest(options?.config)(["2xx"]) ), ValidatorControllerCreate: (options) => - HttpClientRequest.post(`/v1/validator`).pipe( + HttpClientRequest.post("/v1/validator").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), ValidatorControllerFindOne: (id, options) => - HttpClientRequest.get(`/v1/validator/${id}`).pipe( - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [id], + () => "/v1/validator/" + __encodePathParam(id) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), ValidatorControllerUpdate: (id, options) => - HttpClientRequest.put(`/v1/validator/${id}`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.put, + [id], + () => "/v1/validator/" + __encodePathParam(id) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], undefined, { + binary: [], + voidSuccess: [], + voidError: ["404"], + }) + ) + ) ), ValidatorControllerRemove: (id, options) => - HttpClientRequest.delete(`/v1/validator/${id}`).pipe( - onRequest(options?.config)([]) + __makePathRequest( + HttpClientRequest.delete, + [id], + () => "/v1/validator/" + __encodePathParam(id) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["204"], + voidError: ["404"], + }) + ) + ) ), AdminApiKeysControllerFindAll: (options) => - HttpClientRequest.get(`/v1/programmatic-api-keys`).pipe( + HttpClientRequest.get("/v1/programmatic-api-keys").pipe( onRequest(options?.config)(["2xx"]) ), AdminApiKeysControllerCreate: (options) => - HttpClientRequest.post(`/v1/programmatic-api-keys`).pipe( + HttpClientRequest.post("/v1/programmatic-api-keys").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"]) ), AdminApiKeysControllerFindOne: (id, options) => - HttpClientRequest.get(`/v1/programmatic-api-keys/${id}`).pipe( - onRequest(options?.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.get, + [id], + () => "/v1/programmatic-api-keys/" + __encodePathParam(id) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) ), AdminApiKeysControllerRemove: (id, options) => - HttpClientRequest.delete(`/v1/programmatic-api-keys/${id}`).pipe( - onRequest(options?.config)([]) + __makePathRequest( + HttpClientRequest.delete, + [id], + () => "/v1/programmatic-api-keys/" + __encodePathParam(id) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)([])) + ) ), AdminApiKeysControllerUpdate: (id, options) => - HttpClientRequest.patch(`/v1/programmatic-api-keys/${id}`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.patch, + [id], + () => "/v1/programmatic-api-keys/" + __encodePathParam(id) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), WebhooksControllerGetEndpoints: (teamId, projectId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/endpoints` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/endpoints" ).pipe( - onRequest(options?.config)(["2xx"], { - "400": "WebhooksControllerGetEndpoints400", - "500": "WebhooksControllerGetEndpoints500", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], { + "400": "WebhooksControllerGetEndpoints400", + "500": "WebhooksControllerGetEndpoints500", + }) + ) + ) ), WebhooksControllerCreateEndpoint: (teamId, projectId, options) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/endpoints` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/endpoints" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "WebhooksControllerCreateEndpoint400", - "500": "WebhooksControllerCreateEndpoint500", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"], { + "400": "WebhooksControllerCreateEndpoint400", + "500": "WebhooksControllerCreateEndpoint500", + }) + ) + ) ), WebhooksControllerGetEndpoint: (teamId, projectId, endpointId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/endpoints/${endpointId}` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, endpointId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/endpoints/" + + __encodePathParam(endpointId) + + "" ).pipe( - onRequest(options?.config)(["2xx"], { - "400": "WebhooksControllerGetEndpoint400", - "500": "WebhooksControllerGetEndpoint500", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "400": "WebhooksControllerGetEndpoint400", + "500": "WebhooksControllerGetEndpoint500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), WebhooksControllerDeleteEndpoint: ( teamId, @@ -9566,12 +12911,27 @@ export const make = ( endpointId, options ) => - HttpClientRequest.delete( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/endpoints/${endpointId}` + __makePathRequest( + HttpClientRequest.delete, + [teamId, projectId, endpointId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/endpoints/" + + __encodePathParam(endpointId) + + "" ).pipe( - onRequest(options?.config)([], { - "500": "WebhooksControllerDeleteEndpoint500", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + [], + { "500": "WebhooksControllerDeleteEndpoint500" }, + { binary: [], voidSuccess: ["204"], voidError: ["400", "404"] } + ) + ) + ) ), WebhooksControllerUpdateEndpoint: ( teamId, @@ -9579,14 +12939,31 @@ export const make = ( endpointId, options ) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/endpoints/${endpointId}` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, endpointId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/endpoints/" + + __encodePathParam(endpointId) + + "" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "WebhooksControllerUpdateEndpoint400", - "500": "WebhooksControllerUpdateEndpoint500", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)( + ["2xx"], + { + "400": "WebhooksControllerUpdateEndpoint400", + "500": "WebhooksControllerUpdateEndpoint500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), WebhooksControllerSetEndpointEnabled: ( teamId, @@ -9594,14 +12971,31 @@ export const make = ( endpointId, options ) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/endpoints/${endpointId}/enabled` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, endpointId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/endpoints/" + + __encodePathParam(endpointId) + + "/enabled" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "WebhooksControllerSetEndpointEnabled400", - "500": "WebhooksControllerSetEndpointEnabled500", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)( + ["2xx"], + { + "400": "WebhooksControllerSetEndpointEnabled400", + "500": "WebhooksControllerSetEndpointEnabled500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), WebhooksControllerGetSubscriptions: ( teamId, @@ -9609,13 +13003,30 @@ export const make = ( endpointId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/endpoints/${endpointId}/subscriptions` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, endpointId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/endpoints/" + + __encodePathParam(endpointId) + + "/subscriptions" ).pipe( - onRequest(options?.config)(["2xx"], { - "400": "WebhooksControllerGetSubscriptions400", - "500": "WebhooksControllerGetSubscriptions500", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "400": "WebhooksControllerGetSubscriptions400", + "500": "WebhooksControllerGetSubscriptions500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), WebhooksControllerCreateSubscription: ( teamId, @@ -9623,14 +13034,31 @@ export const make = ( endpointId, options ) => - HttpClientRequest.post( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/endpoints/${endpointId}/subscriptions` + __makePathRequest( + HttpClientRequest.post, + [teamId, projectId, endpointId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/endpoints/" + + __encodePathParam(endpointId) + + "/subscriptions" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "WebhooksControllerCreateSubscription400", - "500": "WebhooksControllerCreateSubscription500", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)( + ["2xx"], + { + "400": "WebhooksControllerCreateSubscription400", + "500": "WebhooksControllerCreateSubscription500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), WebhooksControllerGetSubscription: ( teamId, @@ -9638,13 +13066,30 @@ export const make = ( subscriptionId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/subscriptions/${subscriptionId}` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, subscriptionId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/subscriptions/" + + __encodePathParam(subscriptionId) + + "" ).pipe( - onRequest(options?.config)(["2xx"], { - "400": "WebhooksControllerGetSubscription400", - "500": "WebhooksControllerGetSubscription500", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "400": "WebhooksControllerGetSubscription400", + "500": "WebhooksControllerGetSubscription500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), WebhooksControllerDeleteSubscription: ( teamId, @@ -9652,13 +13097,30 @@ export const make = ( subscriptionId, options ) => - HttpClientRequest.delete( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/subscriptions/${subscriptionId}` + __makePathRequest( + HttpClientRequest.delete, + [teamId, projectId, subscriptionId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/subscriptions/" + + __encodePathParam(subscriptionId) + + "" ).pipe( - onRequest(options?.config)([], { - "400": "WebhooksControllerDeleteSubscription400", - "500": "WebhooksControllerDeleteSubscription500", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + [], + { + "400": "WebhooksControllerDeleteSubscription400", + "500": "WebhooksControllerDeleteSubscription500", + }, + { binary: [], voidSuccess: ["204"], voidError: ["404"] } + ) + ) + ) ), WebhooksControllerUpdateSubscription: ( teamId, @@ -9666,14 +13128,31 @@ export const make = ( subscriptionId, options ) => - HttpClientRequest.patch( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/subscriptions/${subscriptionId}` + __makePathRequest( + HttpClientRequest.patch, + [teamId, projectId, subscriptionId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/subscriptions/" + + __encodePathParam(subscriptionId) + + "" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "WebhooksControllerUpdateSubscription400", - "500": "WebhooksControllerUpdateSubscription500", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)( + ["2xx"], + { + "400": "WebhooksControllerUpdateSubscription400", + "500": "WebhooksControllerUpdateSubscription500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), WebhooksControllerGetEndpointDeliveries: ( teamId, @@ -9681,59 +13160,146 @@ export const make = ( endpointId, options ) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/endpoints/${endpointId}/deliveries` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, endpointId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/endpoints/" + + __encodePathParam(endpointId) + + "/deliveries" ).pipe( - onRequest(options?.config)(["2xx"], { - "400": "WebhooksControllerGetEndpointDeliveries400", - "500": "WebhooksControllerGetEndpointDeliveries500", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], { + "400": "WebhooksControllerGetEndpointDeliveries400", + "500": "WebhooksControllerGetEndpointDeliveries500", + }) + ) + ) ), WebhooksControllerGetDelivery: (teamId, projectId, deliveryId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/deliveries/${deliveryId}` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, deliveryId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/deliveries/" + + __encodePathParam(deliveryId) + + "" ).pipe( - onRequest(options?.config)(["2xx"], { - "400": "WebhooksControllerGetDelivery400", - "500": "WebhooksControllerGetDelivery500", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], { + "400": "WebhooksControllerGetDelivery400", + "500": "WebhooksControllerGetDelivery500", + }) + ) + ) ), WebhooksControllerGetEvent: (teamId, projectId, eventId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/webhooks/events/${eventId}` + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId, eventId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/webhooks/events/" + + __encodePathParam(eventId) + + "" ).pipe( - onRequest(options?.config)(["2xx"], { - "400": "WebhooksControllerGetEvent400", - "500": "WebhooksControllerGetEvent500", - }) + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "400": "WebhooksControllerGetEvent400", + "500": "WebhooksControllerGetEvent500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), TradeProviderConfigurationControllerList: (teamId, projectId, options) => - HttpClientRequest.get( - `/v1/teams/${teamId}/projects/${projectId}/trade/providers` - ).pipe(onRequest(options?.config)(["2xx"])), + __makePathRequest( + HttpClientRequest.get, + [teamId, projectId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/trade/providers" + ).pipe( + Effect.flatMap((request) => + request.pipe(onRequest(options?.config)(["2xx"])) + ) + ), TradeProviderConfigurationControllerUpdate: ( teamId, projectId, providerId, options ) => - HttpClientRequest.put( - `/v1/teams/${teamId}/projects/${projectId}/trade/providers/${providerId}` + __makePathRequest( + HttpClientRequest.put, + [teamId, projectId, providerId], + () => + "/v1/teams/" + + __encodePathParam(teamId) + + "/projects/" + + __encodePathParam(projectId) + + "/trade/providers/" + + __encodePathParam(providerId) + + "" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), YieldStatusControllerUpsert: (integrationId, options) => - HttpClientRequest.put(`/v1/yield-status/${integrationId}`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + __makePathRequest( + HttpClientRequest.put, + [integrationId], + () => "/v1/yield-status/" + __encodePathParam(integrationId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), YieldStatusControllerRemove: (integrationId, options) => - HttpClientRequest.delete(`/v1/yield-status/${integrationId}`).pipe( - onRequest(options?.config)([]) + __makePathRequest( + HttpClientRequest.delete, + [integrationId], + () => "/v1/yield-status/" + __encodePathParam(integrationId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["204"], + voidError: [], + }) + ) + ) ), YieldStatusControllerFindAll: (options) => - HttpClientRequest.get(`/v1/yield-status`).pipe( + HttpClientRequest.get("/v1/yield-status").pipe( HttpClientRequest.setUrlParams({ offset: options?.params?.["offset"] as any, limit: options?.params?.["limit"] as any, @@ -9741,22 +13307,46 @@ export const make = ( onRequest(options?.config)(["2xx"]) ), PerpsOverridesControllerList: (options) => - HttpClientRequest.get(`/v1/admin/perps/providers/overrides`).pipe( + HttpClientRequest.get("/v1/admin/perps/providers/overrides").pipe( onRequest(options?.config)(["2xx"]) ), PerpsOverridesControllerSet: (providerId, options) => - HttpClientRequest.put( - `/v1/admin/perps/providers/${providerId}/override` + __makePathRequest( + HttpClientRequest.put, + [providerId], + () => + "/v1/admin/perps/providers/" + + __encodePathParam(providerId) + + "/override" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"]) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)(["2xx"]) + ) + ) ), PerpsOverridesControllerClear: (providerId, options) => - HttpClientRequest.delete( - `/v1/admin/perps/providers/${providerId}/override` - ).pipe(onRequest(options?.config)([])), + __makePathRequest( + HttpClientRequest.delete, + [providerId], + () => + "/v1/admin/perps/providers/" + + __encodePathParam(providerId) + + "/override" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)([], undefined, { + binary: [], + voidSuccess: ["204"], + voidError: [], + }) + ) + ) + ), NetworksV2ControllerGetNetworks: (options) => - HttpClientRequest.get(`/v2/networks`).pipe( + HttpClientRequest.get("/v2/networks").pipe( HttpClientRequest.setUrlParams({ limit: options?.params?.["limit"] as any, page: options?.params?.["page"] as any, @@ -9842,7 +13432,7 @@ export interface LegacyApi { } ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"403", undefined> >; readonly CampaignControllerGetById: ( teamId: string, @@ -9863,7 +13453,7 @@ export interface LegacyApi { } ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"403", undefined> >; readonly CampaignControllerPause: ( teamId: string, @@ -9905,7 +13495,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"403", undefined> >; readonly CampaignControllerGetSummary: ( teamId: string, @@ -10357,7 +13947,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * List campaigns for a project @@ -10698,7 +14288,7 @@ export interface LegacyApi { } ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"403", undefined> >; readonly CampaignLifecycleControllerGetById: ( teamId: string, @@ -10719,7 +14309,7 @@ export interface LegacyApi { } ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"403", undefined> >; readonly CampaignV2ReadsControllerGetMilestones: < Config extends OperationConfig, @@ -10747,7 +14337,7 @@ export interface LegacyApi { CampaignLifecycleControllerReplaceMilestones200, Config >, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"412", undefined> >; readonly CampaignLifecycleControllerPause: ( teamId: string, @@ -10766,7 +14356,10 @@ export interface LegacyApi { teamId: string, projectId: string, campaignId: string, - options: { readonly config?: Config | undefined } | undefined + options: { + readonly payload: CampaignLifecycleControllerResumeRequestJson; + readonly config?: Config | undefined; + } ) => Effect.Effect< WithOptionalResponse, | HttpClientError.HttpClientError @@ -10800,7 +14393,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"403", undefined> >; readonly CampaignV2ReadsControllerGetSummary: < Config extends OperationConfig, @@ -11081,6 +14674,64 @@ export interface LegacyApi { >, HttpClientError.HttpClientError >; + /** + * List simulation runs, newest first (SuperAdmin). + */ + readonly CampaignV2SimulationAdminControllerList: < + Config extends OperationConfig, + >( + options: + | { + readonly params?: + | CampaignV2SimulationAdminControllerListParams + | undefined; + readonly config?: Config | undefined; + } + | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; + /** + * Clone a real campaign as an isSimulation copy and queue a simulation run (SuperAdmin, staging only). The cron runner drives it; results land in the real campaign_v2 tables under the clone. + */ + readonly CampaignV2SimulationAdminControllerCreate: < + Config extends OperationConfig, + >(options: { + readonly payload: CampaignV2SimulationAdminControllerCreateRequestJson; + readonly config?: Config | undefined; + }) => Effect.Effect< + WithOptionalResponse, + | HttpClientError.HttpClientError + | LegacyApiError<"404", undefined> + | LegacyApiError<"412", undefined> + >; + /** + * Get a simulation run with its result summary (SuperAdmin). + */ + readonly CampaignV2SimulationAdminControllerGetById: < + Config extends OperationConfig, + >( + simulationRunId: string, + options: { readonly config?: Config | undefined } | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> + >; + /** + * Delete a simulation run, its campaign clone and all child rows (SuperAdmin). + */ + readonly CampaignV2SimulationAdminControllerDelete: < + Config extends OperationConfig, + >( + simulationRunId: string, + options: { readonly config?: Config | undefined } | undefined + ) => Effect.Effect< + WithOptionalResponse, + | HttpClientError.HttpClientError + | LegacyApiError<"404", undefined> + | LegacyApiError<"409", undefined> + >; /** * List all campaigns across all projects (SuperAdmin). */ @@ -11103,7 +14754,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Internal points/virtual-accounting metrics for a campaign (SuperAdmin). Points are internal and re-priced at payout. @@ -11122,7 +14773,7 @@ export interface LegacyApi { | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Add budget to a campaign (SuperAdmin). With milestone gating, the amount lands in a new unlocked tranche unless targetMilestoneOrder is supplied. @@ -11137,7 +14788,9 @@ export interface LegacyApi { } ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + | HttpClientError.HttpClientError + | LegacyApiError<"404", undefined> + | LegacyApiError<"412", undefined> >; /** * Unlock a milestone tranche without its TW-TVL and TVL-years conditions being met (SuperAdmin). Only the lowest-order locked tranche is eligible. @@ -11153,7 +14806,10 @@ export interface LegacyApi { } ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + | HttpClientError.HttpClientError + | LegacyApiError<"404", undefined> + | LegacyApiError<"409", undefined> + | LegacyApiError<"412", undefined> >; /** * List campaigns for a project @@ -11485,7 +15141,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; readonly TeamsControllerSoftDelete: ( teamId: string, @@ -11504,6 +15160,16 @@ export interface LegacyApi { WithOptionalResponse, HttpClientError.HttpClientError >; + readonly ProgrammaticTeamsControllerCreate: < + Config extends OperationConfig, + >(options: { + readonly params?: ProgrammaticTeamsControllerCreateParams | undefined; + readonly payload: ProgrammaticTeamsControllerCreateRequestJson; + readonly config?: Config | undefined; + }) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; readonly ProjectsControllerGet: ( teamId: string, options: { readonly config?: Config | undefined } | undefined @@ -11761,6 +15427,25 @@ export interface LegacyApi { WithOptionalResponse, HttpClientError.HttpClientError >; + /** + * Creates a pending payout request for a completed claimable calendar month on one project. Locks claimable legacy revenue via a project-scoped high-water-mark snapshot. Requires addressesConfirmed=true and a payout destination per claimable network (from project Settings and/or payoutAddresses in the body). Enforces the minimum claimable USD threshold. + */ + readonly PayoutRequestsControllerRequestPayout: < + Config extends OperationConfig, + >( + teamId: string, + projectId: string, + options: { + readonly payload: PayoutRequestsControllerRequestPayoutRequestJson; + readonly config?: Config | undefined; + } + ) => Effect.Effect< + WithOptionalResponse, + | HttpClientError.HttpClientError + | LegacyApiError<"400", undefined> + | LegacyApiError<"409", undefined> + | LegacyApiError<"412", undefined> + >; readonly NetworkAddressReferralControllerGetByAddress: < Config extends OperationConfig, >( @@ -11779,7 +15464,7 @@ export interface LegacyApi { NetworkAddressReferralControllerGetByAddress200, Config >, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; readonly NetworkAddressReferralControllerCreate: < Config extends OperationConfig, @@ -11796,7 +15481,7 @@ export interface LegacyApi { | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; readonly ReferralControllerGetByCode: ( code: string, @@ -11808,7 +15493,7 @@ export interface LegacyApi { | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Aggregate revenue, per-integration breakdown, and top integrations for the selected period. Supports monthly or explicit date-range filtering. @@ -11845,7 +15530,7 @@ export interface LegacyApi { | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"400", undefined> >; /** * Returns 12 monthly data points ordered oldest to newest, each containing TVL, revenue, and active-user counts. Null values indicate missing pipeline data for that month. @@ -11862,6 +15547,69 @@ export interface LegacyApi { WithOptionalResponse, HttpClientError.HttpClientError >; + /** + * Monthly reports for the team, sorted by month descending. Team users see published reports only; super admins also see drafts. + */ + readonly MonthlyReportControllerList: ( + teamId: string, + options: { readonly config?: Config | undefined } | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; + /** + * Super admin only. Freezes the per-integration revenue breakdown for the month into a snapshot and stores it as a draft for review. Re-drafting a month overwrites the snapshot and reverts a published report to draft. + */ + readonly MonthlyReportControllerCreateDraft: ( + teamId: string, + options: { + readonly payload: MonthlyReportControllerCreateDraftRequestJson; + readonly config?: Config | undefined; + } + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError | LegacyApiError<"412", undefined> + >; + /** + * Full integration breakdown, TVL snapshot, and fee data for the month, plus a CSV download URL. Drafts are visible to super admins only. + */ + readonly MonthlyReportControllerGetDetail: ( + teamId: string, + reportId: string, + options: { readonly config?: Config | undefined } | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> + >; + /** + * Super admin only. Transitions a draft report to published so the team can see it. Idempotent for already-published reports. + */ + readonly MonthlyReportControllerPublish: ( + teamId: string, + reportId: string, + options: { readonly config?: Config | undefined } | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> + >; + /** + * Streams the per-integration breakdown for the report as a CSV file. Drafts are downloadable by super admins only. + */ + readonly MonthlyReportControllerDownload: ( + teamId: string, + reportId: string, + options: { readonly config?: Config | undefined } | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; + /** + * Streams the per-integration breakdown for the report as a CSV file. Drafts are downloadable by super admins only. + */ + readonly MonthlyReportControllerDownloadStream: ( + teamId: string, + reportId: string + ) => Stream.Stream; readonly ReportEntryControllerList: ( teamId: string, options: @@ -12010,6 +15758,24 @@ export interface LegacyApi { >, HttpClientError.HttpClientError >; + /** + * Retrieve a paginated chronological feed of perp actions and timeline events for a project owned by the authenticated team. Omitting address returns all project activity in the selected timestamp range. Optional filters: provider, address, market, action status, and action type. + */ + readonly ProgrammaticReportingControllerGetPerpActivity: < + Config extends OperationConfig, + >( + projectId: string, + options: { + readonly params: ProgrammaticReportingControllerGetPerpActivityParams; + readonly config?: Config | undefined; + } + ) => Effect.Effect< + WithOptionalResponse< + ProgrammaticReportingControllerGetPerpActivity200, + Config + >, + HttpClientError.HttpClientError + >; readonly UsersMeControllerFindMe: ( options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< @@ -12078,6 +15844,14 @@ export interface LegacyApi { WithOptionalResponse, HttpClientError.HttpClientError >; + readonly UsersControllerResendInvitation: ( + teamId: string, + id: string, + options: { readonly config?: Config | undefined } | undefined + ) => Effect.Effect< + WithOptionalResponse, + HttpClientError.HttpClientError + >; /** * Returns a action with associated transactions */ @@ -12380,7 +16154,7 @@ export interface LegacyApi { > >; /** - * Returns a paginated list of actions with associated transactions + * Returns a paginated list of actions with associated transactions. STALE actions are excluded unless a status filter is provided */ readonly ActionControllerList: (options: { readonly params: ActionControllerListParams; @@ -13620,6 +17394,7 @@ export interface LegacyApi { "OAVControllerFindYieldsByToken503", OAVControllerFindYieldsByToken503 > + | LegacyApiError<"404", undefined> >; /** * Retrieves all OAVs for a specific project @@ -13671,6 +17446,7 @@ export interface LegacyApi { | LegacyApiError<"OAVControllerCreate500", OAVControllerCreate500> | LegacyApiError<"OAVControllerCreate502", OAVControllerCreate502> | LegacyApiError<"OAVControllerCreate503", OAVControllerCreate503> + | LegacyApiError<"400", undefined> >; /** * Deletes an OAV @@ -13693,6 +17469,7 @@ export interface LegacyApi { | LegacyApiError<"OAVControllerRemove500", OAVControllerRemove500> | LegacyApiError<"OAVControllerRemove502", OAVControllerRemove502> | LegacyApiError<"OAVControllerRemove503", OAVControllerRemove503> + | LegacyApiError<"404", undefined> >; /** * Updates an existing OAV @@ -13717,6 +17494,8 @@ export interface LegacyApi { | LegacyApiError<"OAVControllerUpdate500", OAVControllerUpdate500> | LegacyApiError<"OAVControllerUpdate502", OAVControllerUpdate502> | LegacyApiError<"OAVControllerUpdate503", OAVControllerUpdate503> + | LegacyApiError<"400", undefined> + | LegacyApiError<"404", undefined> >; /** * Scans for positions among enabled yields. @@ -14458,6 +18237,7 @@ export interface LegacyApi { "YieldControllerGetFeeConfiguration503", YieldControllerGetFeeConfiguration503 > + | LegacyApiError<"404", undefined> >; /** * Creates a fee configuration for a yield using a reporting key @@ -14782,6 +18562,7 @@ export interface LegacyApi { "YieldV2ControllerGetFeeConfigurations503", YieldV2ControllerGetFeeConfigurations503 > + | LegacyApiError<"404", undefined> >; /** * Get details about a user's staking position based on the provided network and stake addresses. @@ -15005,7 +18786,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Delete a risk parameter @@ -15028,7 +18809,7 @@ export interface LegacyApi { } ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Get the Shield vault registry @@ -15071,7 +18852,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Create or update SSO configuration for a team @@ -15094,7 +18875,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; readonly MfaControllerSetup: ( options: { readonly config?: Config | undefined } | undefined @@ -15122,7 +18903,11 @@ export interface LegacyApi { readonly config?: Config | undefined; }) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + | HttpClientError.HttpClientError + | LegacyApiError<"400", undefined> + | LegacyApiError<"401", undefined> + | LegacyApiError<"403", undefined> + | LegacyApiError<"429", undefined> >; readonly MfaControllerGetStatus: ( options: { readonly config?: Config | undefined } | undefined @@ -15224,7 +19009,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Creates a new perps fee configuration for perpetuals trading. One per project. @@ -15253,7 +19038,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Updates the perps fee configuration for the project @@ -15269,7 +19054,7 @@ export interface LegacyApi { } ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Get all validator providers @@ -15309,7 +19094,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Update validator provider @@ -15322,7 +19107,9 @@ export interface LegacyApi { } ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + | HttpClientError.HttpClientError + | LegacyApiError<"400", undefined> + | LegacyApiError<"404", undefined> >; /** * Delete validator provider @@ -15332,7 +19119,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Get all historical revshare changes for validator @@ -15365,7 +19152,7 @@ export interface LegacyApi { ValidatorControllerUpdateHistoricalRevshareChange200, Config >, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Get all validators @@ -15401,7 +19188,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Update validator @@ -15414,7 +19201,7 @@ export interface LegacyApi { } ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; /** * Delete validator @@ -15424,7 +19211,7 @@ export interface LegacyApi { options: { readonly config?: Config | undefined } | undefined ) => Effect.Effect< WithOptionalResponse, - HttpClientError.HttpClientError + HttpClientError.HttpClientError | LegacyApiError<"404", undefined> >; readonly AdminApiKeysControllerFindAll: ( options: { readonly config?: Config | undefined } | undefined @@ -15525,6 +19312,7 @@ export interface LegacyApi { "WebhooksControllerGetEndpoint500", WebhooksControllerGetEndpoint500 > + | LegacyApiError<"404", undefined> >; /** * Delete a webhook endpoint. All subscriptions for this endpoint must be deleted first. @@ -15541,6 +19329,8 @@ export interface LegacyApi { "WebhooksControllerDeleteEndpoint500", WebhooksControllerDeleteEndpoint500 > + | LegacyApiError<"400", undefined> + | LegacyApiError<"404", undefined> >; /** * Update an existing webhook endpoint. You can update the URL, secret, description, or enable/disable the endpoint. @@ -15564,6 +19354,7 @@ export interface LegacyApi { "WebhooksControllerUpdateEndpoint500", WebhooksControllerUpdateEndpoint500 > + | LegacyApiError<"404", undefined> >; /** * Toggle whether a webhook endpoint is enabled. When disabled, no webhook deliveries should be attempted for this endpoint. @@ -15589,6 +19380,7 @@ export interface LegacyApi { "WebhooksControllerSetEndpointEnabled500", WebhooksControllerSetEndpointEnabled500 > + | LegacyApiError<"404", undefined> >; /** * Retrieve all subscriptions configured for a specific webhook endpoint. @@ -15609,6 +19401,7 @@ export interface LegacyApi { "WebhooksControllerGetSubscriptions500", WebhooksControllerGetSubscriptions500 > + | LegacyApiError<"404", undefined> >; /** * Create a new webhook subscription. Define which events (resources) and actions you want to receive, optionally with filters. @@ -15634,6 +19427,7 @@ export interface LegacyApi { "WebhooksControllerCreateSubscription500", WebhooksControllerCreateSubscription500 > + | LegacyApiError<"404", undefined> >; /** * Retrieve details of a specific webhook subscription. @@ -15654,6 +19448,7 @@ export interface LegacyApi { "WebhooksControllerGetSubscription500", WebhooksControllerGetSubscription500 > + | LegacyApiError<"404", undefined> >; /** * Delete a webhook subscription. @@ -15676,6 +19471,7 @@ export interface LegacyApi { "WebhooksControllerDeleteSubscription500", WebhooksControllerDeleteSubscription500 > + | LegacyApiError<"404", undefined> >; /** * Update an existing webhook subscription. You can modify events, actions, filters, or enable/disable the subscription. @@ -15701,6 +19497,7 @@ export interface LegacyApi { "WebhooksControllerUpdateSubscription500", WebhooksControllerUpdateSubscription500 > + | LegacyApiError<"404", undefined> >; /** * Retrieve delivery history for a webhook endpoint (success/failed/pending, attempt count, last status). @@ -15763,6 +19560,7 @@ export interface LegacyApi { "WebhooksControllerGetEvent500", WebhooksControllerGetEvent500 > + | LegacyApiError<"404", undefined> >; /** * List trade provider configurations for a project diff --git a/packages/widget/src/generated/api/yield-schema.ts b/packages/widget/src/generated/api/yield-schema.ts index a0e4f1804..175406c4a 100644 --- a/packages/widget/src/generated/api/yield-schema.ts +++ b/packages/widget/src/generated/api/yield-schema.ts @@ -2,902 +2,6 @@ // biome-ignore-all lint: generated by Effect OpenAPI import * as Schema from "effect/Schema"; // non-recursive definitions -export type TokenDto = { - readonly symbol: string; - readonly name: string; - readonly decimals: number; - readonly network: - | "ethereum" - | "ethereum-goerli" - | "ethereum-holesky" - | "ethereum-sepolia" - | "ethereum-hoodi" - | "arbitrum" - | "base" - | "base-sepolia" - | "gnosis" - | "optimism" - | "polygon" - | "polygon-amoy" - | "starknet" - | "zksync" - | "linea" - | "unichain" - | "plume" - | "monad-testnet" - | "monad" - | "robinhood" - | "robinhood-testnet" - | "avalanche-c" - | "avalanche-c-atomic" - | "avalanche-p" - | "binance" - | "celo" - | "fantom" - | "harmony" - | "moonriver" - | "okc" - | "viction" - | "core" - | "sonic" - | "plasma" - | "katana" - | "hyperevm" - | "tempo" - | "pharos" - | "agoric" - | "akash" - | "axelar" - | "band-protocol" - | "bitsong" - | "canto" - | "chihuahua" - | "comdex" - | "coreum" - | "cosmos" - | "crescent" - | "cronos" - | "cudos" - | "desmos" - | "dydx" - | "evmos" - | "fetch-ai" - | "gravity-bridge" - | "injective" - | "irisnet" - | "juno" - | "kava" - | "ki-network" - | "mars-protocol" - | "nym" - | "okex-chain" - | "onomy" - | "osmosis" - | "persistence" - | "quicksilver" - | "regen" - | "secret" - | "sentinel" - | "sommelier" - | "stafi" - | "stargaze" - | "stride" - | "teritori" - | "tgrade" - | "umee" - | "sei" - | "mantra" - | "celestia" - | "saga" - | "zetachain" - | "dymension" - | "humansai" - | "neutron" - | "polkadot" - | "kusama" - | "westend" - | "bittensor" - | "aptos" - | "binancebeacon" - | "cardano" - | "near" - | "solana" - | "solana-devnet" - | "stellar" - | "stellar-testnet" - | "sui" - | "tezos" - | "tron" - | "ton" - | "ton-testnet" - | "hyperliquid"; - readonly address?: string; - readonly logoURI?: string; - readonly isPoints?: boolean; - readonly coinGeckoId?: string; -}; -export const TokenDto = Schema.Struct({ - symbol: Schema.String.annotate({ - description: "Token symbol", - examples: ["ETH"], - }), - name: Schema.String.annotate({ - description: "Token name", - examples: ["Ethereum"], - }), - decimals: Schema.Number.annotate({ - description: "Token decimal places", - examples: [18], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - network: Schema.Literals([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "plume", - "monad-testnet", - "monad", - "robinhood", - "robinhood-testnet", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "tempo", - "pharos", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "aptos", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", - ]).annotate({ description: "Token network", examples: ["Ethereum"] }), - address: Schema.optionalKey( - Schema.String.annotate({ - description: "Token address (if applicable)", - examples: ["0x..."], - }) - ), - logoURI: Schema.optionalKey( - Schema.String.annotate({ - description: "Token logo URI", - examples: ["https://..."], - }) - ), - isPoints: Schema.optionalKey( - Schema.Boolean.annotate({ - description: "Token is points", - examples: [true], - }) - ), - coinGeckoId: Schema.optionalKey( - Schema.String.annotate({ - description: "Token CoinGecko ID", - examples: ["ethereum"], - }) - ), -}).annotate({ identifier: "TokenDto" }); -export type YieldStatisticsDto = { - readonly tvlUsd?: string | null; - readonly tvl?: string | null; - readonly tvlRaw?: string | null; - readonly uniqueUsers?: number | null; - readonly averagePositionSizeUsd?: string | null; - readonly averagePositionSize?: string | null; -}; -export const YieldStatisticsDto = Schema.Struct({ - tvlUsd: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Total value locked in USD for this statistics scope", - examples: ["1,200,000"], - }) - ), - tvl: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Total value locked in primary underlying token for this statistics scope", - examples: ["500.25"], - }) - ), - tvlRaw: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Raw total value locked in smallest token units for this statistics scope", - examples: ["500250000000000000000"], - }) - ), - uniqueUsers: Schema.optionalKey( - Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - Schema.Null, - ]).annotate({ - description: - "Number of wallets with an active position on the underlying vault share token. Null when the yield is not ERC4626, no precomputed data exists, or indexing has not run yet. Partner-specific stats are not included.", - examples: [348], - }) - ), - averagePositionSizeUsd: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Average position size in USD for the underlying vault (TVL USD divided by base-vault unique holders). Not partner-scoped.", - examples: ["3,448.27"], - }) - ), - averagePositionSize: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Average position size in primary underlying token for the underlying vault (TVL divided by base-vault unique holders). Not partner-scoped.", - examples: ["1.44"], - }) - ), -}).annotate({ identifier: "YieldStatisticsDto" }); -export type YieldRiskEntryDto = { - readonly rating: string; - readonly source: "credora" | "stakingRewards"; -}; -export const YieldRiskEntryDto = Schema.Struct({ - rating: Schema.String.annotate({ - description: "Provider top-level rating value", - examples: ["AA"], - }), - source: Schema.Literals(["credora", "stakingRewards"]).annotate({ - description: "Provider source label", - examples: ["credora"], - }), -}).annotate({ identifier: "YieldRiskEntryDto" }); -export type YieldStatusDto = { - readonly enter: boolean; - readonly exit: boolean; -}; -export const YieldStatusDto = Schema.Struct({ - enter: Schema.Boolean.annotate({ - description: "Whether the user can currently enter this yield", - examples: [true], - }), - exit: Schema.Boolean.annotate({ - description: "Whether the user can currently exit this yield", - examples: [true], - }), -}).annotate({ identifier: "YieldStatusDto" }); -export type ERCStandards = "ERC20" | "ERC4626" | "ERC721" | "ERC1155"; -export const ERCStandards = Schema.Literals([ - "ERC20", - "ERC4626", - "ERC721", - "ERC1155", -]).annotate({ - description: "Supported standards for this yield", - identifier: "ERCStandards", -}); -export type YieldType = - | "staking" - | "restaking" - | "lending" - | "vault" - | "fixed_yield" - | "real_world_asset" - | "concentrated_liquidity_pool" - | "liquidity_pool" - | "liquid_staking"; -export const YieldType = Schema.Literals([ - "staking", - "restaking", - "lending", - "vault", - "fixed_yield", - "real_world_asset", - "concentrated_liquidity_pool", - "liquidity_pool", - "liquid_staking", -]).annotate({ - description: "Type of yield mechanism (staking, restaking, LP, vault, etc.)", - identifier: "YieldType", -}); -export type RewardSchedule = - | "block" - | "hour" - | "day" - | "week" - | "month" - | "era" - | "epoch" - | "campaign"; -export const RewardSchedule = Schema.Literals([ - "block", - "hour", - "day", - "week", - "month", - "era", - "epoch", - "campaign", -]).annotate({ - description: - "How often rewards are distributed (e.g. continuously, epoch-based)", - identifier: "RewardSchedule", -}); -export type RewardClaiming = "auto" | "manual"; -export const RewardClaiming = Schema.Literals(["auto", "manual"]).annotate({ - description: "How rewards are claimed: auto, manual, or mixed", - identifier: "RewardClaiming", -}); -export type TimePeriodDto = { readonly seconds: number }; -export const TimePeriodDto = Schema.Struct({ - seconds: Schema.Number.annotate({ - description: "Duration in seconds", - examples: [86400], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), -}).annotate({ identifier: "TimePeriodDto" }); -export type YieldFeeDto = { - readonly deposit?: string; - readonly withdrawal?: string; - readonly management?: string; - readonly performance?: string; -}; -export const YieldFeeDto = Schema.Struct({ - deposit: Schema.optionalKey( - Schema.String.annotate({ - description: "Deposit fee percentage", - examples: ["0.00"], - }) - ), - withdrawal: Schema.optionalKey( - Schema.String.annotate({ - description: "Withdrawal fee percentage", - examples: ["0.00"], - }) - ), - management: Schema.optionalKey( - Schema.String.annotate({ - description: "Management fee percentage (annual)", - examples: ["2.00"], - }) - ), - performance: Schema.optionalKey( - Schema.String.annotate({ - description: "Performance fee percentage", - examples: ["20.00"], - }) - ), -}).annotate({ identifier: "YieldFeeDto" }); -export type YieldEntryLimitsDto = { - readonly minimum: string | null; - readonly maximum: string | null; - readonly subsequentMinimum: string | null; -}; -export const YieldEntryLimitsDto = Schema.Struct({ - minimum: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Minimum amount required to enter this yield in token units (null if no minimum)", - examples: ["0.01"], - }), - maximum: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Maximum amount allowed to enter this yield in token units (null if no limit)", - examples: ["1000.0"], - }), - subsequentMinimum: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Minimum amount for deposits after the user already holds the asset, in token units (null falls back to minimum)", - examples: ["10000"], - }), -}).annotate({ identifier: "YieldEntryLimitsDto" }); -export type InvestorEligibilityEntryDto = { - readonly jurisdiction: string; - readonly tier: - | "us_retail" - | "us_accredited" - | "us_qualified_purchaser" - | "eu_retail" - | "eu_professional" - | "eu_professional_optup" - | "eu_eligible_counterparty" - | "uk_retail" - | "uk_professional" - | "ch_qualified" - | "sg_ai" - | "sg_ii" - | "hk_pi" - | "my_sophisticated" - | "br_qi" - | "br_pi" - | "ae_professional"; - readonly verificationLevel: - | "self_attested" - | "verified_documentation" - | "letter" - | "third_party_attestation"; - readonly expiresAfterDays?: number; -}; -export const InvestorEligibilityEntryDto = Schema.Struct({ - jurisdiction: Schema.String.annotate({ - description: - 'ISO-3166-1 alpha-2 country code, "EEA", "GCC", or "*" for any jurisdiction', - examples: ["US"], - }), - tier: Schema.Literals([ - "us_retail", - "us_accredited", - "us_qualified_purchaser", - "eu_retail", - "eu_professional", - "eu_professional_optup", - "eu_eligible_counterparty", - "uk_retail", - "uk_professional", - "ch_qualified", - "sg_ai", - "sg_ii", - "hk_pi", - "my_sophisticated", - "br_qi", - "br_pi", - "ae_professional", - ]).annotate({ - description: "Investor tier required to participate in this jurisdiction", - examples: ["us_qualified_purchaser"], - }), - verificationLevel: Schema.Literals([ - "self_attested", - "verified_documentation", - "letter", - "third_party_attestation", - ]).annotate({ - description: "How the user's tier must be verified", - examples: ["third_party_attestation"], - }), - expiresAfterDays: Schema.optionalKey( - Schema.Number.annotate({ - description: "Re-verification interval in days, if required", - examples: [90], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })) - ), -}).annotate({ identifier: "InvestorEligibilityEntryDto" }); -export type SelfAttestationDocumentDto = { - readonly name: string; - readonly url: string; -}; -export const SelfAttestationDocumentDto = Schema.Struct({ - name: Schema.String.annotate({ - description: "Human-readable document name", - examples: ["Risk Disclosures"], - }), - url: Schema.String.annotate({ - description: "URL of the document the user must accept (HTTPS)", - }), -}).annotate({ identifier: "SelfAttestationDocumentDto" }); -export type ArgumentFieldDto = { - readonly name: - | "amount" - | "amountRaw" - | "amounts" - | "shareAmount" - | "shareAmountRaw" - | "validatorAddress" - | "validatorAddresses" - | "receiverAddress" - | "providerId" - | "duration" - | "inputToken" - | "inputTokenNetwork" - | "outputToken" - | "outputTokenNetwork" - | "subnetId" - | "tronResource" - | "feeConfigurationId" - | "cosmosPubKey" - | "tezosPubKey" - | "cAddressBech" - | "pAddressBech" - | "executionMode" - | "ledgerWalletApiCompatible" - | "useMaxAmount" - | "useInstantExecution" - | "useAutoClaim" - | "rangeMin" - | "rangeMax" - | "percentage" - | "tokenId" - | "skipPrechecks" - | "useMaxAllowance" - | "feePayerAddress"; - readonly type: "string" | "number" | "address" | "enum" | "boolean"; - readonly label: string; - readonly description?: string; - readonly required?: boolean; - readonly options?: ReadonlyArray; - readonly optionsRef?: string; - readonly default?: {}; - readonly placeholder?: string; - readonly minimum?: string | null; - readonly maximum?: string | null; - readonly isArray?: boolean; -}; -export const ArgumentFieldDto = Schema.Struct({ - name: Schema.Literals([ - "amount", - "amountRaw", - "amounts", - "shareAmount", - "shareAmountRaw", - "validatorAddress", - "validatorAddresses", - "receiverAddress", - "providerId", - "duration", - "inputToken", - "inputTokenNetwork", - "outputToken", - "outputTokenNetwork", - "subnetId", - "tronResource", - "feeConfigurationId", - "cosmosPubKey", - "tezosPubKey", - "cAddressBech", - "pAddressBech", - "executionMode", - "ledgerWalletApiCompatible", - "useMaxAmount", - "useInstantExecution", - "useAutoClaim", - "rangeMin", - "rangeMax", - "percentage", - "tokenId", - "skipPrechecks", - "useMaxAllowance", - "feePayerAddress", - ]).annotate({ description: "Field name", examples: ["amount"] }), - type: Schema.Literals([ - "string", - "number", - "address", - "enum", - "boolean", - ]).annotate({ description: "Field type", examples: ["string"] }), - label: Schema.String.annotate({ - description: "Field label", - examples: ["Amount to Enter"], - }), - description: Schema.optionalKey( - Schema.String.annotate({ description: "Field description" }) - ), - required: Schema.optionalKey( - Schema.Boolean.annotate({ - description: "Whether the field is required", - examples: [true], - }) - ), - options: Schema.optionalKey( - Schema.Array(Schema.String).annotate({ - description: "Options for enum fields", - examples: [["individual", "batched"]], - }) - ), - optionsRef: Schema.optionalKey( - Schema.String.annotate({ - description: - "Reference to API endpoint that provides options dynamically", - examples: ["/api/v1/validators?integrationId=eth-lido"], - }) - ), - default: Schema.optionalKey( - Schema.Struct({}).annotate({ description: "Default value for the field" }) - ), - placeholder: Schema.optionalKey( - Schema.String.annotate({ description: "Placeholder text for the field" }) - ), - minimum: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Minimum allowed value for number fields (null if no minimum)", - examples: ["1.0"], - }) - ), - maximum: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Maximum allowed value for number fields (null if no maximum)", - examples: ["100.0"], - }) - ), - isArray: Schema.optionalKey( - Schema.Boolean.annotate({ - description: "Whether the field is an array", - examples: [false], - }) - ), -}).annotate({ identifier: "ArgumentFieldDto" }); -export type PossibleFeeTakingMechanismsDto = { - readonly depositFee: boolean; - readonly managementFee: boolean; - readonly performanceFee: boolean; - readonly validatorRebates: boolean; -}; -export const PossibleFeeTakingMechanismsDto = Schema.Struct({ - depositFee: Schema.Boolean.annotate({ - description: "User can take (earn) a deposit fee", - examples: [false], - }), - managementFee: Schema.Boolean.annotate({ - description: "User can take (earn) a management fee", - examples: [false], - }), - performanceFee: Schema.Boolean.annotate({ - description: "User can take (earn) a performance fee", - examples: [false], - }), - validatorRebates: Schema.Boolean.annotate({ - description: "User can take (earn) validator rebates", - examples: [false], - }), -}).annotate({ identifier: "PossibleFeeTakingMechanismsDto" }); -export type CuratorDto = { - readonly name?: string | null; - readonly description?: string | null; - readonly logoURI?: string | null; -}; -export const CuratorDto = Schema.Struct({ - name: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Curator name", - examples: ["Steakhouse Financial"], - }) - ), - description: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Curator description", - examples: ["Vault curator"], - }) - ), - logoURI: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Curator logo URI", - examples: ["https://example.com/curator.svg"], - }) - ), -}).annotate({ identifier: "CuratorDto" }); -export type CapacityDto = { - readonly current: string; - readonly max?: string | null; - readonly remaining?: string | null; -}; -export const CapacityDto = Schema.Struct({ - current: Schema.String.annotate({ - description: "Current total assets in the yield", - }), - max: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Maximum capacity of the yield", - }) - ), - remaining: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Remaining capacity available for deposits", - }) - ), -}).annotate({ identifier: "CapacityDto" }); -export type LiquidityStateDto = { - readonly liquidity?: string | null; - readonly utilization?: string | null; -}; -export const LiquidityStateDto = Schema.Struct({ - liquidity: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Available liquidity in underlying token units", - examples: ["250000.00"], - }) - ), - utilization: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Utilization rate as a decimal (e.g., 0.8 = 80%)", - examples: ["0.80"], - }) - ), -}).annotate({ identifier: "LiquidityStateDto" }); -export type AllocationRewardRateDto = { - readonly total: number; - readonly rateType: string; -}; -export const AllocationRewardRateDto = Schema.Struct({ - total: Schema.Number.annotate({ - description: "Total reward rate", - examples: [5.25], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - rateType: Schema.String.annotate({ - description: "Whether this rate is APR or APY", - examples: ["APY"], - }), -}).annotate({ identifier: "AllocationRewardRateDto" }); -export type WindowBoundsDto = { - readonly opensAt: string; - readonly closesAt: string; - readonly source?: "onchain" | "api" | "config"; -}; -export const WindowBoundsDto = Schema.Struct({ - opensAt: Schema.String.annotate({ - description: "Window open time (ISO 8601)", - examples: ["2026-07-21T08:00:00Z"], - }), - closesAt: Schema.String.annotate({ - description: - "Window close / cutoff time (ISO 8601); orders after this roll to nextWindow", - examples: ["2026-07-27T20:00:00Z"], - }), - source: Schema.optionalKey( - Schema.Literals(["onchain", "api", "config"]).annotate({ - description: - "Provenance of this window (on-chain read, issuer API, or hardcoded config)", - }) - ), -}).annotate({ identifier: "WindowBoundsDto" }); -export type PathLimitsDto = { - readonly individualPer24h?: string; - readonly globalPer24h?: string; - readonly globalRemainingPer24h?: string; - readonly maxFractionOfNav?: number; - readonly liquidityBounded?: boolean; - readonly availableLiquidity?: string; - readonly minimumAmount?: string; -}; -export const PathLimitsDto = Schema.Struct({ - individualPer24h: Schema.optionalKey( - Schema.String.annotate({ description: "Per-investor cap per rolling 24h" }) - ), - globalPer24h: Schema.optionalKey( - Schema.String.annotate({ description: "Protocol-wide cap per rolling 24h" }) - ), - globalRemainingPer24h: Schema.optionalKey( - Schema.String.annotate({ - description: - "Live remaining protocol-wide capacity in the current rolling 24h window (globalPer24h minus used); computed at request time", - }) - ), - maxFractionOfNav: Schema.optionalKey( - Schema.Number.annotate({ - description: "On-demand pool cap as a fraction of NAV (0-1)", - examples: [0.05], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })) - ), - liquidityBounded: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "Path depends on an on-chain liquidity buffer; live depth lives in state.liquidityState", - }) - ), - availableLiquidity: Schema.optionalKey( - Schema.String.annotate({ - description: - "Live liquidity available to this path right now, in the payout token; computed at request time", - examples: ["323155"], - }) - ), - minimumAmount: Schema.optionalKey( - Schema.String.annotate({ - description: - "Per-path minimum when it differs from mechanics.entryLimits", - }) - ), -}).annotate({ identifier: "PathLimitsDto" }); -export type PathFeeDto = { readonly rate: number }; -export const PathFeeDto = Schema.Struct({ - rate: Schema.Number.annotate({ - description: - "Fee charged on this path as a decimal fraction of the amount (0.0007 = 0.07%)", - examples: [0.0007], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), -}).annotate({ identifier: "PathFeeDto" }); -export type ExecutionContractsDto = { - readonly enter?: ReadonlyArray; - readonly exit?: ReadonlyArray; -}; -export const ExecutionContractsDto = Schema.Struct({ - enter: Schema.optionalKey( - Schema.Array(Schema.String).annotate({ - description: - "Contract addresses that may appear as tx.to for enter transactions", - examples: [["0x16D5A408e807db8eF7c578279BEeEe6b228f1c1C"]], - }) - ), - exit: Schema.optionalKey( - Schema.Array(Schema.String).annotate({ - description: - "Contract addresses that may appear as tx.to for exit transactions", - examples: [ - [ - "0xae78736Cd615f374D3085123A210448E74Fc6393", - "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - ], - ], - }) - ), -}).annotate({ identifier: "ExecutionContractsDto" }); export type Networks = | "ethereum" | "ethereum-goerli" @@ -920,6 +24,7 @@ export type Networks = | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -1025,6 +130,7 @@ export const Networks = Schema.Literals([ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -1118,60 +224,466 @@ export type GetBalancesArgumentsDto = { readonly autoSweepDayOfMonth?: number; readonly autoSweepTimezone?: string; }; -export const GetBalancesArgumentsDto = Schema.Struct({ - cAddressBech: Schema.optionalKey( +export const GetBalancesArgumentsDto = Schema.Struct({ + cAddressBech: Schema.optionalKey( + Schema.String.annotate({ + description: "Avalanche C-chain address", + examples: ["0x123..."], + }) + ), + pAddressBech: Schema.optionalKey( + Schema.String.annotate({ + description: "Avalanche P-chain address", + examples: ["P-avax1..."], + }) + ), + autoSweepDayOfMonth: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Day of month when auto-sweep window starts (used by Solana auto-sweep balance actions)", + examples: [20], + }) + .check(Schema.isFinite().annotate({ expected: "a finite number" })) + .check( + Schema.isGreaterThanOrEqualTo(1).annotate({ + expected: "a value greater than or equal to 1", + }) + ) + .check( + Schema.isLessThanOrEqualTo(31).annotate({ + expected: "a value less than or equal to 31", + }) + ) + ), + autoSweepTimezone: Schema.optionalKey( + Schema.String.annotate({ + description: + "IANA timezone used to evaluate auto-sweep window day (e.g. Europe/London)", + examples: ["Europe/London"], + }) + ), +}).annotate({ identifier: "GetBalancesArgumentsDto" }); +export type BalanceType = + | "active" + | "entering" + | "exiting" + | "withdrawable" + | "claimable" + | "locked"; +export const BalanceType = Schema.Literals([ + "active", + "entering", + "exiting", + "withdrawable", + "claimable", + "locked", +]).annotate({ description: "Type of balance", identifier: "BalanceType" }); +export type ArgumentFieldDto = { + readonly name: + | "amount" + | "amountRaw" + | "amounts" + | "shareAmount" + | "shareAmountRaw" + | "validatorAddress" + | "validatorAddresses" + | "receiverAddress" + | "providerId" + | "duration" + | "inputToken" + | "inputTokenNetwork" + | "outputToken" + | "outputTokenNetwork" + | "subnetId" + | "tronResource" + | "feeConfigurationId" + | "cosmosPubKey" + | "tezosPubKey" + | "cAddressBech" + | "pAddressBech" + | "executionMode" + | "ledgerWalletApiCompatible" + | "useMaxAmount" + | "useInstantExecution" + | "useAutoClaim" + | "rangeMin" + | "rangeMax" + | "percentage" + | "tokenId" + | "skipPrechecks" + | "useMaxAllowance" + | "feePayerAddress"; + readonly type: "string" | "number" | "address" | "enum" | "boolean"; + readonly label: string; + readonly description?: string; + readonly required?: boolean; + readonly options?: ReadonlyArray; + readonly optionsRef?: string; + readonly default?: { readonly [x: string]: Schema.Json }; + readonly placeholder?: string; + readonly minimum?: string | null; + readonly maximum?: string | null; + readonly isArray?: boolean; +}; +export const ArgumentFieldDto = Schema.Struct({ + name: Schema.Literals([ + "amount", + "amountRaw", + "amounts", + "shareAmount", + "shareAmountRaw", + "validatorAddress", + "validatorAddresses", + "receiverAddress", + "providerId", + "duration", + "inputToken", + "inputTokenNetwork", + "outputToken", + "outputTokenNetwork", + "subnetId", + "tronResource", + "feeConfigurationId", + "cosmosPubKey", + "tezosPubKey", + "cAddressBech", + "pAddressBech", + "executionMode", + "ledgerWalletApiCompatible", + "useMaxAmount", + "useInstantExecution", + "useAutoClaim", + "rangeMin", + "rangeMax", + "percentage", + "tokenId", + "skipPrechecks", + "useMaxAllowance", + "feePayerAddress", + ]).annotate({ description: "Field name", examples: ["amount"] }), + type: Schema.Literals([ + "string", + "number", + "address", + "enum", + "boolean", + ]).annotate({ description: "Field type", examples: ["string"] }), + label: Schema.String.annotate({ + description: "Field label", + examples: ["Amount to Enter"], + }), + description: Schema.optionalKey( + Schema.String.annotate({ description: "Field description" }) + ), + required: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "Whether the field is required", + examples: [true], + }) + ), + options: Schema.optionalKey( + Schema.Array(Schema.String).annotate({ + description: "Options for enum fields", + examples: [["individual", "batched"]], + }) + ), + optionsRef: Schema.optionalKey( + Schema.String.annotate({ + description: + "Reference to API endpoint that provides options dynamically", + examples: ["/api/v1/validators?integrationId=eth-lido"], + }) + ), + default: Schema.optionalKey( + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Default value for the field" }) + ), + placeholder: Schema.optionalKey( + Schema.String.annotate({ description: "Placeholder text for the field" }) + ), + minimum: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Minimum allowed value for number fields (null if no minimum)", + examples: ["1.0"], + }) + ), + maximum: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Maximum allowed value for number fields (null if no maximum)", + examples: ["100.0"], + }) + ), + isArray: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "Whether the field is an array", + examples: [false], + }) + ), +}).annotate({ identifier: "ArgumentFieldDto" }); +export type TokenDto = { + readonly symbol: string; + readonly name: string; + readonly decimals: number; + readonly network: + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; + readonly address?: string; + readonly logoURI?: string; + readonly isPoints?: boolean; + readonly coinGeckoId?: string; +}; +export const TokenDto = Schema.Struct({ + symbol: Schema.String.annotate({ + description: "Token symbol", + examples: ["ETH"], + }), + name: Schema.String.annotate({ + description: "Token name", + examples: ["Ethereum"], + }), + decimals: Schema.Number.annotate({ + description: "Token decimal places", + examples: [18], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + network: Schema.Literals([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "plume", + "monad-testnet", + "monad", + "robinhood", + "robinhood-testnet", + "arc-testnet", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "tempo", + "pharos", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ]).annotate({ description: "Token network" }), + address: Schema.optionalKey( Schema.String.annotate({ - description: "Avalanche C-chain address", - examples: ["0x123..."], + description: "Token address (if applicable)", + examples: ["0x..."], }) ), - pAddressBech: Schema.optionalKey( + logoURI: Schema.optionalKey( Schema.String.annotate({ - description: "Avalanche P-chain address", - examples: ["P-avax1..."], + description: "Token logo URI", + examples: ["https://..."], }) ), - autoSweepDayOfMonth: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Day of month when auto-sweep window starts (used by Solana auto-sweep balance actions)", - examples: [20], + isPoints: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "Token is points", + examples: [true], }) - .check(Schema.isFinite().annotate({ expected: "a finite number" })) - .check( - Schema.isGreaterThanOrEqualTo(1).annotate({ - expected: "a value greater than or equal to 1", - }) - ) - .check( - Schema.isLessThanOrEqualTo(31).annotate({ - expected: "a value less than or equal to 31", - }) - ) ), - autoSweepTimezone: Schema.optionalKey( + coinGeckoId: Schema.optionalKey( Schema.String.annotate({ - description: - "IANA timezone used to evaluate auto-sweep window day (e.g. Europe/London)", - examples: ["Europe/London"], + description: "Token CoinGecko ID", + examples: ["ethereum"], }) ), -}).annotate({ identifier: "GetBalancesArgumentsDto" }); -export type BalanceType = - | "active" - | "entering" - | "exiting" - | "withdrawable" - | "claimable" - | "locked"; -export const BalanceType = Schema.Literals([ - "active", - "entering", - "exiting", - "withdrawable", - "claimable", - "locked", -]).annotate({ description: "Type of balance", identifier: "BalanceType" }); +}).annotate({ identifier: "TokenDto" }); export type RevShareDetailsDto = { readonly minRevShare: number; readonly maxRevShare: number; @@ -1185,245 +697,435 @@ export const RevShareDetailsDto = Schema.Struct({ description: "Maximum revenue share percentage (0-1)", examples: [0.7], }).check(Schema.isFinite().annotate({ expected: "a finite number" })), -}).annotate({ identifier: "RevShareDetailsDto" }); -export type ValidatorSubnetDto = { - readonly id: number; - readonly name?: string; - readonly tokenSymbol?: string; - readonly tvl?: string; - readonly pricePerShare?: string; +}).annotate({ identifier: "RevShareDetailsDto" }); +export type ValidatorSubnetDto = { + readonly id: number; + readonly name?: string; + readonly tokenSymbol?: string; + readonly tvl?: string; + readonly pricePerShare?: string; +}; +export const ValidatorSubnetDto = Schema.Struct({ + id: Schema.Number.annotate({ description: "Subnet ID", examples: [1] }).check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + name: Schema.optionalKey( + Schema.String.annotate({ description: "Subnet name", examples: ["Apex"] }) + ), + tokenSymbol: Schema.optionalKey( + Schema.String.annotate({ + description: "Subnet token symbol", + examples: ["α"], + }) + ), + tvl: Schema.optionalKey( + Schema.String.annotate({ + description: + "TAO-side reserve of the subnet AMM pool (subnet-level TVL in TAO)", + examples: ["1000000"], + }) + ), + pricePerShare: Schema.optionalKey( + Schema.String.annotate({ + description: "Spot price of the subnet alpha token in TAO", + examples: ["1.0"], + }) + ), +}).annotate({ identifier: "ValidatorSubnetDto" }); +export type YieldErrorDto = { + readonly yieldId: string; + readonly error: string; +}; +export const YieldErrorDto = Schema.Struct({ + yieldId: Schema.String.annotate({ + description: "Unique identifier of the yield that failed", + examples: ["ethereum-compound-usdc"], + }), + error: Schema.String.annotate({ + description: "Error message describing what went wrong", + examples: ["Failed to fetch data from blockchain: RPC timeout"], + }), +}).annotate({ identifier: "YieldErrorDto" }); +export type YieldStatisticsDto = { + readonly tvlUsd?: string | null; + readonly tvl?: string | null; + readonly tvlRaw?: string | null; + readonly uniqueUsers?: number | null; + readonly averagePositionSizeUsd?: string | null; + readonly averagePositionSize?: string | null; +}; +export const YieldStatisticsDto = Schema.Struct({ + tvlUsd: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Total value locked in USD for this statistics scope", + examples: ["1,200,000"], + }) + ), + tvl: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Total value locked in primary underlying token for this statistics scope", + examples: ["500.25"], + }) + ), + tvlRaw: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Raw total value locked in smallest token units for this statistics scope", + examples: ["500250000000000000000"], + }) + ), + uniqueUsers: Schema.optionalKey( + Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + Schema.Null, + ]).annotate({ + description: + "Number of wallets with an active position on the underlying vault share token. Null when the yield is not ERC4626, no precomputed data exists, or indexing has not run yet. Partner-specific stats are not included.", + examples: [348], + }) + ), + averagePositionSizeUsd: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Average position size in USD for the underlying vault (TVL USD divided by base-vault unique holders). Not partner-scoped.", + examples: ["3,448.27"], + }) + ), + averagePositionSize: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Average position size in primary underlying token for the underlying vault (TVL divided by base-vault unique holders). Not partner-scoped.", + examples: ["1.44"], + }) + ), +}).annotate({ identifier: "YieldStatisticsDto" }); +export type YieldRiskEntryDto = { + readonly rating: string; + readonly source: "credora" | "stakingRewards"; +}; +export const YieldRiskEntryDto = Schema.Struct({ + rating: Schema.String.annotate({ + description: "Provider top-level rating value", + examples: ["AA"], + }), + source: Schema.Literals(["credora", "stakingRewards"]).annotate({ + description: "Provider source label", + examples: ["credora"], + }), +}).annotate({ identifier: "YieldRiskEntryDto" }); +export type YieldStatusDto = { + readonly enter: boolean; + readonly exit: boolean; +}; +export const YieldStatusDto = Schema.Struct({ + enter: Schema.Boolean.annotate({ + description: "Whether the user can currently enter this yield", + examples: [true], + }), + exit: Schema.Boolean.annotate({ + description: "Whether the user can currently exit this yield", + examples: [true], + }), +}).annotate({ identifier: "YieldStatusDto" }); +export type ERCStandards = "ERC20" | "ERC4626" | "ERC721" | "ERC1155"; +export const ERCStandards = Schema.Literals([ + "ERC20", + "ERC4626", + "ERC721", + "ERC1155", +]).annotate({ + description: "Supported standards for this yield", + identifier: "ERCStandards", +}); +export type YieldType = + | "staking" + | "restaking" + | "lending" + | "vault" + | "fixed_yield" + | "real_world_asset" + | "concentrated_liquidity_pool" + | "liquidity_pool" + | "liquid_staking"; +export const YieldType = Schema.Literals([ + "staking", + "restaking", + "lending", + "vault", + "fixed_yield", + "real_world_asset", + "concentrated_liquidity_pool", + "liquidity_pool", + "liquid_staking", +]).annotate({ + description: "Type of yield mechanism (staking, restaking, LP, vault, etc.)", + identifier: "YieldType", +}); +export type RewardSchedule = + | "block" + | "hour" + | "day" + | "week" + | "month" + | "era" + | "epoch" + | "campaign"; +export const RewardSchedule = Schema.Literals([ + "block", + "hour", + "day", + "week", + "month", + "era", + "epoch", + "campaign", +]).annotate({ + description: + "How often rewards are distributed (e.g. continuously, epoch-based)", + identifier: "RewardSchedule", +}); +export type RewardClaiming = "auto" | "manual"; +export const RewardClaiming = Schema.Literals(["auto", "manual"]).annotate({ + description: "How rewards are claimed: auto, manual, or mixed", + identifier: "RewardClaiming", +}); +export type TimePeriodDto = { readonly seconds: number }; +export const TimePeriodDto = Schema.Struct({ + seconds: Schema.Number.annotate({ + description: "Duration in seconds", + examples: [86400], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), +}).annotate({ identifier: "TimePeriodDto" }); +export type YieldFeeDto = { + readonly deposit?: string; + readonly withdrawal?: string; + readonly management?: string; + readonly performance?: string; }; -export const ValidatorSubnetDto = Schema.Struct({ - id: Schema.Number.annotate({ description: "Subnet ID", examples: [1] }).check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - name: Schema.optionalKey( - Schema.String.annotate({ description: "Subnet name", examples: ["Apex"] }) +export const YieldFeeDto = Schema.Struct({ + deposit: Schema.optionalKey( + Schema.String.annotate({ + description: "Deposit fee percentage", + examples: ["0.00"], + }) ), - tokenSymbol: Schema.optionalKey( + withdrawal: Schema.optionalKey( Schema.String.annotate({ - description: "Subnet token symbol", - examples: ["α"], + description: "Withdrawal fee percentage", + examples: ["0.00"], }) ), - tvl: Schema.optionalKey( + management: Schema.optionalKey( Schema.String.annotate({ - description: - "TAO-side reserve of the subnet AMM pool (subnet-level TVL in TAO)", - examples: ["1000000"], + description: "Management fee percentage (annual)", + examples: ["2.00"], }) ), - pricePerShare: Schema.optionalKey( + performance: Schema.optionalKey( Schema.String.annotate({ - description: "Spot price of the subnet alpha token in TAO", - examples: ["1.0"], + description: "Performance fee percentage", + examples: ["20.00"], }) ), -}).annotate({ identifier: "ValidatorSubnetDto" }); -export type YieldErrorDto = { - readonly yieldId: string; - readonly error: string; +}).annotate({ identifier: "YieldFeeDto" }); +export type YieldEntryLimitsDto = { + readonly minimum: string | null; + readonly maximum: string | null; + readonly subsequentMinimum: string | null; }; -export const YieldErrorDto = Schema.Struct({ - yieldId: Schema.String.annotate({ - description: "Unique identifier of the yield that failed", - examples: ["ethereum-compound-usdc"], +export const YieldEntryLimitsDto = Schema.Struct({ + minimum: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Minimum amount required to enter this yield in token units (null if no minimum)", + examples: ["0.01"], }), - error: Schema.String.annotate({ - description: "Error message describing what went wrong", - examples: ["Failed to fetch data from blockchain: RPC timeout"], + maximum: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Maximum amount allowed to enter this yield in token units (null if no limit)", + examples: ["1000.0"], }), -}).annotate({ identifier: "YieldErrorDto" }); -export type YieldRiskCredoraDto = { - readonly rating?: string | null; - readonly score?: number | null; - readonly psl?: number | null; - readonly publishDate?: string | null; - readonly curator?: string | null; + subsequentMinimum: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Minimum amount for deposits after the user already holds the asset, in token units (null falls back to minimum)", + examples: ["10000"], + }), +}).annotate({ identifier: "YieldEntryLimitsDto" }); +export type InvestorEligibilityEntryDto = { + readonly jurisdiction: string; + readonly tier: + | "us_retail" + | "us_accredited" + | "us_qualified_purchaser" + | "eu_retail" + | "eu_professional" + | "eu_professional_optup" + | "eu_eligible_counterparty" + | "uk_retail" + | "uk_professional" + | "ch_qualified" + | "sg_ai" + | "sg_ii" + | "hk_pi" + | "my_sophisticated" + | "br_qi" + | "br_pi" + | "ae_professional"; + readonly verificationLevel: + | "self_attested" + | "verified_documentation" + | "letter" + | "third_party_attestation"; + readonly expiresAfterDays?: number; }; -export const YieldRiskCredoraDto = Schema.Struct({ - rating: Schema.optionalKey( +export const InvestorEligibilityEntryDto = Schema.Struct({ + jurisdiction: Schema.String.annotate({ + description: + 'ISO-3166-1 alpha-2 country code, "EEA", "GCC", or "*" for any jurisdiction', + examples: ["US"], + }), + tier: Schema.Literals([ + "us_retail", + "us_accredited", + "us_qualified_purchaser", + "eu_retail", + "eu_professional", + "eu_professional_optup", + "eu_eligible_counterparty", + "uk_retail", + "uk_professional", + "ch_qualified", + "sg_ai", + "sg_ii", + "hk_pi", + "my_sophisticated", + "br_qi", + "br_pi", + "ae_professional", + ]).annotate({ + description: "Investor tier required to participate in this jurisdiction", + examples: ["us_qualified_purchaser"], + }), + verificationLevel: Schema.Literals([ + "self_attested", + "verified_documentation", + "letter", + "third_party_attestation", + ]).annotate({ + description: "How the user's tier must be verified", + examples: ["third_party_attestation"], + }), + expiresAfterDays: Schema.optionalKey( + Schema.Number.annotate({ + description: "Re-verification interval in days, if required", + examples: [90], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), +}).annotate({ identifier: "InvestorEligibilityEntryDto" }); +export type SelfAttestationDocumentDto = { + readonly name: string; + readonly url: string; +}; +export const SelfAttestationDocumentDto = Schema.Struct({ + name: Schema.String.annotate({ + description: "Human-readable document name", + examples: ["Risk Disclosures"], + }), + url: Schema.String.annotate({ + description: "URL of the document the user must accept (HTTPS)", + }), +}).annotate({ identifier: "SelfAttestationDocumentDto" }); +export type PossibleFeeTakingMechanismsDto = { + readonly depositFee: boolean; + readonly managementFee: boolean; + readonly performanceFee: boolean; + readonly validatorRebates: boolean; +}; +export const PossibleFeeTakingMechanismsDto = Schema.Struct({ + depositFee: Schema.Boolean.annotate({ + description: "User can take (earn) a deposit fee", + examples: [false], + }), + managementFee: Schema.Boolean.annotate({ + description: "User can take (earn) a management fee", + examples: [false], + }), + performanceFee: Schema.Boolean.annotate({ + description: "User can take (earn) a performance fee", + examples: [false], + }), + validatorRebates: Schema.Boolean.annotate({ + description: "User can take (earn) validator rebates", + examples: [false], + }), +}).annotate({ identifier: "PossibleFeeTakingMechanismsDto" }); +export type CuratorDto = { + readonly name?: string | null; + readonly description?: string | null; + readonly logoURI?: string | null; +}; +export const CuratorDto = Schema.Struct({ + name: Schema.optionalKey( Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Credora rating", - examples: ["A"], + description: "Curator name", + examples: ["Steakhouse Financial"], }) ), - score: Schema.optionalKey( - Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - Schema.Null, - ]).annotate({ description: "Credora score (1-5)", examples: [4.5] }) - ), - psl: Schema.optionalKey( - Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - Schema.Null, - ]).annotate({ - description: "Probability of Significant Loss (annualized)", - examples: [0.01], + description: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Curator description", + examples: ["Vault curator"], }) ), - publishDate: Schema.optionalKey( + logoURI: Schema.optionalKey( Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Credora publish date", - examples: ["2026-01-01"], + description: "Curator logo URI", + examples: ["https://example.com/curator.svg"], }) ), - curator: Schema.optionalKey( +}).annotate({ identifier: "CuratorDto" }); +export type CapacityDto = { + readonly current: string; + readonly max?: string | null; + readonly remaining?: string | null; +}; +export const CapacityDto = Schema.Struct({ + current: Schema.String.annotate({ + description: "Current total assets in the yield", + }), + max: Schema.optionalKey( Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Credora curator name", - examples: ["Credora"], + description: "Maximum capacity of the yield", }) ), -}).annotate({ identifier: "YieldRiskCredoraDto" }); -export type YieldRiskStakingRewardsMetricsDto = { - readonly users?: number | null; -}; -export const YieldRiskStakingRewardsMetricsDto = Schema.Struct({ - users: Schema.optionalKey( - Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - Schema.Null, - ]).annotate({ - description: "Users count from Staking Rewards risk metrics", - examples: [1000], + remaining: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Remaining capacity available for deposits", }) ), -}).annotate({ identifier: "YieldRiskStakingRewardsMetricsDto" }); -export type BalanceHistorySnapshotPeriodDeltaDto = { - readonly shareAmount: string; - readonly shareAmountRaw: string; - readonly amount: string; - readonly amountRaw: string; -}; -export const BalanceHistorySnapshotPeriodDeltaDto = Schema.Struct({ - shareAmount: Schema.String.annotate({ - description: - "Net vault share balance change from indexed transfers during this period", - examples: ["1.000000000000000000"], - }), - shareAmountRaw: Schema.String.annotate({ - description: "Net vault share balance change in base units (wei)", - examples: ["1000000000000000000"], - }), - amount: Schema.String.annotate({ - description: - "Net change in underlying position vs the previous snapshot (includes price-per-share effects)", - examples: ["0.050000000000000000"], - }), - amountRaw: Schema.String.annotate({ - description: "Net underlying position change in base units", - examples: ["50000000000000000"], - }), -}).annotate({ identifier: "BalanceHistorySnapshotPeriodDeltaDto" }); -export type PaginatedResponseDto = { - readonly total: number; - readonly offset: number; - readonly limit: number; -}; -export const PaginatedResponseDto = Schema.Struct({ - total: Schema.Number.annotate({ - description: "Total number of items available", - examples: [100], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - offset: Schema.Number.annotate({ - description: "Offset of the current page", - examples: [0], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - limit: Schema.Number.annotate({ - description: "Limit of the current page", - examples: [20], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), -}).annotate({ identifier: "PaginatedResponseDto" }); -export type RewardRateSnapshotDto = { - readonly timestamp: string; - readonly rewardRate: string; -}; -export const RewardRateSnapshotDto = Schema.Struct({ - timestamp: Schema.String.annotate({ - description: "Timestamp of this snapshot (ISO 8601)", - examples: ["2025-07-10T00:00:00.000Z"], - }), - rewardRate: Schema.String.annotate({ - description: "Reward rate as a decimal string", - examples: ["0.0312"], - }), -}).annotate({ identifier: "RewardRateSnapshotDto" }); -export type TvlHistoryResponseDto = { - readonly total: number; - readonly offset: number; - readonly limit: number; - readonly yieldId: string; - readonly interval: "day" | "week" | "month"; - readonly from: string; - readonly to: string; +}).annotate({ identifier: "CapacityDto" }); +export type LiquidityStateDto = { + readonly liquidity?: string | null; + readonly utilization?: string | null; }; -export const TvlHistoryResponseDto = Schema.Struct({ - total: Schema.Number.annotate({ - description: "Total number of items available", - examples: [100], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - offset: Schema.Number.annotate({ - description: "Offset of the current page", - examples: [0], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - limit: Schema.Number.annotate({ - description: "Limit of the current page", - examples: [20], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - yieldId: Schema.String.annotate({ - description: "Unique identifier of the yield", - examples: ["ethereum-usdc-aave-v3"], - }), - interval: Schema.Literals(["day", "week", "month"]).annotate({ - description: "Sampling interval used for this response", - examples: ["day"], - }), - from: Schema.String.annotate({ - description: "Start of the returned date range (ISO 8601)", - examples: ["2025-06-12T00:00:00.000Z"], - }), - to: Schema.String.annotate({ - description: "End of the returned date range (ISO 8601)", - examples: ["2025-07-12T00:00:00.000Z"], - }), -}).annotate({ identifier: "TvlHistoryResponseDto" }); -export type CampaignStatus = "draft" | "active" | "paused" | "ended"; -export const CampaignStatus = Schema.Literals([ - "draft", - "active", - "paused", - "ended", -]).annotate({ identifier: "CampaignStatus" }); -export type CampaignRewardMode = "normal" | "compound"; -export const CampaignRewardMode = Schema.Literals([ - "normal", - "compound", -]).annotate({ identifier: "CampaignRewardMode" }); -export type CampaignQualificationType = "min_token_amount"; -export const CampaignQualificationType = Schema.Literal( - "min_token_amount" -).annotate({ identifier: "CampaignQualificationType" }); -export type CampaignPayoutFrequency = - | "weekly" - | "daily" - | "six_hourly" - | "end_of_campaign"; -export const CampaignPayoutFrequency = Schema.Literals([ - "weekly", - "daily", - "six_hourly", - "end_of_campaign", -]).annotate({ identifier: "CampaignPayoutFrequency" }); -export type TransactionDto = { - readonly id: string; - readonly title: string; +export const LiquidityStateDto = Schema.Struct({ + liquidity: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Available liquidity in underlying token units", + examples: ["250000.00"], + }) + ), + utilization: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Utilization rate as a decimal (e.g., 0.8 = 80%)", + examples: ["0.80"], + }) + ), +}).annotate({ identifier: "LiquidityStateDto" }); +export type AllocationDto = { + readonly address: string; readonly network: | "ethereum" | "ethereum-goerli" @@ -1446,6 +1148,7 @@ export type TransactionDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -1508,120 +1211,44 @@ export type TransactionDto = { | "celestia" | "saga" | "zetachain" - | "dymension" - | "humansai" - | "neutron" - | "polkadot" - | "kusama" - | "westend" - | "bittensor" - | "aptos" - | "binancebeacon" - | "cardano" - | "near" - | "solana" - | "solana-devnet" - | "stellar" - | "stellar-testnet" - | "sui" - | "tezos" - | "tron" - | "ton" - | "ton-testnet" - | "hyperliquid"; - readonly status: - | "NOT_FOUND" - | "CREATED" - | "BLOCKED" - | "WAITING_FOR_SIGNATURE" - | "SIGNED" - | "BROADCASTED" - | "PENDING" - | "CONFIRMED" - | "FAILED" - | "SKIPPED"; - readonly type: - | "SWAP" - | "DEPOSIT" - | "APPROVAL" - | "STAKE" - | "SET_OPERATOR" - | "CLAIM_UNSTAKED" - | "CLAIM_REWARDS" - | "RESTAKE_REWARDS" - | "UNSTAKE" - | "SPLIT" - | "MERGE" - | "LOCK" - | "UNLOCK" - | "SUPPLY" - | "ADD_LIQUIDITY" - | "REMOVE_LIQUIDITY" - | "BRIDGE" - | "VOTE" - | "REVOKE" - | "RESTAKE" - | "REBOND" - | "WITHDRAW" - | "WITHDRAW_ALL" - | "CREATE_ACCOUNT" - | "REVEAL" - | "MIGRATE" - | "DELEGATE" - | "UNDELEGATE" - | "UTXO_P_TO_C_IMPORT" - | "UTXO_C_TO_P_IMPORT" - | "WRAP" - | "UNWRAP" - | "UNFREEZE_LEGACY" - | "UNFREEZE_LEGACY_BANDWIDTH" - | "UNFREEZE_LEGACY_ENERGY" - | "UNFREEZE_BANDWIDTH" - | "UNFREEZE_ENERGY" - | "FREEZE_BANDWIDTH" - | "FREEZE_ENERGY" - | "UNDELEGATE_BANDWIDTH" - | "UNDELEGATE_ENERGY" - | "P2P_NODE_REQUEST" - | "CREATE_EIGENPOD" - | "VERIFY_WITHDRAW_CREDENTIALS" - | "START_CHECKPOINT" - | "VERIFY_CHECKPOINT_PROOFS" - | "QUEUE_WITHDRAWALS" - | "COMPLETE_QUEUED_WITHDRAWALS" - | "LZ_DEPOSIT" - | "LZ_WITHDRAW" - | "LUGANODES_PROVISION" - | "LUGANODES_EXIT_REQUEST" - | "INFSTONES_PROVISION" - | "INFSTONES_EXIT_REQUEST" - | "INFSTONES_CLAIM_REQUEST" - | "BATCH"; - readonly hash: string | null; - readonly createdAt: string; - readonly broadcastedAt: string | null; - readonly signedTransaction: string | null; - readonly unsignedTransaction: - | string - | { readonly [x: string]: Schema.Json } - | null; - readonly annotatedTransaction?: { readonly [x: string]: Schema.Json } | null; - readonly structuredTransaction?: { readonly [x: string]: Schema.Json } | null; - readonly stepIndex?: number; - readonly description?: string; - readonly error?: string | null; - readonly gasEstimate?: string; - readonly explorerUrl?: string | null; - readonly isMessage?: boolean; + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; + readonly name: string; + readonly yieldId?: string; + readonly providerId?: string; + readonly allocation: string; + readonly allocationUsd: string | null; + readonly weight: number; + readonly targetWeight: number; + readonly rewardRate: { readonly total: number; readonly rateType: string }; + readonly tvl: string | null; + readonly tvlUsd: string | null; + readonly maxCapacity: string | null; + readonly remainingCapacity: string | null; }; -export const TransactionDto = Schema.Struct({ - id: Schema.String.annotate({ - description: "Unique transaction identifier", - examples: ["tx_123abc"], - }), - title: Schema.String.annotate({ - description: "Display title for the transaction", - examples: ["Approve USDC"], +export const AllocationDto = Schema.Struct({ + address: Schema.String.annotate({ + description: "Contract address of the underlying strategy", + examples: ["0x1234567890abcdef1234567890abcdef12345678"], }), network: Schema.Literals([ "ethereum", @@ -1645,6 +1272,7 @@ export const TransactionDto = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -1729,327 +1357,277 @@ export const TransactionDto = Schema.Struct({ "ton-testnet", "hyperliquid", ]).annotate({ - description: "Network this transaction is for", - examples: ["ethereum"], + description: "Network the underlying strategy is on", + examples: ["base"], }), - status: Schema.Literals([ - "NOT_FOUND", - "CREATED", - "BLOCKED", - "WAITING_FOR_SIGNATURE", - "SIGNED", - "BROADCASTED", - "PENDING", - "CONFIRMED", - "FAILED", - "SKIPPED", - ]).annotate({ - description: "Current status of the transaction", - examples: ["PENDING"], + name: Schema.String.annotate({ + description: "Display name of the underlying strategy", + examples: ["Morpho Moonwell USDC"], }), - type: Schema.Literals([ - "SWAP", - "DEPOSIT", - "APPROVAL", - "STAKE", - "SET_OPERATOR", - "CLAIM_UNSTAKED", - "CLAIM_REWARDS", - "RESTAKE_REWARDS", - "UNSTAKE", - "SPLIT", - "MERGE", - "LOCK", - "UNLOCK", - "SUPPLY", - "ADD_LIQUIDITY", - "REMOVE_LIQUIDITY", - "BRIDGE", - "VOTE", - "REVOKE", - "RESTAKE", - "REBOND", - "WITHDRAW", - "WITHDRAW_ALL", - "CREATE_ACCOUNT", - "REVEAL", - "MIGRATE", - "DELEGATE", - "UNDELEGATE", - "UTXO_P_TO_C_IMPORT", - "UTXO_C_TO_P_IMPORT", - "WRAP", - "UNWRAP", - "UNFREEZE_LEGACY", - "UNFREEZE_LEGACY_BANDWIDTH", - "UNFREEZE_LEGACY_ENERGY", - "UNFREEZE_BANDWIDTH", - "UNFREEZE_ENERGY", - "FREEZE_BANDWIDTH", - "FREEZE_ENERGY", - "UNDELEGATE_BANDWIDTH", - "UNDELEGATE_ENERGY", - "P2P_NODE_REQUEST", - "CREATE_EIGENPOD", - "VERIFY_WITHDRAW_CREDENTIALS", - "START_CHECKPOINT", - "VERIFY_CHECKPOINT_PROOFS", - "QUEUE_WITHDRAWALS", - "COMPLETE_QUEUED_WITHDRAWALS", - "LZ_DEPOSIT", - "LZ_WITHDRAW", - "LUGANODES_PROVISION", - "LUGANODES_EXIT_REQUEST", - "INFSTONES_PROVISION", - "INFSTONES_EXIT_REQUEST", - "INFSTONES_CLAIM_REQUEST", - "BATCH", - ]).annotate({ - description: "Type of transaction operation", - examples: ["STAKE"], + yieldId: Schema.optionalKey( + Schema.String.annotate({ + description: + "Yield ID if this strategy is supported as a separate yield opportunity", + examples: ["base-usdc-morpho-moonwell-usdc"], + }) + ), + providerId: Schema.optionalKey( + Schema.String.annotate({ + description: "Provider ID for this strategy (e.g., morpho, aave, lido)", + examples: ["morpho"], + }) + ), + allocation: Schema.String.annotate({ + description: "Amount allocated to this strategy in input token units", + examples: ["50000.00"], }), - hash: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Transaction hash (available after broadcast)", - examples: ["0x1234567890abcdef..."], + allocationUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "USD value of the allocation", + examples: ["50000.00"], }), - createdAt: Schema.String.annotate({ - description: "When the transaction was created", - format: "date-time", + weight: Schema.Number.annotate({ + description: "Current weight of this strategy as a percentage (0-100)", + examples: [50.5], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + targetWeight: Schema.Number.annotate({ + description: "Target weight of this strategy as a percentage (0-100)", + examples: [50], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + rewardRate: Schema.Struct({ + total: Schema.Number.annotate({ + description: "Total reward rate", + examples: [5.25], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + rateType: Schema.String.annotate({ + description: "Whether this rate is APR or APY", + examples: ["APY"], + }), + }).annotate({ description: "Reward rate of the underlying strategy" }), + tvl: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Total value locked in the underlying strategy in input token units", + examples: ["500.25"], }), - broadcastedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "When the transaction was broadcasted to the network", + tvlUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Total value locked in USD for the underlying strategy", + examples: ["10000000.00"], }), - signedTransaction: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Signed transaction data (ready for broadcast)", + maxCapacity: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Maximum capacity of the underlying strategy", + examples: ["1000000.00"], }), - unsignedTransaction: Schema.Union([ - Schema.Union( - [ - Schema.String.annotate({ description: "Serialized transaction data" }), - Schema.Record( - Schema.String, - Schema.Json.annotate({ expected: "JSON value" }) - ).annotate({ description: "Transaction object (for non-EVM chains)" }), - ], - { mode: "oneOf" } - ).annotate({ - description: "The unsigned transaction data to be signed by the wallet", + remainingCapacity: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Remaining capacity in the underlying strategy", + examples: ["500000.00"], + }), +}).annotate({ identifier: "AllocationDto" }); +export type PathLimitsDto = { + readonly individualPer24h?: string; + readonly globalPer24h?: string; + readonly globalRemainingPer24h?: string; + readonly maxFractionOfNav?: number; + readonly liquidityBounded?: boolean; + readonly availableLiquidity?: string; + readonly minimumAmount?: string; +}; +export const PathLimitsDto = Schema.Struct({ + individualPer24h: Schema.optionalKey( + Schema.String.annotate({ description: "Per-investor cap per rolling 24h" }) + ), + globalPer24h: Schema.optionalKey( + Schema.String.annotate({ description: "Protocol-wide cap per rolling 24h" }) + ), + globalRemainingPer24h: Schema.optionalKey( + Schema.String.annotate({ + description: + "Live remaining protocol-wide capacity in the current rolling 24h window (globalPer24h minus used); computed at request time", + }) + ), + maxFractionOfNav: Schema.optionalKey( + Schema.Number.annotate({ + description: "On-demand pool cap as a fraction of NAV (0-1)", + examples: [0.05], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + liquidityBounded: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "Path depends on an on-chain liquidity buffer; live depth lives in state.liquidityState", + }) + ), + availableLiquidity: Schema.optionalKey( + Schema.String.annotate({ + description: + "Live liquidity available to this path right now, in the payout token; computed at request time", + examples: ["323155"], + }) + ), + minimumAmount: Schema.optionalKey( + Schema.String.annotate({ + description: + "Per-path minimum when it differs from mechanics.entryLimits", + }) + ), +}).annotate({ identifier: "PathLimitsDto" }); +export type PathFeeDto = { readonly rate: number }; +export const PathFeeDto = Schema.Struct({ + rate: Schema.Number.annotate({ + description: + "Fee charged on this path as a decimal fraction of the amount (0.0007 = 0.07%)", + examples: [0.0007], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), +}).annotate({ identifier: "PathFeeDto" }); +export type ExecutionContractsDto = { + readonly enter?: ReadonlyArray; + readonly exit?: ReadonlyArray; +}; +export const ExecutionContractsDto = Schema.Struct({ + enter: Schema.optionalKey( + Schema.Array(Schema.String).annotate({ + description: + "Contract addresses that may appear as tx.to for enter transactions", + examples: [["0x16D5A408e807db8eF7c578279BEeEe6b228f1c1C"]], + }) + ), + exit: Schema.optionalKey( + Schema.Array(Schema.String).annotate({ + description: + "Contract addresses that may appear as tx.to for exit transactions", examples: [ - "0x02f87082012a022f2f83018000947a250d5630b4cf539739df2c5dacb4c659f2488d880de0b6b3a764000080c080a0ef0de6c7b46fc75dd6cb86dccc3cfd731c2bdf6f3d736557240c3646c6fe01a6a07cd60b58dfe01847249dfdd7950ba0d045dded5bbe410b07a015a0ed34e5e00d", + [ + "0xae78736Cd615f374D3085123A210448E74Fc6393", + "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + ], ], - }), - Schema.Null, - ]), - annotatedTransaction: Schema.optionalKey( + }) + ), +}).annotate({ identifier: "ExecutionContractsDto" }); +export type YieldRiskCredoraDto = { + readonly rating?: string | null; + readonly score?: number | null; + readonly psl?: number | null; + readonly publishDate?: string | null; + readonly curator?: string | null; +}; +export const YieldRiskCredoraDto = Schema.Struct({ + rating: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Credora rating", + examples: ["A"], + }) + ), + score: Schema.optionalKey( Schema.Union([ - Schema.Record( - Schema.String, - Schema.Json.annotate({ expected: "JSON value" }) + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) ), Schema.Null, - ]).annotate({ - description: - "Human-readable breakdown of the transaction for display purposes", - examples: [ - { method: "stake", inputs: { amount: "1000000000000000000" } }, - ], - }) + ]).annotate({ description: "Credora score (1-5)", examples: [4.5] }) ), - structuredTransaction: Schema.optionalKey( + psl: Schema.optionalKey( Schema.Union([ - Schema.Record( - Schema.String, - Schema.Json.annotate({ expected: "JSON value" }) + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) ), Schema.Null, ]).annotate({ - description: - "Detailed transaction data for client-side validation or simulation", - }) - ), - stepIndex: Schema.optionalKey( - Schema.Number.annotate({ - description: "Zero-based index of the step in the action flow", - examples: [0], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })) - ), - description: Schema.optionalKey( - Schema.String.annotate({ - description: "User-friendly description of what this transaction does", - examples: ["Approve USDC for staking"], + description: "Probability of Significant Loss (annualized)", + examples: [0.01], }) ), - error: Schema.optionalKey( + publishDate: Schema.optionalKey( Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Error message if the transaction failed", - }) - ), - gasEstimate: Schema.optionalKey( - Schema.String.annotate({ - description: "Estimated gas cost for the transaction", - examples: ["21000"], + description: "Credora publish date", + examples: ["2026-01-01"], }) ), - explorerUrl: Schema.optionalKey( + curator: Schema.optionalKey( Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Link to the blockchain explorer for this transaction", - examples: ["https://etherscan.io/tx/0x1234..."], + description: "Credora curator name", + examples: ["Credora"], }) ), - isMessage: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "Whether this transaction is a message rather than a value transfer", - examples: [false], +}).annotate({ identifier: "YieldRiskCredoraDto" }); +export type YieldRiskStakingRewardsMetricsDto = { + readonly users?: number | null; +}; +export const YieldRiskStakingRewardsMetricsDto = Schema.Struct({ + users: Schema.optionalKey( + Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + Schema.Null, + ]).annotate({ + description: "Users count from Staking Rewards risk metrics", + examples: [1000], }) ), -}).annotate({ identifier: "TransactionDto" }); -export type ActionEventDto = { - readonly id: string; - readonly type: "REDEMPTION_SETTLED" | "REDEMPTION_CANCELLED"; - readonly transactionHash: string | null; - readonly occurredAt: string; +}).annotate({ identifier: "YieldRiskStakingRewardsMetricsDto" }); +export type RewardRateSnapshotDto = { + readonly timestamp: string; + readonly rewardRate: string; }; -export const ActionEventDto = Schema.Struct({ - id: Schema.String.annotate({ - description: "Unique event identifier", - examples: ["event_123abc"], - }), - type: Schema.Literals([ - "REDEMPTION_SETTLED", - "REDEMPTION_CANCELLED", - ]).annotate({ - description: "Type of protocol-side event associated with the action", - examples: ["REDEMPTION_SETTLED"], - }), - transactionHash: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Hash of the protocol transaction that produced the event (e.g. the redemption settlement transaction)", +export const RewardRateSnapshotDto = Schema.Struct({ + timestamp: Schema.String.annotate({ + description: "Timestamp of this snapshot (ISO 8601)", + examples: ["2025-07-10T00:00:00.000Z"], }), - occurredAt: Schema.String.annotate({ - description: - "When the event occurred on-chain, falling back to when it was detected if the block is unavailable", - format: "date-time", + rewardRate: Schema.String.annotate({ + description: "Reward rate as a decimal string", + examples: ["0.0312"], }), -}).annotate({ identifier: "ActionEventDto" }); -export type ActionArgumentsDto = { - readonly amount?: string; - readonly amountRaw?: string; - readonly amounts?: ReadonlyArray; - readonly shareAmount?: string; - readonly shareAmountRaw?: string; - readonly validatorAddress?: string; - readonly validatorAddresses?: ReadonlyArray; - readonly providerId?: string; - readonly duration?: number; - readonly inputToken?: string; - readonly inputTokenNetwork?: - | "ethereum" - | "ethereum-goerli" - | "ethereum-holesky" - | "ethereum-sepolia" - | "ethereum-hoodi" - | "arbitrum" - | "base" - | "base-sepolia" - | "gnosis" - | "optimism" - | "polygon" - | "polygon-amoy" - | "starknet" - | "zksync" - | "linea" - | "unichain" - | "plume" - | "monad-testnet" - | "monad" - | "robinhood" - | "robinhood-testnet" - | "avalanche-c" - | "avalanche-c-atomic" - | "avalanche-p" - | "binance" - | "celo" - | "fantom" - | "harmony" - | "moonriver" - | "okc" - | "viction" - | "core" - | "sonic" - | "plasma" - | "katana" - | "hyperevm" - | "tempo" - | "pharos" - | "agoric" - | "akash" - | "axelar" - | "band-protocol" - | "bitsong" - | "canto" - | "chihuahua" - | "comdex" - | "coreum" - | "cosmos" - | "crescent" - | "cronos" - | "cudos" - | "desmos" - | "dydx" - | "evmos" - | "fetch-ai" - | "gravity-bridge" - | "injective" - | "irisnet" - | "juno" - | "kava" - | "ki-network" - | "mars-protocol" - | "nym" - | "okex-chain" - | "onomy" - | "osmosis" - | "persistence" - | "quicksilver" - | "regen" - | "secret" - | "sentinel" - | "sommelier" - | "stafi" - | "stargaze" - | "stride" - | "teritori" - | "tgrade" - | "umee" - | "sei" - | "mantra" - | "celestia" - | "saga" - | "zetachain" - | "dymension" - | "humansai" - | "neutron" - | "polkadot" - | "kusama" - | "westend" - | "bittensor" - | "aptos" - | "binancebeacon" - | "cardano" - | "near" - | "solana" - | "solana-devnet" - | "stellar" - | "stellar-testnet" - | "sui" - | "tezos" - | "tron" - | "ton" - | "ton-testnet" - | "hyperliquid"; - readonly outputToken?: string; - readonly outputTokenNetwork?: +}).annotate({ identifier: "RewardRateSnapshotDto" }); +export type TvlHistoryResponseDto = { + readonly total: number; + readonly offset: number; + readonly limit: number; + readonly yieldId: string; + readonly interval: "day" | "week" | "month"; + readonly from: string; + readonly to: string; +}; +export const TvlHistoryResponseDto = Schema.Struct({ + total: Schema.Number.annotate({ + description: "Total number of items available", + examples: [100], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + offset: Schema.Number.annotate({ + description: "Offset of the current page", + examples: [0], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + limit: Schema.Number.annotate({ + description: "Limit of the current page", + examples: [20], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + yieldId: Schema.String.annotate({ + description: "Unique identifier of the yield", + examples: ["ethereum-usdc-aave-v3"], + }), + interval: Schema.Literals(["day", "week", "month"]).annotate({ + description: "Sampling interval used for this response", + examples: ["day"], + }), + from: Schema.String.annotate({ + description: "Start of the returned date range (ISO 8601)", + examples: ["2025-06-12T00:00:00.000Z"], + }), + to: Schema.String.annotate({ + description: "End of the returned date range (ISO 8601)", + examples: ["2025-07-12T00:00:00.000Z"], + }), +}).annotate({ identifier: "TvlHistoryResponseDto" }); +export type CampaignStatus = "draft" | "active" | "paused" | "ended"; +export const CampaignStatus = Schema.Literals([ + "draft", + "active", + "paused", + "ended", +]).annotate({ identifier: "CampaignStatus" }); +export type TransactionDto = { + readonly id: string; + readonly title: string; + readonly network: | "ethereum" | "ethereum-goerli" | "ethereum-holesky" @@ -2071,6 +1649,7 @@ export type ActionArgumentsDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -2154,621 +1733,527 @@ export type ActionArgumentsDto = { | "ton" | "ton-testnet" | "hyperliquid"; - readonly subnetId?: number; - readonly tronResource?: "BANDWIDTH" | "ENERGY"; - readonly feeConfigurationId?: string; - readonly cosmosPubKey?: string; - readonly tezosPubKey?: string; - readonly cAddressBech?: string; - readonly pAddressBech?: string; - readonly executionMode?: "individual" | "batched"; - readonly ledgerWalletApiCompatible?: boolean; - readonly useMaxAmount?: boolean; - readonly useInstantExecution?: boolean; - readonly useAutoClaim?: boolean; - readonly skipPrechecks?: boolean; - readonly useMaxAllowance?: boolean; - readonly feePayerAddress?: string; - readonly receiverAddress?: string; - readonly rangeMin?: string; - readonly rangeMax?: string; - readonly percentage?: number; - readonly tokenId?: string; -}; -export const ActionArgumentsDto = Schema.Struct({ - amount: Schema.optionalKey( - Schema.String.annotate({ - description: - 'Amount in human-readable token units, not the smallest denomination. For example, "1.500000" for 1.5 USDC (6 decimals) or "0.01" for 0.01 ETH (18 decimals). Precision up to the token\'s decimal places is supported. Mutually exclusive with amountRaw.', - examples: ["1.500000"], - }) - ), - amountRaw: Schema.optionalKey( - Schema.String.annotate({ - description: - 'Amount in the smallest denomination (wei for ETH, satoshi for BTC, etc.). For example, "1500000" for 1.5 USDC (6 decimals) or "10000000000000000" for 0.01 ETH (18 decimals). Mutually exclusive with amount.', - examples: ["1000000000000000000"], - }) - ), - amounts: Schema.optionalKey( - Schema.Array(Schema.String).annotate({ - description: - "Amounts in human-readable token units, not the smallest denomination. Precision up to the token's decimal places is supported.", - examples: [["1.500000", "2.000000"]], - }) - ), - shareAmount: Schema.optionalKey( - Schema.String.annotate({ - description: "Share amount to withdraw", - examples: ["1.500000"], - }) - ), - shareAmountRaw: Schema.optionalKey( - Schema.String.annotate({ - description: "Share amount to withdraw in raw decimals", - examples: ["1500000"], - }) - ), - validatorAddress: Schema.optionalKey( - Schema.String.annotate({ - description: "Validator address for single validator selection", - examples: ["cosmosvaloper1..."], - }) - ), - validatorAddresses: Schema.optionalKey( - Schema.Array(Schema.String).annotate({ - description: "Multiple validator addresses", - examples: [["cosmosvaloper1...", "cosmosvaloper2..."]], - }) - ), - providerId: Schema.optionalKey( - Schema.String.annotate({ - description: "Provider ID for Ethereum native staking", - examples: ["kiln"], - }) - ), - duration: Schema.optionalKey( - Schema.Number.annotate({ - description: "Duration for Avalanche native staking (in seconds)", - examples: [1209600], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })) - ), - inputToken: Schema.optionalKey( - Schema.String.annotate({ - description: - 'Token for deposits. Use "0x" for native token or provide the token address. For cross-chain deposits, also provide inputTokenNetwork.', - examples: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"], - }) - ), - inputTokenNetwork: Schema.optionalKey( - Schema.Literals([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "plume", - "monad-testnet", - "monad", - "robinhood", - "robinhood-testnet", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "tempo", - "pharos", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "aptos", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", + readonly status: + | "NOT_FOUND" + | "CREATED" + | "BLOCKED" + | "WAITING_FOR_SIGNATURE" + | "SIGNED" + | "BROADCASTED" + | "PENDING" + | "CONFIRMED" + | "FAILED" + | "SKIPPED"; + readonly type: + | "SWAP" + | "DEPOSIT" + | "APPROVAL" + | "STAKE" + | "SET_OPERATOR" + | "CLAIM_UNSTAKED" + | "CLAIM_REWARDS" + | "RESTAKE_REWARDS" + | "UNSTAKE" + | "SPLIT" + | "MERGE" + | "LOCK" + | "UNLOCK" + | "SUPPLY" + | "ADD_LIQUIDITY" + | "REMOVE_LIQUIDITY" + | "BRIDGE" + | "VOTE" + | "REVOKE" + | "RESTAKE" + | "REBOND" + | "WITHDRAW" + | "WITHDRAW_ALL" + | "CREATE_ACCOUNT" + | "REVEAL" + | "MIGRATE" + | "DELEGATE" + | "UNDELEGATE" + | "UTXO_P_TO_C_IMPORT" + | "UTXO_C_TO_P_IMPORT" + | "WRAP" + | "UNWRAP" + | "UNFREEZE_LEGACY" + | "UNFREEZE_LEGACY_BANDWIDTH" + | "UNFREEZE_LEGACY_ENERGY" + | "UNFREEZE_BANDWIDTH" + | "UNFREEZE_ENERGY" + | "FREEZE_BANDWIDTH" + | "FREEZE_ENERGY" + | "UNDELEGATE_BANDWIDTH" + | "UNDELEGATE_ENERGY" + | "P2P_NODE_REQUEST" + | "CREATE_EIGENPOD" + | "VERIFY_WITHDRAW_CREDENTIALS" + | "START_CHECKPOINT" + | "VERIFY_CHECKPOINT_PROOFS" + | "QUEUE_WITHDRAWALS" + | "COMPLETE_QUEUED_WITHDRAWALS" + | "LZ_DEPOSIT" + | "LZ_WITHDRAW" + | "LUGANODES_PROVISION" + | "LUGANODES_EXIT_REQUEST" + | "INFSTONES_PROVISION" + | "INFSTONES_EXIT_REQUEST" + | "INFSTONES_CLAIM_REQUEST" + | "BATCH"; + readonly hash: string | null; + readonly createdAt: string; + readonly broadcastedAt: string | null; + readonly signedTransaction: string | null; + readonly unsignedTransaction: + | string + | { readonly [x: string]: Schema.Json } + | null; + readonly annotatedTransaction?: { readonly [x: string]: Schema.Json } | null; + readonly structuredTransaction?: { readonly [x: string]: Schema.Json } | null; + readonly stepIndex?: number; + readonly description?: string; + readonly error?: string | null; + readonly gasEstimate?: string; + readonly explorerUrl?: string | null; + readonly isMessage?: boolean; +}; +export const TransactionDto = Schema.Struct({ + id: Schema.String.annotate({ + description: "Unique transaction identifier", + examples: ["tx_123abc"], + }), + title: Schema.String.annotate({ + description: "Display title for the transaction", + examples: ["Approve USDC"], + }), + network: Schema.Literals([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "plume", + "monad-testnet", + "monad", + "robinhood", + "robinhood-testnet", + "arc-testnet", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "tempo", + "pharos", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ]).annotate({ + description: "Network this transaction is for", + examples: ["ethereum"], + }), + status: Schema.Literals([ + "NOT_FOUND", + "CREATED", + "BLOCKED", + "WAITING_FOR_SIGNATURE", + "SIGNED", + "BROADCASTED", + "PENDING", + "CONFIRMED", + "FAILED", + "SKIPPED", + ]).annotate({ + description: "Current status of the transaction", + examples: ["PENDING"], + }), + type: Schema.Literals([ + "SWAP", + "DEPOSIT", + "APPROVAL", + "STAKE", + "SET_OPERATOR", + "CLAIM_UNSTAKED", + "CLAIM_REWARDS", + "RESTAKE_REWARDS", + "UNSTAKE", + "SPLIT", + "MERGE", + "LOCK", + "UNLOCK", + "SUPPLY", + "ADD_LIQUIDITY", + "REMOVE_LIQUIDITY", + "BRIDGE", + "VOTE", + "REVOKE", + "RESTAKE", + "REBOND", + "WITHDRAW", + "WITHDRAW_ALL", + "CREATE_ACCOUNT", + "REVEAL", + "MIGRATE", + "DELEGATE", + "UNDELEGATE", + "UTXO_P_TO_C_IMPORT", + "UTXO_C_TO_P_IMPORT", + "WRAP", + "UNWRAP", + "UNFREEZE_LEGACY", + "UNFREEZE_LEGACY_BANDWIDTH", + "UNFREEZE_LEGACY_ENERGY", + "UNFREEZE_BANDWIDTH", + "UNFREEZE_ENERGY", + "FREEZE_BANDWIDTH", + "FREEZE_ENERGY", + "UNDELEGATE_BANDWIDTH", + "UNDELEGATE_ENERGY", + "P2P_NODE_REQUEST", + "CREATE_EIGENPOD", + "VERIFY_WITHDRAW_CREDENTIALS", + "START_CHECKPOINT", + "VERIFY_CHECKPOINT_PROOFS", + "QUEUE_WITHDRAWALS", + "COMPLETE_QUEUED_WITHDRAWALS", + "LZ_DEPOSIT", + "LZ_WITHDRAW", + "LUGANODES_PROVISION", + "LUGANODES_EXIT_REQUEST", + "INFSTONES_PROVISION", + "INFSTONES_EXIT_REQUEST", + "INFSTONES_CLAIM_REQUEST", + "BATCH", + ]).annotate({ + description: "Type of transaction operation", + examples: ["STAKE"], + }), + hash: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Transaction hash (available after broadcast)", + examples: ["0x1234567890abcdef..."], + }), + createdAt: Schema.String.annotate({ + description: "When the transaction was created", + format: "date-time", + }), + broadcastedAt: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "When the transaction was broadcasted to the network", + }), + signedTransaction: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Signed transaction data (ready for broadcast)", + }), + unsignedTransaction: Schema.Union( + [ + Schema.String.annotate({ description: "Serialized transaction data" }), + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ).annotate({ description: "Transaction object (for non-EVM chains)" }), + Schema.Null, + ], + { mode: "oneOf" } + ).annotate({ + description: "The unsigned transaction data to be signed by the wallet", + examples: [ + "0x02f87082012a022f2f83018000947a250d5630b4cf539739df2c5dacb4c659f2488d880de0b6b3a764000080c080a0ef0de6c7b46fc75dd6cb86dccc3cfd731c2bdf6f3d736557240c3646c6fe01a6a07cd60b58dfe01847249dfdd7950ba0d045dded5bbe410b07a015a0ed34e5e00d", + ], + }), + annotatedTransaction: Schema.optionalKey( + Schema.Union([ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), + Schema.Null, ]).annotate({ description: - "Network for the input token. Required for cross-chain deposits when the token is on a different network than the vault.", - }) - ), - outputToken: Schema.optionalKey( - Schema.String.annotate({ - description: - 'Token for withdrawals. Use "0x" for native token or provide the token address. For cross-chain withdrawals, also provide outputTokenNetwork.', - examples: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"], + "Human-readable breakdown of the transaction for display purposes", + examples: [ + { method: "stake", inputs: { amount: "1000000000000000000" } }, + ], }) ), - outputTokenNetwork: Schema.optionalKey( - Schema.Literals([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "plume", - "monad-testnet", - "monad", - "robinhood", - "robinhood-testnet", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "tempo", - "pharos", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "aptos", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", + structuredTransaction: Schema.optionalKey( + Schema.Union([ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), + Schema.Null, ]).annotate({ description: - "Network for the output token. Required for cross-chain withdrawals when the destination is on a different network than the vault.", - }) - ), - subnetId: Schema.optionalKey( - Schema.Number.annotate({ - description: "Subnet ID for Bittensor staking", - examples: [1], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })) - ), - tronResource: Schema.optionalKey( - Schema.Literals(["BANDWIDTH", "ENERGY"]).annotate({ - description: "Tron resource type for Tron staking", - }) - ), - feeConfigurationId: Schema.optionalKey( - Schema.String.annotate({ - description: "Fee configuration ID for custom fee settings", - examples: ["custom-fee-config-1"], - }) - ), - cosmosPubKey: Schema.optionalKey( - Schema.String.annotate({ - description: "Cosmos public key for Cosmos staking", - examples: ["cosmospub1..."], - }) - ), - tezosPubKey: Schema.optionalKey( - Schema.String.annotate({ - description: "Tezos public key for Tezos staking", - examples: ["edpk..."], - }) - ), - cAddressBech: Schema.optionalKey( - Schema.String.annotate({ - description: "Avalanche C-chain address", - examples: ["0x123..."], - }) - ), - pAddressBech: Schema.optionalKey( - Schema.String.annotate({ - description: "Avalanche P-chain address", - examples: ["P-avax1..."], - }) - ), - executionMode: Schema.optionalKey( - Schema.Literals(["individual", "batched"]).annotate({ - description: "Transaction execution mode", - examples: ["individual"], - }) - ), - ledgerWalletApiCompatible: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "Transactions should have Ledger wallet API compatibility for hardware wallet users", - examples: [true], - }) - ), - useMaxAmount: Schema.optionalKey( - Schema.Boolean.annotate({ - description: "Use max amount for ERC4626 withdraw", - examples: [true], - }) - ), - useInstantExecution: Schema.optionalKey( - Schema.Boolean.annotate({ - description: "Use instant execution for exit (faster but may have fees)", - examples: [true], - }) - ), - useAutoClaim: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "Authorize the redeem operator to auto-claim settled async redemptions (one-time per wallet)", - examples: [true], - }) - ), - skipPrechecks: Schema.optionalKey( - Schema.Boolean.annotate({ - description: "Skip pre-flight balance and rent checks", - examples: [false], - }) - ), - useMaxAllowance: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "When true, ERC20 approval transactions use the maximum allowance (uint256.max) instead of the exact deposit amount. Useful to avoid repeated approval transactions on subsequent deposits.", - examples: [true], + "Detailed transaction data for client-side validation or simulation", }) ), - feePayerAddress: Schema.optionalKey( - Schema.String.annotate({ - description: - "Fee payer address for gas-sponsored wallets (Solana). When provided, this address is used as the payer for account creation instructions and as the transaction-level fee payer.", - examples: ["7Qo3awoTH4y5Vui1FQwsncq2arYDzUuivdeWhwgnAvVo"], - }) + stepIndex: Schema.optionalKey( + Schema.Number.annotate({ + description: "Zero-based index of the step in the action flow", + examples: [0], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) ), - receiverAddress: Schema.optionalKey( + description: Schema.optionalKey( Schema.String.annotate({ - description: - "Receiver wallet address: ERC4626 vault flows, or on Solana the address for tokens after an optional post-exit swap", + description: "User-friendly description of what this transaction does", + examples: ["Approve USDC for staking"], }) ), - rangeMin: Schema.optionalKey( - Schema.String.annotate({ - description: - "Minimum price bound for concentrated liquidity pools (as decimal string). Must be non-negative (can be 0) and less than rangeMax.", - examples: ["0.0"], + error: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Error message if the transaction failed", }) ), - rangeMax: Schema.optionalKey( + gasEstimate: Schema.optionalKey( Schema.String.annotate({ - description: - "Maximum price bound for concentrated liquidity pools (as decimal string). Must be positive and greater than rangeMin.", - examples: ["1.0"], + description: "Estimated gas cost for the transaction", + examples: ["21000"], }) ), - percentage: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Percentage of liquidity to exit (0-100). Required for partial exits from liquidity positions.", - examples: [50], + explorerUrl: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Link to the blockchain explorer for this transaction", + examples: ["https://etherscan.io/tx/0x1234..."], }) - .check(Schema.isFinite().annotate({ expected: "a finite number" })) - .check( - Schema.isGreaterThanOrEqualTo(0).annotate({ - expected: "a value greater than or equal to 0", - }) - ) - .check( - Schema.isLessThanOrEqualTo(100).annotate({ - expected: "a value less than or equal to 100", - }) - ) ), - tokenId: Schema.optionalKey( - Schema.String.annotate({ + isMessage: Schema.optionalKey( + Schema.Boolean.annotate({ description: - "NFT token ID for concentrated liquidity positions. Required for exiting specific positions.", - examples: ["12345"], + "Whether this transaction is a message rather than a value transfer", + examples: [false], }) ), -}).annotate({ identifier: "ActionArgumentsDto" }); -export type TransactionType = - | "SWAP" - | "DEPOSIT" - | "APPROVAL" - | "STAKE" - | "SET_OPERATOR" - | "CLAIM_UNSTAKED" - | "CLAIM_REWARDS" - | "RESTAKE_REWARDS" - | "UNSTAKE" - | "SPLIT" - | "MERGE" - | "LOCK" - | "UNLOCK" - | "SUPPLY" - | "ADD_LIQUIDITY" - | "REMOVE_LIQUIDITY" - | "BRIDGE" - | "VOTE" - | "REVOKE" - | "RESTAKE" - | "REBOND" - | "WITHDRAW" - | "WITHDRAW_ALL" - | "CREATE_ACCOUNT" - | "REVEAL" - | "MIGRATE" - | "DELEGATE" - | "UNDELEGATE" - | "UTXO_P_TO_C_IMPORT" - | "UTXO_C_TO_P_IMPORT" - | "WRAP" - | "UNWRAP" - | "UNFREEZE_LEGACY" - | "UNFREEZE_LEGACY_BANDWIDTH" - | "UNFREEZE_LEGACY_ENERGY" - | "UNFREEZE_BANDWIDTH" - | "UNFREEZE_ENERGY" - | "FREEZE_BANDWIDTH" - | "FREEZE_ENERGY" - | "UNDELEGATE_BANDWIDTH" - | "UNDELEGATE_ENERGY" - | "P2P_NODE_REQUEST" - | "CREATE_EIGENPOD" - | "VERIFY_WITHDRAW_CREDENTIALS" - | "START_CHECKPOINT" - | "VERIFY_CHECKPOINT_PROOFS" - | "QUEUE_WITHDRAWALS" - | "COMPLETE_QUEUED_WITHDRAWALS" - | "LZ_DEPOSIT" - | "LZ_WITHDRAW" - | "LUGANODES_PROVISION" - | "LUGANODES_EXIT_REQUEST" - | "INFSTONES_PROVISION" - | "INFSTONES_EXIT_REQUEST" - | "INFSTONES_CLAIM_REQUEST" - | "BATCH"; -export const TransactionType = Schema.Literals([ - "SWAP", - "DEPOSIT", - "APPROVAL", - "STAKE", - "SET_OPERATOR", - "CLAIM_UNSTAKED", - "CLAIM_REWARDS", - "RESTAKE_REWARDS", - "UNSTAKE", - "SPLIT", - "MERGE", - "LOCK", - "UNLOCK", - "SUPPLY", - "ADD_LIQUIDITY", - "REMOVE_LIQUIDITY", - "BRIDGE", - "VOTE", - "REVOKE", - "RESTAKE", - "REBOND", - "WITHDRAW", - "WITHDRAW_ALL", - "CREATE_ACCOUNT", - "REVEAL", - "MIGRATE", - "DELEGATE", - "UNDELEGATE", - "UTXO_P_TO_C_IMPORT", - "UTXO_C_TO_P_IMPORT", - "WRAP", - "UNWRAP", - "UNFREEZE_LEGACY", - "UNFREEZE_LEGACY_BANDWIDTH", - "UNFREEZE_LEGACY_ENERGY", - "UNFREEZE_BANDWIDTH", - "UNFREEZE_ENERGY", - "FREEZE_BANDWIDTH", - "FREEZE_ENERGY", - "UNDELEGATE_BANDWIDTH", - "UNDELEGATE_ENERGY", - "P2P_NODE_REQUEST", - "CREATE_EIGENPOD", - "VERIFY_WITHDRAW_CREDENTIALS", - "START_CHECKPOINT", - "VERIFY_CHECKPOINT_PROOFS", - "QUEUE_WITHDRAWALS", - "COMPLETE_QUEUED_WITHDRAWALS", - "LZ_DEPOSIT", - "LZ_WITHDRAW", - "LUGANODES_PROVISION", - "LUGANODES_EXIT_REQUEST", - "INFSTONES_PROVISION", - "INFSTONES_EXIT_REQUEST", - "INFSTONES_CLAIM_REQUEST", - "BATCH", -]).annotate({ identifier: "TransactionType" }); -export type SubmitHashDto = { readonly hash: string }; -export const SubmitHashDto = Schema.Struct({ - hash: Schema.String.annotate({ - description: "Transaction hash from the blockchain", - examples: [ - "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", - ], - }), -}).annotate({ identifier: "SubmitHashDto" }); -export type SubmitTransactionDto = { readonly signedTransaction: string }; -export const SubmitTransactionDto = Schema.Struct({ - signedTransaction: Schema.String.annotate({ - description: "Encoded signed transaction to submit to the blockchain", - examples: [ - "0aba010aa0010a232f636f736d6f732e7374616b696e672e763162657461312e4d736744656c656761746512790a2a696e6a316a61366664646e6e33727272677137646d6a757a6b71363279376d68346675346b6e656d37791231696e6a76616c6f7065723167346436646d766e706737773779756779366b706c6e6470376a70666d66336b7274736368701a180a03696e6a121131303030303030303030303030303030301215766961205374616b654b6974204349442d31303039129e010a7e0a740a2d2f696e6a6563746976652e63727970746f2e763162657461312e657468736563703235366b312e5075624b657912430a41042aec99dce37ea3d8f11b44da62bce0e885f0ba5b309382954babec76eb138cb0bb84f4f24b9f63143f2ce66923b2dd3ee55475e680a7b992b9cbc17941f6486312040a0208011802121c0a160a03696e6a120f31383732303030303030303030303010d0b4471a0b696e6a6563746976652d312092c35b", - ], - }), -}).annotate({ identifier: "SubmitTransactionDto" }); -export type KycStatusResponseDto = { - readonly kycStatus: - | "not_required" - | "not_started" - | "pending" - | "approved" - | "rejected"; - readonly authorizeUrl?: string; +}).annotate({ identifier: "TransactionDto" }); +export type ActionEventDto = { + readonly id: string; + readonly type: "REDEMPTION_SETTLED" | "REDEMPTION_CANCELLED"; + readonly transactionHash: string | null; + readonly occurredAt: string; }; -export const KycStatusResponseDto = Schema.Struct({ - kycStatus: Schema.Literals([ - "not_required", - "not_started", - "pending", - "approved", - "rejected", +export const ActionEventDto = Schema.Struct({ + id: Schema.String.annotate({ + description: "Unique event identifier", + examples: ["event_123abc"], + }), + type: Schema.Literals([ + "REDEMPTION_SETTLED", + "REDEMPTION_CANCELLED", ]).annotate({ - description: "Normalized KYC status for the address on this yield", - examples: ["not_required"], + description: "Type of protocol-side event associated with the action", + examples: ["REDEMPTION_SETTLED"], }), - authorizeUrl: Schema.optionalKey( - Schema.String.annotate({ - description: "Issuer's KYC portal URL, when applicable", - }) - ), -}).annotate({ identifier: "KycStatusResponseDto" }); -export type NetworkDto = { - readonly id: + transactionHash: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: + "Hash of the protocol transaction that produced the event (e.g. the redemption settlement transaction)", + }), + occurredAt: Schema.String.annotate({ + description: + "When the event occurred on-chain, falling back to when it was detected if the block is unavailable", + format: "date-time", + }), +}).annotate({ identifier: "ActionEventDto" }); +export type ActionArgumentsDto = { + readonly amount?: string; + readonly amountRaw?: string; + readonly amounts?: ReadonlyArray; + readonly shareAmount?: string; + readonly shareAmountRaw?: string; + readonly validatorAddress?: string; + readonly validatorAddresses?: ReadonlyArray; + readonly providerId?: string; + readonly duration?: number; + readonly inputToken?: string; + readonly inputTokenNetwork?: + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; + readonly outputToken?: string; + readonly outputTokenNetwork?: | "ethereum" | "ethereum-goerli" | "ethereum-holesky" @@ -2790,6 +2275,7 @@ export type NetworkDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -2873,604 +2359,1043 @@ export type NetworkDto = { | "ton" | "ton-testnet" | "hyperliquid"; - readonly name: string; - readonly category: "evm" | "cosmos" | "substrate" | "misc"; - readonly logoURI: string; -}; -export const NetworkDto = Schema.Struct({ - id: Schema.Literals([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "plume", - "monad-testnet", - "monad", - "robinhood", - "robinhood-testnet", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "tempo", - "pharos", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "aptos", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", - ]).annotate({ - description: "The network identifier", - examples: ["ethereum"], - }), - name: Schema.String.annotate({ - description: "Human-readable display name of the network", - examples: ["Ethereum"], - }), - category: Schema.Literals(["evm", "cosmos", "substrate", "misc"]).annotate({ - description: "The category of the network", - examples: ["evm"], - }), - logoURI: Schema.String.annotate({ - description: "Logo URI for the network", - examples: ["https://assets.stakek.it/networks/ethereum.svg"], - }), -}).annotate({ identifier: "NetworkDto" }); -export type ProviderDto = { - readonly name: string; - readonly id: string; - readonly logoURI: string; - readonly description: string; - readonly website: string; - readonly tvlUsd: string | null; - readonly type: "protocol" | "validator_provider"; - readonly references?: ReadonlyArray | null; + readonly subnetId?: number; + readonly tronResource?: "BANDWIDTH" | "ENERGY"; + readonly feeConfigurationId?: string; + readonly cosmosPubKey?: string; + readonly tezosPubKey?: string; + readonly cAddressBech?: string; + readonly pAddressBech?: string; + readonly executionMode?: "individual" | "batched"; + readonly ledgerWalletApiCompatible?: boolean; + readonly useMaxAmount?: boolean; + readonly useInstantExecution?: boolean; + readonly useAutoClaim?: boolean; + readonly skipPrechecks?: boolean; + readonly useMaxAllowance?: boolean; + readonly feePayerAddress?: string; + readonly receiverAddress?: string; + readonly rangeMin?: string; + readonly rangeMax?: string; + readonly percentage?: number; + readonly tokenId?: string; }; -export const ProviderDto = Schema.Struct({ - name: Schema.String.annotate({ - description: "Provider name", - examples: ["Morpho"], - }), - id: Schema.String.annotate({ - description: "Provider ID", - examples: ["morpho"], - }), - logoURI: Schema.String.annotate({ - description: "Provider logo URI", - examples: ["https://morpho.xyz/logo.png"], - }), - description: Schema.String.annotate({ - description: "Short description of the provider", - examples: ["A peer-to-peer DeFi lending protocol"], - }), - website: Schema.String.annotate({ - description: "Provider website", - examples: ["https://morpho.xyz"], - }), - tvlUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Total TVL across the entire provider in USD", - examples: ["10,200,000"], - }), - type: Schema.Literals(["protocol", "validator_provider"]).annotate({ - description: "Type of provider (protocol or validator provider)", - examples: ["protocol"], - }), - references: Schema.optionalKey( - Schema.Union([Schema.Array(Schema.String), Schema.Null]).annotate({ - description: "Optional social/media references or audit links", +export const ActionArgumentsDto = Schema.Struct({ + amount: Schema.optionalKey( + Schema.String.annotate({ + description: + 'Amount in human-readable token units, not the smallest denomination. For example, "1.500000" for 1.5 USDC (6 decimals) or "0.01" for 0.01 ETH (18 decimals). Precision up to the token\'s decimal places is supported. Mutually exclusive with amountRaw.', + examples: ["1.500000"], + }) + ), + amountRaw: Schema.optionalKey( + Schema.String.annotate({ + description: + 'Amount in the smallest denomination (wei for ETH, satoshi for BTC, etc.). For example, "1500000" for 1.5 USDC (6 decimals) or "10000000000000000" for 0.01 ETH (18 decimals). Mutually exclusive with amount.', + examples: ["1000000000000000000"], + }) + ), + amounts: Schema.optionalKey( + Schema.Array(Schema.String).annotate({ + description: + "Amounts in human-readable token units, not the smallest denomination. Precision up to the token's decimal places is supported.", + examples: [["1.500000", "2.000000"]], + }) + ), + shareAmount: Schema.optionalKey( + Schema.String.annotate({ + description: "Share amount to withdraw", + examples: ["1.500000"], + }) + ), + shareAmountRaw: Schema.optionalKey( + Schema.String.annotate({ + description: "Share amount to withdraw in raw decimals", + examples: ["1500000"], + }) + ), + validatorAddress: Schema.optionalKey( + Schema.String.annotate({ + description: "Validator address for single validator selection", + examples: ["cosmosvaloper1..."], + }) + ), + validatorAddresses: Schema.optionalKey( + Schema.Array(Schema.String).annotate({ + description: "Multiple validator addresses", + examples: [["cosmosvaloper1...", "cosmosvaloper2..."]], + }) + ), + providerId: Schema.optionalKey( + Schema.String.annotate({ + description: "Provider ID for Ethereum native staking", + examples: ["kiln"], + }) + ), + duration: Schema.optionalKey( + Schema.Number.annotate({ + description: "Duration for Avalanche native staking (in seconds)", + examples: [1209600], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + inputToken: Schema.optionalKey( + Schema.String.annotate({ + description: + 'Token for deposits. Use "0x" for native token or provide the token address. For cross-chain deposits, also provide inputTokenNetwork.', + examples: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"], + }) + ), + inputTokenNetwork: Schema.optionalKey( + Schema.Literals([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "plume", + "monad-testnet", + "monad", + "robinhood", + "robinhood-testnet", + "arc-testnet", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "tempo", + "pharos", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ]).annotate({ + description: + "Network for the input token. Required for cross-chain deposits when the token is on a different network than the vault.", + }) + ), + outputToken: Schema.optionalKey( + Schema.String.annotate({ + description: + 'Token for withdrawals. Use "0x" for native token or provide the token address. For cross-chain withdrawals, also provide outputTokenNetwork.', + examples: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"], + }) + ), + outputTokenNetwork: Schema.optionalKey( + Schema.Literals([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "plume", + "monad-testnet", + "monad", + "robinhood", + "robinhood-testnet", + "arc-testnet", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "tempo", + "pharos", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ]).annotate({ + description: + "Network for the output token. Required for cross-chain withdrawals when the destination is on a different network than the vault.", }) ), -}).annotate({ identifier: "ProviderDto" }); -export type HealthStatus = "OK" | "FAIL"; -export const HealthStatus = Schema.Literals(["OK", "FAIL"]).annotate({ - description: "The health status of the service", - identifier: "HealthStatus", -}); -export type RewardDto = { - readonly rate: number; - readonly rateType: string; - readonly token: TokenDto; - readonly yieldSource: - | "staking" - | "liquid_staking" - | "restaking" - | "protocol_incentive" - | "campaign_incentive" - | "points" - | "lending" - | "mev" - | "real_world_asset_yield" - | "vault"; - readonly description?: string; -}; -export const RewardDto = Schema.Struct({ - rate: Schema.Number.annotate({ - description: "Reward rate as a decimal (e.g. 0.04 = 4%)", - examples: [0.04], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - rateType: Schema.String.annotate({ - description: "Whether this rate is APR or APY", - examples: ["APR"], - }), - token: Schema.suspend((): Schema.Codec => TokenDto).annotate({ - description: "Token received as reward", - }), - yieldSource: Schema.Literals([ - "staking", - "liquid_staking", - "restaking", - "protocol_incentive", - "campaign_incentive", - "points", - "lending", - "mev", - "real_world_asset_yield", - "vault", - ]).annotate({ - description: - "Structured source of yield (e.g. staking, protocol incentive)", - examples: ["protocol_incentive"], - }), - description: Schema.optionalKey( + subnetId: Schema.optionalKey( + Schema.Number.annotate({ + description: "Subnet ID for Bittensor staking", + examples: [1], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + tronResource: Schema.optionalKey( + Schema.Literals(["BANDWIDTH", "ENERGY"]).annotate({ + description: "Tron resource type for Tron staking", + }) + ), + feeConfigurationId: Schema.optionalKey( Schema.String.annotate({ - description: "Optional human-readable description of this reward", - examples: [ - "LDO distributed to incentivize stETH adoption via Lido Boost", - ], + description: "Fee configuration ID for custom fee settings", + examples: ["custom-fee-config-1"], + }) + ), + cosmosPubKey: Schema.optionalKey( + Schema.String.annotate({ + description: "Cosmos public key for Cosmos staking", + examples: ["cosmospub1..."], + }) + ), + tezosPubKey: Schema.optionalKey( + Schema.String.annotate({ + description: "Tezos public key for Tezos staking", + examples: ["edpk..."], + }) + ), + cAddressBech: Schema.optionalKey( + Schema.String.annotate({ + description: "Avalanche C-chain address", + examples: ["0x123..."], + }) + ), + pAddressBech: Schema.optionalKey( + Schema.String.annotate({ + description: "Avalanche P-chain address", + examples: ["P-avax1..."], + }) + ), + executionMode: Schema.optionalKey( + Schema.Literals(["individual", "batched"]).annotate({ + description: "Transaction execution mode", + examples: ["individual"], + }) + ), + ledgerWalletApiCompatible: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "Transactions should have Ledger wallet API compatibility for hardware wallet users", + examples: [true], + }) + ), + useMaxAmount: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "Use max amount for ERC4626 withdraw", + examples: [true], + }) + ), + useInstantExecution: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "Use instant execution for exit (faster but may have fees)", + examples: [true], + }) + ), + useAutoClaim: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "Authorize the redeem operator to auto-claim settled async redemptions (one-time per wallet)", + examples: [true], + }) + ), + skipPrechecks: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "Skip pre-flight balance and rent checks", + examples: [false], + }) + ), + useMaxAllowance: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "When true, ERC20 approval transactions use the maximum allowance (uint256.max) instead of the exact deposit amount. Useful to avoid repeated approval transactions on subsequent deposits.", + examples: [true], + }) + ), + feePayerAddress: Schema.optionalKey( + Schema.String.annotate({ + description: + "Fee payer address for gas-sponsored wallets (Solana). When provided, this address is used as the payer for account creation instructions and as the transaction-level fee payer.", + examples: ["7Qo3awoTH4y5Vui1FQwsncq2arYDzUuivdeWhwgnAvVo"], + }) + ), + receiverAddress: Schema.optionalKey( + Schema.String.annotate({ + description: + "Receiver wallet address: ERC4626 vault flows, or on Solana the address for tokens after an optional post-exit swap", + }) + ), + rangeMin: Schema.optionalKey( + Schema.String.annotate({ + description: + "Minimum price bound for concentrated liquidity pools (as decimal string). Must be non-negative (can be 0) and less than rangeMax.", + examples: ["0.0"], + }) + ), + rangeMax: Schema.optionalKey( + Schema.String.annotate({ + description: + "Maximum price bound for concentrated liquidity pools (as decimal string). Must be positive and greater than rangeMin.", + examples: ["1.0"], + }) + ), + percentage: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Percentage of liquidity to exit (0-100). Required for partial exits from liquidity positions.", + examples: [50], + }) + .check(Schema.isFinite().annotate({ expected: "a finite number" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + .check( + Schema.isLessThanOrEqualTo(100).annotate({ + expected: "a value less than or equal to 100", + }) + ) + ), + tokenId: Schema.optionalKey( + Schema.String.annotate({ + description: + "NFT token ID for concentrated liquidity positions. Required for exiting specific positions.", + examples: ["12345"], }) ), -}).annotate({ identifier: "RewardDto" }); -export type PricePerShareStateDto = { - readonly price: number; - readonly shareToken: TokenDto; - readonly quoteToken: TokenDto; -}; -export const PricePerShareStateDto = Schema.Struct({ - price: Schema.Number.annotate({ - description: - "Price per share for the yield (e.g., LP token price, vault share price)", - examples: [1.05], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - shareToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ - description: "Share token (the token you own shares of)", - }), - quoteToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ - description: "Quote token (the token the price is denominated in)", - }), -}).annotate({ identifier: "PricePerShareStateDto" }); -export type ConcentratedLiquidityPoolStateDto = { - readonly baseApr: number; - readonly price: number; - readonly tickSpacing: number; - readonly minTick: number; - readonly maxTick: number; - readonly volume24hUsd: number | null; - readonly fee24hUsd: number | null; - readonly tvlUsd: number | null; - readonly feeTier: number; - readonly baseToken: TokenDto; - readonly quoteToken: TokenDto; -}; -export const ConcentratedLiquidityPoolStateDto = Schema.Struct({ - baseApr: Schema.Number.annotate({ - description: "Full-range trading APR (24h or rolling)", - examples: [0.12], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - price: Schema.Number.annotate({ - description: "Current mid-price from the AMM (token1 per token0)", - examples: [3950.42], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - tickSpacing: Schema.Number.annotate({ - description: "Tick spacing required so UI can snap ranges", - examples: [50], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - minTick: Schema.Number.annotate({ - description: "Minimum tick bound for the pool", - examples: [-887272], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - maxTick: Schema.Number.annotate({ - description: "Maximum tick bound for the pool", - examples: [887272], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - volume24hUsd: Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - Schema.Null, - ]).annotate({ - description: "24-hour trading volume in USD", - examples: [149550871.99], - }), - fee24hUsd: Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - Schema.Null, - ]).annotate({ - description: "24-hour fees earned by LPs in USD", - examples: [14955.09], - }), - tvlUsd: Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - Schema.Null, - ]).annotate({ - description: "Total value locked in USD", - examples: [9213550.2], - }), - feeTier: Schema.Number.annotate({ - description: "Pool fee tier as a decimal (e.g., 0.0005 for 0.05%)", - examples: [0.0005], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - baseToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ - description: "Base token (token0)", - }), - quoteToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ - description: "Quote token (token1)", - }), -}).annotate({ identifier: "ConcentratedLiquidityPoolStateDto" }); -export type TokenWithAvailableYieldsDto = { - readonly token: TokenDto; - readonly availableYields: ReadonlyArray; -}; -export const TokenWithAvailableYieldsDto = Schema.Struct({ - token: Schema.suspend((): Schema.Codec => TokenDto).annotate({ - description: "Token with one or more available enabled yields", +}).annotate({ identifier: "ActionArgumentsDto" }); +export type TransactionType = + | "SWAP" + | "DEPOSIT" + | "APPROVAL" + | "STAKE" + | "SET_OPERATOR" + | "CLAIM_UNSTAKED" + | "CLAIM_REWARDS" + | "RESTAKE_REWARDS" + | "UNSTAKE" + | "SPLIT" + | "MERGE" + | "LOCK" + | "UNLOCK" + | "SUPPLY" + | "ADD_LIQUIDITY" + | "REMOVE_LIQUIDITY" + | "BRIDGE" + | "VOTE" + | "REVOKE" + | "RESTAKE" + | "REBOND" + | "WITHDRAW" + | "WITHDRAW_ALL" + | "CREATE_ACCOUNT" + | "REVEAL" + | "MIGRATE" + | "DELEGATE" + | "UNDELEGATE" + | "UTXO_P_TO_C_IMPORT" + | "UTXO_C_TO_P_IMPORT" + | "WRAP" + | "UNWRAP" + | "UNFREEZE_LEGACY" + | "UNFREEZE_LEGACY_BANDWIDTH" + | "UNFREEZE_LEGACY_ENERGY" + | "UNFREEZE_BANDWIDTH" + | "UNFREEZE_ENERGY" + | "FREEZE_BANDWIDTH" + | "FREEZE_ENERGY" + | "UNDELEGATE_BANDWIDTH" + | "UNDELEGATE_ENERGY" + | "P2P_NODE_REQUEST" + | "CREATE_EIGENPOD" + | "VERIFY_WITHDRAW_CREDENTIALS" + | "START_CHECKPOINT" + | "VERIFY_CHECKPOINT_PROOFS" + | "QUEUE_WITHDRAWALS" + | "COMPLETE_QUEUED_WITHDRAWALS" + | "LZ_DEPOSIT" + | "LZ_WITHDRAW" + | "LUGANODES_PROVISION" + | "LUGANODES_EXIT_REQUEST" + | "INFSTONES_PROVISION" + | "INFSTONES_EXIT_REQUEST" + | "INFSTONES_CLAIM_REQUEST" + | "BATCH"; +export const TransactionType = Schema.Literals([ + "SWAP", + "DEPOSIT", + "APPROVAL", + "STAKE", + "SET_OPERATOR", + "CLAIM_UNSTAKED", + "CLAIM_REWARDS", + "RESTAKE_REWARDS", + "UNSTAKE", + "SPLIT", + "MERGE", + "LOCK", + "UNLOCK", + "SUPPLY", + "ADD_LIQUIDITY", + "REMOVE_LIQUIDITY", + "BRIDGE", + "VOTE", + "REVOKE", + "RESTAKE", + "REBOND", + "WITHDRAW", + "WITHDRAW_ALL", + "CREATE_ACCOUNT", + "REVEAL", + "MIGRATE", + "DELEGATE", + "UNDELEGATE", + "UTXO_P_TO_C_IMPORT", + "UTXO_C_TO_P_IMPORT", + "WRAP", + "UNWRAP", + "UNFREEZE_LEGACY", + "UNFREEZE_LEGACY_BANDWIDTH", + "UNFREEZE_LEGACY_ENERGY", + "UNFREEZE_BANDWIDTH", + "UNFREEZE_ENERGY", + "FREEZE_BANDWIDTH", + "FREEZE_ENERGY", + "UNDELEGATE_BANDWIDTH", + "UNDELEGATE_ENERGY", + "P2P_NODE_REQUEST", + "CREATE_EIGENPOD", + "VERIFY_WITHDRAW_CREDENTIALS", + "START_CHECKPOINT", + "VERIFY_CHECKPOINT_PROOFS", + "QUEUE_WITHDRAWALS", + "COMPLETE_QUEUED_WITHDRAWALS", + "LZ_DEPOSIT", + "LZ_WITHDRAW", + "LUGANODES_PROVISION", + "LUGANODES_EXIT_REQUEST", + "INFSTONES_PROVISION", + "INFSTONES_EXIT_REQUEST", + "INFSTONES_CLAIM_REQUEST", + "BATCH", +]).annotate({ identifier: "TransactionType" }); +export type SubmitHashDto = { readonly hash: string }; +export const SubmitHashDto = Schema.Struct({ + hash: Schema.String.annotate({ + description: "Transaction hash from the blockchain", + examples: [ + "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", + ], }), - availableYields: Schema.Array(Schema.String).annotate({ - description: "Enabled yield IDs available for this token", +}).annotate({ identifier: "SubmitHashDto" }); +export type SubmitTransactionDto = { readonly signedTransaction: string }; +export const SubmitTransactionDto = Schema.Struct({ + signedTransaction: Schema.String.annotate({ + description: "Encoded signed transaction to submit to the blockchain", + examples: [ + "0aba010aa0010a232f636f736d6f732e7374616b696e672e763162657461312e4d736744656c656761746512790a2a696e6a316a61366664646e6e33727272677137646d6a757a6b71363279376d68346675346b6e656d37791231696e6a76616c6f7065723167346436646d766e706737773779756779366b706c6e6470376a70666d66336b7274736368701a180a03696e6a121131303030303030303030303030303030301215766961205374616b654b6974204349442d31303039129e010a7e0a740a2d2f696e6a6563746976652e63727970746f2e763162657461312e657468736563703235366b312e5075624b657912430a41042aec99dce37ea3d8f11b44da62bce0e885f0ba5b309382954babec76eb138cb0bb84f4f24b9f63143f2ce66923b2dd3ee55475e680a7b992b9cbc17941f6486312040a0208011802121c0a160a03696e6a120f31383732303030303030303030303010d0b4471a0b696e6a6563746976652d312092c35b", + ], }), -}).annotate({ identifier: "TokenWithAvailableYieldsDto" }); -export type YieldFeeConfigurationDto = { - readonly id: string; - readonly default: boolean; - readonly managementFeeBps?: number | null; - readonly performanceFeeBps?: number | null; - readonly depositFeeBps?: number | null; - readonly allocatorVaultContractAddress?: string | null; - readonly statistics?: YieldStatisticsDto; +}).annotate({ identifier: "SubmitTransactionDto" }); +export type KycStatusResponseDto = { + readonly kycStatus: + | "not_required" + | "not_started" + | "pending" + | "approved" + | "rejected"; + readonly authorizeUrl?: string; }; -export const YieldFeeConfigurationDto = Schema.Struct({ - id: Schema.String.annotate({ - description: "Fee configuration identifier", - examples: ["66f299cd-aaaa-bbbb-cccc-d1f26e3a02db"], - }), - default: Schema.Boolean.annotate({ - description: - "Whether this is the default fee configuration for the integration", - examples: [true], +export const KycStatusResponseDto = Schema.Struct({ + kycStatus: Schema.Literals([ + "not_required", + "not_started", + "pending", + "approved", + "rejected", + ]).annotate({ + description: "Normalized KYC status for the address on this yield", + examples: ["not_required"], }), - managementFeeBps: Schema.optionalKey( - Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - Schema.Null, - ]).annotate({ - description: "Management fee in basis points", - examples: [100], - }) - ), - performanceFeeBps: Schema.optionalKey( - Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - Schema.Null, - ]).annotate({ - description: "Performance fee in basis points", - examples: [1000], - }) - ), - depositFeeBps: Schema.optionalKey( - Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - Schema.Null, - ]).annotate({ description: "Deposit fee in basis points", examples: [0] }) - ), - allocatorVaultContractAddress: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Partner allocator vault contract address", - examples: ["0x80ac24aa929eaf5013f6436cda2a7ba190f5cc0b"], - }) - ), - statistics: Schema.optionalKey( - Schema.suspend( - (): Schema.Codec => YieldStatisticsDto - ).annotate({ - description: - "Partner-scoped metrics for assets that entered through this fee configuration allocator vault", + authorizeUrl: Schema.optionalKey( + Schema.String.annotate({ + description: "Issuer's KYC portal URL, when applicable", }) ), -}).annotate({ identifier: "YieldFeeConfigurationDto" }); -export type YieldRiskSummaryDto = { - readonly ratings: ReadonlyArray; +}).annotate({ identifier: "KycStatusResponseDto" }); +export type NetworkDto = { + readonly id: + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; + readonly name: string; + readonly category: "evm" | "cosmos" | "substrate" | "misc"; + readonly logoURI: string; }; -export const YieldRiskSummaryDto = Schema.Struct({ - ratings: Schema.Array(YieldRiskEntryDto).annotate({ - description: "Top-level rating entries by provider", +export const NetworkDto = Schema.Struct({ + id: Schema.Literals([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "plume", + "monad-testnet", + "monad", + "robinhood", + "robinhood-testnet", + "arc-testnet", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "tempo", + "pharos", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ]).annotate({ + description: "The network identifier", + examples: ["ethereum"], }), -}).annotate({ identifier: "YieldRiskSummaryDto" }); -export type YieldMetadataDto = { + name: Schema.String.annotate({ + description: "Human-readable display name of the network", + examples: ["Ethereum"], + }), + category: Schema.Literals(["evm", "cosmos", "substrate", "misc"]).annotate({ + description: "The category of the network", + examples: ["evm"], + }), + logoURI: Schema.String.annotate({ + description: "Logo URI for the network", + examples: ["https://assets.stakek.it/networks/ethereum.svg"], + }), +}).annotate({ identifier: "NetworkDto" }); +export type ProviderDto = { readonly name: string; + readonly id: string; readonly logoURI: string; readonly description: string; - readonly documentation: string; - readonly underMaintenance: boolean; - readonly deprecated: boolean; - readonly supportedStandards: ReadonlyArray; - readonly supportsCampaigns: boolean; + readonly website: string; + readonly tvlUsd: string | null; + readonly type: "protocol" | "validator_provider"; + readonly references?: ReadonlyArray | null; }; -export const YieldMetadataDto = Schema.Struct({ +export const ProviderDto = Schema.Struct({ name: Schema.String.annotate({ - description: "Display name of the yield opportunity", - examples: ["Lido Staking"], + description: "Provider name", + examples: ["Morpho"], + }), + id: Schema.String.annotate({ + description: "Provider ID", + examples: ["morpho"], }), logoURI: Schema.String.annotate({ - description: "Yield opportunity logo URI", - examples: ["https://lido.fi/logo.png"], + description: "Provider logo URI", + examples: ["https://morpho.xyz/logo.png"], }), description: Schema.String.annotate({ - description: - "Markdown-supported short description of this yield opportunity, including where rewards come from.", - examples: [ - "Stake ETH with Lido to earn auto-compounding validator rewards via stETH.", - ], - }), - documentation: Schema.String.annotate({ - description: "Link to documentation or integration guide", - examples: ["https://docs.lido.fi"], - }), - underMaintenance: Schema.Boolean.annotate({ - description: "Whether this yield is currently under maintenance", - examples: [false], + description: "Short description of the provider", + examples: ["A peer-to-peer DeFi lending protocol"], }), - deprecated: Schema.Boolean.annotate({ - description: "Whether this yield is deprecated and will be discontinued", - examples: [false], + website: Schema.String.annotate({ + description: "Provider website", + examples: ["https://morpho.xyz"], }), - supportedStandards: Schema.Array(ERCStandards), - supportsCampaigns: Schema.Boolean.annotate({ - description: "Whether this yield supports campaign creation", - examples: [true], + tvlUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Total TVL across the entire provider in USD", + examples: ["10,200,000"], }), -}).annotate({ identifier: "YieldMetadataDto" }); -export type SettlementSpecDto = { - readonly type: "atomic" | "next_business_day" | "cohort" | "cooldown"; - readonly marketDays?: number; - readonly estimatedDuration?: TimePeriodDto; - readonly estimatedSettlementAt?: string; - readonly claimRequired?: boolean; - readonly instantPortion?: number; - readonly deferredDeliveryAt?: string; -}; -export const SettlementSpecDto = Schema.Struct({ - type: Schema.Literals([ - "atomic", - "next_business_day", - "cohort", - "cooldown", - ]).annotate({ - description: - "How the order settles: atomic (same tx), next_business_day, cohort (batched off-chain), or cooldown (fixed delay)", + type: Schema.Literals(["protocol", "validator_provider"]).annotate({ + description: "Type of provider (protocol or validator provider)", + examples: ["protocol"], }), - marketDays: Schema.optionalKey( - Schema.Number.annotate({ - description: "Settlement horizon in market days (T+N) when applicable", - examples: [1], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })) - ), - estimatedDuration: Schema.optionalKey( - Schema.suspend((): Schema.Codec => TimePeriodDto).annotate({ - description: "Best estimate of full settlement when not atomic", + references: Schema.optionalKey( + Schema.Union([Schema.Array(Schema.String), Schema.Null]).annotate({ + description: "Optional social/media references or audit links", }) ), - estimatedSettlementAt: Schema.optionalKey( +}).annotate({ identifier: "ProviderDto" }); +export type HealthStatus = "OK" | "FAIL"; +export const HealthStatus = Schema.Literals(["OK", "FAIL"]).annotate({ + description: "The health status of the service", + identifier: "HealthStatus", +}); +export type BalancesQueryDto = { + readonly yieldId?: string; + readonly address: string; + readonly network: Networks; + readonly arguments?: GetBalancesArgumentsDto; +}; +export const BalancesQueryDto = Schema.Struct({ + yieldId: Schema.optionalKey( Schema.String.annotate({ description: - "Concrete settlement date when known (ISO 8601, cohort/scheduled)", - }) - ), - claimRequired: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "User must submit a separate on-chain claim to receive settled funds (ERC-7540)", + "The unique identifier of the yield (optional for chain scanning)", + examples: ["ethereum-eth-lido-staking"], }) ), - instantPortion: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Split delivery: fraction (0-1) delivered instantly; the rest is deferred", - examples: [0.93], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })) - ), - deferredDeliveryAt: Schema.optionalKey( - Schema.String.annotate({ - description: "Concrete date the deferred portion is delivered (ISO 8601)", - }) + address: Schema.String.annotate({ + description: "User wallet address to check balances for", + examples: ["0x742d35Cc6634C0532925a3b844Bc454e4438f44e"], + }), + network: Schema.suspend((): Schema.Codec => Networks).annotate({ + description: "Network for this address", + examples: ["ethereum"], + }), + arguments: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => GetBalancesArgumentsDto + ).annotate({ description: "Arguments for balance queries" }) ), -}).annotate({ identifier: "SettlementSpecDto" }); -export type AccrualSpecDto = { - readonly startsAt: - | "immediate" - | "next_business_day" - | "on_cycle_start" - | "on_settlement"; - readonly startsAtDate?: string; - readonly minimumHold?: TimePeriodDto; +}).annotate({ identifier: "BalancesQueryDto" }); +export type YieldBalancesRequestDto = { + readonly address: string; + readonly arguments?: GetBalancesArgumentsDto; }; -export const AccrualSpecDto = Schema.Struct({ - startsAt: Schema.Literals([ - "immediate", - "next_business_day", - "on_cycle_start", - "on_settlement", - ]).annotate({ - description: - "When earning starts (subscription) / earn-through boundary (redemption): immediate, next_business_day, on_cycle_start, or on_settlement", +export const YieldBalancesRequestDto = Schema.Struct({ + address: Schema.String.annotate({ + description: "User wallet address to check balances for", + examples: ["0x742d35Cc6634C0532925a3b844Bc454e4438f44e"], }), - startsAtDate: Schema.optionalKey( - Schema.String.annotate({ + arguments: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => GetBalancesArgumentsDto + ).annotate({ description: - "Concrete accrual start date when known (ISO 8601, cron-filled)", - }) - ), - minimumHold: Schema.optionalKey( - Schema.suspend((): Schema.Codec => TimePeriodDto).annotate({ - description: "Minimum hold before redemption is allowed", + "Optional arguments for advanced or protocol-specific balance queries", }) ), -}).annotate({ identifier: "AccrualSpecDto" }); -export type KycEligibilityDto = { - readonly defaultPolicy: "deny" | "allow"; - readonly countries: ReadonlyArray; - readonly blockedCountries: ReadonlyArray; - readonly blockedSubdivisions: ReadonlyArray; - readonly usPersonAllowed: boolean; - readonly geoBlockingEnforced?: boolean; - readonly investorEligibility: ReadonlyArray; - readonly subjectTypes: ReadonlyArray<"KYC" | "KYB">; -}; -export const KycEligibilityDto = Schema.Struct({ - defaultPolicy: Schema.Literals(["deny", "allow"]).annotate({ - description: - "Policy applied when the user jurisdiction is not explicitly listed", - examples: ["deny"], - }), - countries: Schema.Array(Schema.String).annotate({ - description: - 'Jurisdictions where this opportunity is offered (ISO-3166-1 alpha-2, or "EEA"/"GCC"). May be empty.', - examples: [["US"]], - }), - blockedCountries: Schema.Array(Schema.String).annotate({ - description: "Blocked jurisdictions (ISO-3166-1 alpha-2)", - examples: [["US", "CA", "CN"]], +}).annotate({ identifier: "YieldBalancesRequestDto" }); +export type PendingActionDto = { + readonly intent: "enter" | "manage" | "exit"; + readonly type: + | "STAKE" + | "UNSTAKE" + | "WITHDRAW_REQUEST" + | "INSTANT_WITHDRAW" + | "CLAIM_REWARDS" + | "AUTO_SWEEP_UNSTAKE_REWARDS" + | "AUTO_SWEEP_WITHDRAW_REWARDS" + | "RESTAKE_REWARDS" + | "WITHDRAW" + | "WITHDRAW_ALL" + | "RESTAKE" + | "CLAIM_UNSTAKED" + | "UNLOCK_LOCKED" + | "STAKE_LOCKED" + | "VOTE" + | "REVOKE" + | "VOTE_LOCKED" + | "REVOTE" + | "REBOND" + | "MIGRATE" + | "VERIFY_WITHDRAW_CREDENTIALS" + | "DELEGATE"; + readonly passthrough: string; + readonly arguments?: { + readonly fields: ReadonlyArray; + readonly notes?: string; + }; + readonly amount?: string | null; +}; +export const PendingActionDto = Schema.Struct({ + intent: Schema.Literals(["enter", "manage", "exit"]).annotate({ + description: "High-level action intent", + examples: ["manage"], }), - blockedSubdivisions: Schema.Array(Schema.String).annotate({ - description: 'Blocked subdivisions (ISO-3166-2, e.g. "UA-43")', - examples: [["UA-43", "UA-14"]], + type: Schema.Literals([ + "STAKE", + "UNSTAKE", + "WITHDRAW_REQUEST", + "INSTANT_WITHDRAW", + "CLAIM_REWARDS", + "AUTO_SWEEP_UNSTAKE_REWARDS", + "AUTO_SWEEP_WITHDRAW_REWARDS", + "RESTAKE_REWARDS", + "WITHDRAW", + "WITHDRAW_ALL", + "RESTAKE", + "CLAIM_UNSTAKED", + "UNLOCK_LOCKED", + "STAKE_LOCKED", + "VOTE", + "REVOKE", + "VOTE_LOCKED", + "REVOTE", + "REBOND", + "MIGRATE", + "VERIFY_WITHDRAW_CREDENTIALS", + "DELEGATE", + ]).annotate({ + description: "Specific action type", + examples: ["CLAIM_REWARDS"], }), - usPersonAllowed: Schema.Boolean.annotate({ - description: "Whether US persons are eligible", + passthrough: Schema.String.annotate({ + description: + "Server-generated passthrough that must be included when executing the action", + examples: ["eyJhZGRyZXNzZXMiOnsiYWRkcmVzcyI6ImNvc21vczF5ZXk..."], }), - geoBlockingEnforced: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - 'Whether eligibility is IP-enforced at action creation: the blocked lists always, plus the countries allow-list when defaultPolicy is "deny". Absent or false means informational only', + arguments: Schema.optionalKey( + Schema.Struct({ + fields: Schema.Array(ArgumentFieldDto).annotate({ + description: "List of argument fields", + }), + notes: Schema.optionalKey( + Schema.String.annotate({ + description: "Notes or instructions for these arguments", + }) + ), + }).annotate({ + description: "Argument schema required to execute this action", }) ), - investorEligibility: Schema.Array(InvestorEligibilityEntryDto).annotate({ - description: - "Investor-tier requirements per jurisdiction. Empty means no tier requirement.", - }), - subjectTypes: Schema.Array(Schema.Literals(["KYC", "KYB"])).annotate({ - description: - "Acceptable subject types (individual KYC and/or business KYB)", - examples: [["KYC", "KYB"]], - }), -}).annotate({ identifier: "KycEligibilityDto" }); -export type SelfAttestationDto = { - readonly documents: ReadonlyArray; - readonly notes?: string; -}; -export const SelfAttestationDto = Schema.Struct({ - documents: Schema.Array(SelfAttestationDocumentDto).annotate({ - description: "Documents the user must accept before entering", - }), - notes: Schema.optionalKey( - Schema.String.annotate({ + amount: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ description: - "Human-readable notes about the self-attestation requirement", + "Amount involved in the action, in human-readable token units (not the smallest denomination).", + examples: ["0.1"], }) ), -}).annotate({ identifier: "SelfAttestationDto" }); +}).annotate({ identifier: "PendingActionDto" }); export type ArgumentSchemaDto = { readonly fields: ReadonlyArray; readonly notes?: string; @@ -3485,364 +3410,439 @@ export const ArgumentSchemaDto = Schema.Struct({ }) ), }).annotate({ identifier: "ArgumentSchemaDto" }); -export type AllocationDto = { - readonly address: string; - readonly network: - | "ethereum" - | "ethereum-goerli" - | "ethereum-holesky" - | "ethereum-sepolia" - | "ethereum-hoodi" - | "arbitrum" - | "base" - | "base-sepolia" - | "gnosis" - | "optimism" - | "polygon" - | "polygon-amoy" - | "starknet" - | "zksync" - | "linea" - | "unichain" - | "plume" - | "monad-testnet" - | "monad" - | "robinhood" - | "robinhood-testnet" - | "avalanche-c" - | "avalanche-c-atomic" - | "avalanche-p" - | "binance" - | "celo" - | "fantom" - | "harmony" - | "moonriver" - | "okc" - | "viction" - | "core" - | "sonic" - | "plasma" - | "katana" - | "hyperevm" - | "tempo" - | "pharos" - | "agoric" - | "akash" - | "axelar" - | "band-protocol" - | "bitsong" - | "canto" - | "chihuahua" - | "comdex" - | "coreum" - | "cosmos" - | "crescent" - | "cronos" - | "cudos" - | "desmos" - | "dydx" - | "evmos" - | "fetch-ai" - | "gravity-bridge" - | "injective" - | "irisnet" - | "juno" - | "kava" - | "ki-network" - | "mars-protocol" - | "nym" - | "okex-chain" - | "onomy" - | "osmosis" - | "persistence" - | "quicksilver" - | "regen" - | "secret" - | "sentinel" - | "sommelier" - | "stafi" - | "stargaze" - | "stride" - | "teritori" - | "tgrade" - | "umee" - | "sei" - | "mantra" - | "celestia" - | "saga" - | "zetachain" - | "dymension" - | "humansai" - | "neutron" - | "polkadot" - | "kusama" - | "westend" - | "bittensor" - | "aptos" - | "binancebeacon" - | "cardano" - | "near" - | "solana" - | "solana-devnet" - | "stellar" - | "stellar-testnet" - | "sui" - | "tezos" - | "tron" - | "ton" - | "ton-testnet" - | "hyperliquid"; - readonly name: string; - readonly yieldId?: string; - readonly providerId?: string; - readonly allocation: string; - readonly allocationUsd: string | null; - readonly weight: number; - readonly targetWeight: number; - readonly rewardRate: AllocationRewardRateDto | null; - readonly tvl: string | null; - readonly tvlUsd: string | null; - readonly maxCapacity: string | null; - readonly remainingCapacity: string | null; +export type RewardDto = { + readonly rate: number; + readonly rateType: string; + readonly token: TokenDto; + readonly yieldSource: + | "staking" + | "liquid_staking" + | "restaking" + | "protocol_incentive" + | "campaign_incentive" + | "points" + | "lending" + | "mev" + | "real_world_asset_yield" + | "vault"; + readonly description?: string; +}; +export const RewardDto = Schema.Struct({ + rate: Schema.Number.annotate({ + description: "Reward rate as a decimal (e.g. 0.04 = 4%)", + examples: [0.04], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + rateType: Schema.String.annotate({ + description: "Whether this rate is APR or APY", + examples: ["APR"], + }), + token: Schema.suspend((): Schema.Codec => TokenDto).annotate({ + description: "Token received as reward", + }), + yieldSource: Schema.Literals([ + "staking", + "liquid_staking", + "restaking", + "protocol_incentive", + "campaign_incentive", + "points", + "lending", + "mev", + "real_world_asset_yield", + "vault", + ]).annotate({ + description: + "Structured source of yield (e.g. staking, protocol incentive)", + examples: ["protocol_incentive"], + }), + description: Schema.optionalKey( + Schema.String.annotate({ + description: "Optional human-readable description of this reward", + examples: [ + "LDO distributed to incentivize stETH adoption via Lido Boost", + ], + }) + ), +}).annotate({ identifier: "RewardDto" }); +export type PricePerShareStateDto = { + readonly price: number; + readonly shareToken: TokenDto; + readonly quoteToken: TokenDto; }; -export const AllocationDto = Schema.Struct({ - address: Schema.String.annotate({ - description: "Contract address of the underlying strategy", - examples: ["0x1234567890abcdef1234567890abcdef12345678"], +export const PricePerShareStateDto = Schema.Struct({ + price: Schema.Number.annotate({ + description: + "Price per share for the yield (e.g., LP token price, vault share price)", + examples: [1.05], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + shareToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ + description: "Share token (the token you own shares of)", }), - network: Schema.Literals([ - "ethereum", - "ethereum-goerli", - "ethereum-holesky", - "ethereum-sepolia", - "ethereum-hoodi", - "arbitrum", - "base", - "base-sepolia", - "gnosis", - "optimism", - "polygon", - "polygon-amoy", - "starknet", - "zksync", - "linea", - "unichain", - "plume", - "monad-testnet", - "monad", - "robinhood", - "robinhood-testnet", - "avalanche-c", - "avalanche-c-atomic", - "avalanche-p", - "binance", - "celo", - "fantom", - "harmony", - "moonriver", - "okc", - "viction", - "core", - "sonic", - "plasma", - "katana", - "hyperevm", - "tempo", - "pharos", - "agoric", - "akash", - "axelar", - "band-protocol", - "bitsong", - "canto", - "chihuahua", - "comdex", - "coreum", - "cosmos", - "crescent", - "cronos", - "cudos", - "desmos", - "dydx", - "evmos", - "fetch-ai", - "gravity-bridge", - "injective", - "irisnet", - "juno", - "kava", - "ki-network", - "mars-protocol", - "nym", - "okex-chain", - "onomy", - "osmosis", - "persistence", - "quicksilver", - "regen", - "secret", - "sentinel", - "sommelier", - "stafi", - "stargaze", - "stride", - "teritori", - "tgrade", - "umee", - "sei", - "mantra", - "celestia", - "saga", - "zetachain", - "dymension", - "humansai", - "neutron", - "polkadot", - "kusama", - "westend", - "bittensor", - "aptos", - "binancebeacon", - "cardano", - "near", - "solana", - "solana-devnet", - "stellar", - "stellar-testnet", - "sui", - "tezos", - "tron", - "ton", - "ton-testnet", - "hyperliquid", + quoteToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ + description: "Quote token (the token the price is denominated in)", + }), +}).annotate({ identifier: "PricePerShareStateDto" }); +export type ConcentratedLiquidityPoolStateDto = { + readonly baseApr: number; + readonly price: number; + readonly tickSpacing: number; + readonly minTick: number; + readonly maxTick: number; + readonly volume24hUsd: number | null; + readonly fee24hUsd: number | null; + readonly tvlUsd: number | null; + readonly feeTier: number; + readonly baseToken: TokenDto; + readonly quoteToken: TokenDto; +}; +export const ConcentratedLiquidityPoolStateDto = Schema.Struct({ + baseApr: Schema.Number.annotate({ + description: "Full-range trading APR (24h or rolling)", + examples: [0.12], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + price: Schema.Number.annotate({ + description: "Current mid-price from the AMM (token1 per token0)", + examples: [3950.42], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + tickSpacing: Schema.Number.annotate({ + description: "Tick spacing required so UI can snap ranges", + examples: [50], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + minTick: Schema.Number.annotate({ + description: "Minimum tick bound for the pool", + examples: [-887272], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + maxTick: Schema.Number.annotate({ + description: "Maximum tick bound for the pool", + examples: [887272], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + volume24hUsd: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + Schema.Null, ]).annotate({ - description: "Network the underlying strategy is on", - examples: ["base"], + description: "24-hour trading volume in USD", + examples: [149550871.99], + }), + fee24hUsd: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + Schema.Null, + ]).annotate({ + description: "24-hour fees earned by LPs in USD", + examples: [14955.09], + }), + tvlUsd: Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + Schema.Null, + ]).annotate({ + description: "Total value locked in USD", + examples: [9213550.2], + }), + feeTier: Schema.Number.annotate({ + description: "Pool fee tier as a decimal (e.g., 0.0005 for 0.05%)", + examples: [0.0005], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + baseToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ + description: "Base token (token0)", + }), + quoteToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ + description: "Quote token (token1)", + }), +}).annotate({ identifier: "ConcentratedLiquidityPoolStateDto" }); +export type RevShareTiersDto = { + readonly trial?: RevShareDetailsDto; + readonly standard?: RevShareDetailsDto; + readonly pro?: RevShareDetailsDto; +}; +export const RevShareTiersDto = Schema.Struct({ + trial: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => RevShareDetailsDto + ).annotate({ description: "Trial tier revenue share details" }) + ), + standard: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => RevShareDetailsDto + ).annotate({ description: "Standard tier revenue share details" }) + ), + pro: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => RevShareDetailsDto + ).annotate({ description: "Pro tier revenue share details" }) + ), +}).annotate({ identifier: "RevShareTiersDto" }); +export type YieldFeeConfigurationDto = { + readonly id: string; + readonly default: boolean; + readonly managementFeeBps?: number | null; + readonly performanceFeeBps?: number | null; + readonly depositFeeBps?: number | null; + readonly allocatorVaultContractAddress?: string | null; + readonly statistics?: YieldStatisticsDto; +}; +export const YieldFeeConfigurationDto = Schema.Struct({ + id: Schema.String.annotate({ + description: "Fee configuration identifier", + examples: ["66f299cd-aaaa-bbbb-cccc-d1f26e3a02db"], + }), + default: Schema.Boolean.annotate({ + description: + "Whether this is the default fee configuration for the integration", + examples: [true], + }), + managementFeeBps: Schema.optionalKey( + Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + Schema.Null, + ]).annotate({ + description: "Management fee in basis points", + examples: [100], + }) + ), + performanceFeeBps: Schema.optionalKey( + Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + Schema.Null, + ]).annotate({ + description: "Performance fee in basis points", + examples: [1000], + }) + ), + depositFeeBps: Schema.optionalKey( + Schema.Union([ + Schema.Number.check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ), + Schema.Null, + ]).annotate({ description: "Deposit fee in basis points", examples: [0] }) + ), + allocatorVaultContractAddress: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Partner allocator vault contract address", + examples: ["0x80ac24aa929eaf5013f6436cda2a7ba190f5cc0b"], + }) + ), + statistics: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => YieldStatisticsDto + ).annotate({ + description: + "Partner-scoped metrics for assets that entered through this fee configuration allocator vault", + }) + ), +}).annotate({ identifier: "YieldFeeConfigurationDto" }); +export type YieldRiskSummaryDto = { + readonly ratings: ReadonlyArray; +}; +export const YieldRiskSummaryDto = Schema.Struct({ + ratings: Schema.Array(YieldRiskEntryDto).annotate({ + description: "Top-level rating entries by provider", }), +}).annotate({ identifier: "YieldRiskSummaryDto" }); +export type YieldMetadataDto = { + readonly name: string; + readonly logoURI: string; + readonly description: string; + readonly documentation: string; + readonly underMaintenance: boolean; + readonly deprecated: boolean; + readonly supportedStandards: ReadonlyArray; + readonly supportsCampaigns: boolean; +}; +export const YieldMetadataDto = Schema.Struct({ name: Schema.String.annotate({ - description: "Display name of the underlying strategy", - examples: ["Morpho Moonwell USDC"], + description: "Display name of the yield opportunity", + examples: ["Lido Staking"], }), - yieldId: Schema.optionalKey( + logoURI: Schema.String.annotate({ + description: "Yield opportunity logo URI", + examples: ["https://lido.fi/logo.png"], + }), + description: Schema.String.annotate({ + description: + "Markdown-supported short description of this yield opportunity, including where rewards come from.", + examples: [ + "Stake ETH with Lido to earn auto-compounding validator rewards via stETH.", + ], + }), + documentation: Schema.String.annotate({ + description: "Link to documentation or integration guide", + examples: ["https://docs.lido.fi"], + }), + underMaintenance: Schema.Boolean.annotate({ + description: "Whether this yield is currently under maintenance", + examples: [false], + }), + deprecated: Schema.Boolean.annotate({ + description: "Whether this yield is deprecated and will be discontinued", + examples: [false], + }), + supportedStandards: Schema.Array(ERCStandards).annotate({ + description: "Supported standards for this yield", + }), + supportsCampaigns: Schema.Boolean.annotate({ + description: "Whether this yield supports campaign creation", + examples: [true], + }), +}).annotate({ identifier: "YieldMetadataDto" }); +export type SettlementSpecDto = { + readonly type: "atomic" | "next_business_day" | "cohort" | "cooldown"; + readonly marketDays?: number; + readonly estimatedDuration?: TimePeriodDto; + readonly estimatedSettlementAt?: string; + readonly claimRequired?: boolean; + readonly instantPortion?: number; + readonly deferredDeliveryAt?: string; +}; +export const SettlementSpecDto = Schema.Struct({ + type: Schema.Literals([ + "atomic", + "next_business_day", + "cohort", + "cooldown", + ]).annotate({ + description: + "How the order settles: atomic (same tx), next_business_day, cohort (batched off-chain), or cooldown (fixed delay)", + }), + marketDays: Schema.optionalKey( + Schema.Number.annotate({ + description: "Settlement horizon in market days (T+N) when applicable", + examples: [1], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + estimatedDuration: Schema.optionalKey( + Schema.suspend((): Schema.Codec => TimePeriodDto).annotate({ + description: "Best estimate of full settlement when not atomic", + }) + ), + estimatedSettlementAt: Schema.optionalKey( Schema.String.annotate({ description: - "Yield ID if this strategy is supported as a separate yield opportunity", - examples: ["base-usdc-morpho-moonwell-usdc"], + "Concrete settlement date when known (ISO 8601, cohort/scheduled)", }) ), - providerId: Schema.optionalKey( + claimRequired: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "User must submit a separate on-chain claim to receive settled funds (ERC-7540)", + }) + ), + instantPortion: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Split delivery: fraction (0-1) delivered instantly; the rest is deferred", + examples: [0.93], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + deferredDeliveryAt: Schema.optionalKey( Schema.String.annotate({ - description: "Provider ID for this strategy (e.g., morpho, aave, lido)", - examples: ["morpho"], + description: "Concrete date the deferred portion is delivered (ISO 8601)", }) ), - allocation: Schema.String.annotate({ - description: "Amount allocated to this strategy in input token units", - examples: ["50000.00"], +}).annotate({ identifier: "SettlementSpecDto" }); +export type AccrualSpecDto = { + readonly startsAt: + | "immediate" + | "next_business_day" + | "on_cycle_start" + | "on_settlement"; + readonly startsAtDate?: string; + readonly minimumHold?: TimePeriodDto; +}; +export const AccrualSpecDto = Schema.Struct({ + startsAt: Schema.Literals([ + "immediate", + "next_business_day", + "on_cycle_start", + "on_settlement", + ]).annotate({ + description: + "When earning starts (subscription) / earn-through boundary (redemption): immediate, next_business_day, on_cycle_start, or on_settlement", }), - allocationUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "USD value of the allocation", - examples: ["50000.00"], + startsAtDate: Schema.optionalKey( + Schema.String.annotate({ + description: + "Concrete accrual start date when known (ISO 8601, cron-filled)", + }) + ), + minimumHold: Schema.optionalKey( + Schema.suspend((): Schema.Codec => TimePeriodDto).annotate({ + description: "Minimum hold before redemption is allowed", + }) + ), +}).annotate({ identifier: "AccrualSpecDto" }); +export type KycEligibilityDto = { + readonly defaultPolicy: "deny" | "allow"; + readonly countries: ReadonlyArray; + readonly blockedCountries: ReadonlyArray; + readonly blockedSubdivisions: ReadonlyArray; + readonly usPersonAllowed: boolean; + readonly geoBlockingEnforced?: boolean; + readonly investorEligibility: ReadonlyArray; + readonly subjectTypes: ReadonlyArray<"KYC" | "KYB">; +}; +export const KycEligibilityDto = Schema.Struct({ + defaultPolicy: Schema.Literals(["deny", "allow"]).annotate({ + description: + "Policy applied when the user jurisdiction is not explicitly listed", + examples: ["deny"], }), - weight: Schema.Number.annotate({ - description: "Current weight of this strategy as a percentage (0-100)", - examples: [50.5], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - targetWeight: Schema.Number.annotate({ - description: "Target weight of this strategy as a percentage (0-100)", - examples: [50], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - rewardRate: Schema.Union([ - Schema.suspend( - (): Schema.Codec => AllocationRewardRateDto - ).annotate({ description: "Reward rate of the underlying strategy" }), - Schema.Null, - ]), - tvl: Schema.Union([Schema.String, Schema.Null]).annotate({ + countries: Schema.Array(Schema.String).annotate({ description: - "Total value locked in the underlying strategy in input token units", - examples: ["500.25"], + 'Jurisdictions where this opportunity is offered (ISO-3166-1 alpha-2, or "EEA"/"GCC"). May be empty.', + examples: [["US"]], }), - tvlUsd: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Total value locked in USD for the underlying strategy", - examples: ["10000000.00"], + blockedCountries: Schema.Array(Schema.String).annotate({ + description: "Blocked jurisdictions (ISO-3166-1 alpha-2)", + examples: [["US", "CA", "CN"]], }), - maxCapacity: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Maximum capacity of the underlying strategy", - examples: ["1000000.00"], + blockedSubdivisions: Schema.Array(Schema.String).annotate({ + description: 'Blocked subdivisions (ISO-3166-2, e.g. "UA-43")', + examples: [["UA-43", "UA-14"]], }), - remainingCapacity: Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Remaining capacity in the underlying strategy", - examples: ["500000.00"], + usPersonAllowed: Schema.Boolean.annotate({ + description: "Whether US persons are eligible", }), -}).annotate({ identifier: "AllocationDto" }); -export type BalancesQueryDto = { - readonly yieldId?: string; - readonly address: string; - readonly network: Networks; - readonly arguments?: GetBalancesArgumentsDto; -}; -export const BalancesQueryDto = Schema.Struct({ - yieldId: Schema.optionalKey( - Schema.String.annotate({ + geoBlockingEnforced: Schema.optionalKey( + Schema.Boolean.annotate({ description: - "The unique identifier of the yield (optional for chain scanning)", - examples: ["ethereum-eth-lido-staking"], + 'Whether eligibility is IP-enforced at action creation: the blocked lists always, plus the countries allow-list when defaultPolicy is "deny". Absent or false means informational only', }) ), - address: Schema.String.annotate({ - description: "User wallet address to check balances for", - examples: ["0x742d35Cc6634C0532925a3b844Bc454e4438f44e"], + investorEligibility: Schema.Array(InvestorEligibilityEntryDto).annotate({ + description: + "Investor-tier requirements per jurisdiction. Empty means no tier requirement.", }), - network: Schema.suspend((): Schema.Codec => Networks).annotate({ - examples: ["ethereum"], + subjectTypes: Schema.Array(Schema.Literals(["KYC", "KYB"])).annotate({ + description: + "Acceptable subject types (individual KYC and/or business KYB)", + examples: [["KYC", "KYB"]], }), - arguments: Schema.optionalKey( - Schema.suspend( - (): Schema.Codec => GetBalancesArgumentsDto - ).annotate({ description: "Arguments for balance queries" }) - ), -}).annotate({ identifier: "BalancesQueryDto" }); -export type YieldBalancesRequestDto = { - readonly address: string; - readonly arguments?: GetBalancesArgumentsDto; -}; -export const YieldBalancesRequestDto = Schema.Struct({ - address: Schema.String.annotate({ - description: "User wallet address to check balances for", - examples: ["0x742d35Cc6634C0532925a3b844Bc454e4438f44e"], +}).annotate({ identifier: "KycEligibilityDto" }); +export type SelfAttestationDto = { + readonly documents: ReadonlyArray; + readonly notes?: string; +}; +export const SelfAttestationDto = Schema.Struct({ + documents: Schema.Array(SelfAttestationDocumentDto).annotate({ + description: "Documents the user must accept before entering", }), - arguments: Schema.optionalKey( - Schema.suspend( - (): Schema.Codec => GetBalancesArgumentsDto - ).annotate({ + notes: Schema.optionalKey( + Schema.String.annotate({ description: - "Optional arguments for advanced or protocol-specific balance queries", + "Human-readable notes about the self-attestation requirement", }) ), -}).annotate({ identifier: "YieldBalancesRequestDto" }); -export type RevShareTiersDto = { - readonly trial?: RevShareDetailsDto; - readonly standard?: RevShareDetailsDto; - readonly pro?: RevShareDetailsDto; -}; -export const RevShareTiersDto = Schema.Struct({ - trial: Schema.optionalKey( - Schema.suspend( - (): Schema.Codec => RevShareDetailsDto - ).annotate({ description: "Trial tier revenue share details" }) - ), - standard: Schema.optionalKey( - Schema.suspend( - (): Schema.Codec => RevShareDetailsDto - ).annotate({ description: "Standard tier revenue share details" }) - ), - pro: Schema.optionalKey( - Schema.suspend( - (): Schema.Codec => RevShareDetailsDto - ).annotate({ description: "Pro tier revenue share details" }) - ), -}).annotate({ identifier: "RevShareTiersDto" }); +}).annotate({ identifier: "SelfAttestationDto" }); export type YieldRiskStakingRewardsDto = { readonly rating?: string | null; readonly score?: number | null; @@ -3990,24 +3990,6 @@ export const RewardRateHistoryResponseDto = Schema.Struct({ examples: ["2025-07-10T00:00:00.000Z"], }), }).annotate({ identifier: "RewardRateHistoryResponseDto" }); -export type CampaignQualificationConfigDto = { - readonly type: CampaignQualificationType; - readonly threshold: string; - readonly maxIncentivizedTvlToken?: string | null; -}; -export const CampaignQualificationConfigDto = Schema.Struct({ - type: CampaignQualificationType, - threshold: Schema.String.annotate({ - description: "Minimum qualifying token amount balance.", - examples: ["100"], - }), - maxIncentivizedTvlToken: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Optional per-user token cap.", - examples: ["1000000"], - }) - ), -}).annotate({ identifier: "CampaignQualificationConfigDto" }); export type ActionDto = { readonly id: string; readonly intent: "enter" | "manage" | "exit"; @@ -4043,7 +4025,251 @@ export type ActionDto = { readonly transactions: ReadonlyArray; readonly events?: ReadonlyArray; readonly executionPattern: "synchronous" | "asynchronous" | "batch"; - readonly rawArguments: ActionArgumentsDto | null; + readonly rawArguments: { + readonly amount?: string; + readonly amountRaw?: string; + readonly amounts?: ReadonlyArray; + readonly shareAmount?: string; + readonly shareAmountRaw?: string; + readonly validatorAddress?: string; + readonly validatorAddresses?: ReadonlyArray; + readonly providerId?: string; + readonly duration?: number; + readonly inputToken?: string; + readonly inputTokenNetwork?: + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; + readonly outputToken?: string; + readonly outputTokenNetwork?: + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; + readonly subnetId?: number; + readonly tronResource?: "BANDWIDTH" | "ENERGY"; + readonly feeConfigurationId?: string; + readonly cosmosPubKey?: string; + readonly tezosPubKey?: string; + readonly cAddressBech?: string; + readonly pAddressBech?: string; + readonly executionMode?: "individual" | "batched"; + readonly ledgerWalletApiCompatible?: boolean; + readonly useMaxAmount?: boolean; + readonly useInstantExecution?: boolean; + readonly useAutoClaim?: boolean; + readonly skipPrechecks?: boolean; + readonly useMaxAllowance?: boolean; + readonly feePayerAddress?: string; + readonly receiverAddress?: string; + readonly rangeMin?: string; + readonly rangeMax?: string; + readonly percentage?: number; + readonly tokenId?: string; + }; readonly createdAt: string; readonly completedAt: string | null; readonly status: @@ -4133,18 +4359,448 @@ export const ActionDto = Schema.Struct({ "batch", ]).annotate({ description: - "Transaction execution pattern - synchronous (submit one by one, wait for each), asynchronous (submit all at once), or batch (single transaction with multiple operations)", - examples: ["synchronous"], + "Transaction execution pattern - synchronous (submit one by one, wait for each), asynchronous (submit all at once), or batch (single transaction with multiple operations)", + examples: ["synchronous"], + }), + rawArguments: Schema.Struct({ + amount: Schema.optionalKey( + Schema.String.annotate({ + description: + 'Amount in human-readable token units, not the smallest denomination. For example, "1.500000" for 1.5 USDC (6 decimals) or "0.01" for 0.01 ETH (18 decimals). Precision up to the token\'s decimal places is supported. Mutually exclusive with amountRaw.', + examples: ["1.500000"], + }) + ), + amountRaw: Schema.optionalKey( + Schema.String.annotate({ + description: + 'Amount in the smallest denomination (wei for ETH, satoshi for BTC, etc.). For example, "1500000" for 1.5 USDC (6 decimals) or "10000000000000000" for 0.01 ETH (18 decimals). Mutually exclusive with amount.', + examples: ["1000000000000000000"], + }) + ), + amounts: Schema.optionalKey( + Schema.Array(Schema.String).annotate({ + description: + "Amounts in human-readable token units, not the smallest denomination. Precision up to the token's decimal places is supported.", + examples: [["1.500000", "2.000000"]], + }) + ), + shareAmount: Schema.optionalKey( + Schema.String.annotate({ + description: "Share amount to withdraw", + examples: ["1.500000"], + }) + ), + shareAmountRaw: Schema.optionalKey( + Schema.String.annotate({ + description: "Share amount to withdraw in raw decimals", + examples: ["1500000"], + }) + ), + validatorAddress: Schema.optionalKey( + Schema.String.annotate({ + description: "Validator address for single validator selection", + examples: ["cosmosvaloper1..."], + }) + ), + validatorAddresses: Schema.optionalKey( + Schema.Array(Schema.String).annotate({ + description: "Multiple validator addresses", + examples: [["cosmosvaloper1...", "cosmosvaloper2..."]], + }) + ), + providerId: Schema.optionalKey( + Schema.String.annotate({ + description: "Provider ID for Ethereum native staking", + examples: ["kiln"], + }) + ), + duration: Schema.optionalKey( + Schema.Number.annotate({ + description: "Duration for Avalanche native staking (in seconds)", + examples: [1209600], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + inputToken: Schema.optionalKey( + Schema.String.annotate({ + description: + 'Token for deposits. Use "0x" for native token or provide the token address. For cross-chain deposits, also provide inputTokenNetwork.', + examples: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"], + }) + ), + inputTokenNetwork: Schema.optionalKey( + Schema.Literals([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "plume", + "monad-testnet", + "monad", + "robinhood", + "robinhood-testnet", + "arc-testnet", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "tempo", + "pharos", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ]).annotate({ + description: + "Network for the input token. Required for cross-chain deposits when the token is on a different network than the vault.", + }) + ), + outputToken: Schema.optionalKey( + Schema.String.annotate({ + description: + 'Token for withdrawals. Use "0x" for native token or provide the token address. For cross-chain withdrawals, also provide outputTokenNetwork.', + examples: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"], + }) + ), + outputTokenNetwork: Schema.optionalKey( + Schema.Literals([ + "ethereum", + "ethereum-goerli", + "ethereum-holesky", + "ethereum-sepolia", + "ethereum-hoodi", + "arbitrum", + "base", + "base-sepolia", + "gnosis", + "optimism", + "polygon", + "polygon-amoy", + "starknet", + "zksync", + "linea", + "unichain", + "plume", + "monad-testnet", + "monad", + "robinhood", + "robinhood-testnet", + "arc-testnet", + "avalanche-c", + "avalanche-c-atomic", + "avalanche-p", + "binance", + "celo", + "fantom", + "harmony", + "moonriver", + "okc", + "viction", + "core", + "sonic", + "plasma", + "katana", + "hyperevm", + "tempo", + "pharos", + "agoric", + "akash", + "axelar", + "band-protocol", + "bitsong", + "canto", + "chihuahua", + "comdex", + "coreum", + "cosmos", + "crescent", + "cronos", + "cudos", + "desmos", + "dydx", + "evmos", + "fetch-ai", + "gravity-bridge", + "injective", + "irisnet", + "juno", + "kava", + "ki-network", + "mars-protocol", + "nym", + "okex-chain", + "onomy", + "osmosis", + "persistence", + "quicksilver", + "regen", + "secret", + "sentinel", + "sommelier", + "stafi", + "stargaze", + "stride", + "teritori", + "tgrade", + "umee", + "sei", + "mantra", + "celestia", + "saga", + "zetachain", + "dymension", + "humansai", + "neutron", + "polkadot", + "kusama", + "westend", + "bittensor", + "aptos", + "binancebeacon", + "cardano", + "near", + "solana", + "solana-devnet", + "stellar", + "stellar-testnet", + "sui", + "tezos", + "tron", + "ton", + "ton-testnet", + "hyperliquid", + ]).annotate({ + description: + "Network for the output token. Required for cross-chain withdrawals when the destination is on a different network than the vault.", + }) + ), + subnetId: Schema.optionalKey( + Schema.Number.annotate({ + description: "Subnet ID for Bittensor staking", + examples: [1], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + tronResource: Schema.optionalKey( + Schema.Literals(["BANDWIDTH", "ENERGY"]).annotate({ + description: "Tron resource type for Tron staking", + }) + ), + feeConfigurationId: Schema.optionalKey( + Schema.String.annotate({ + description: "Fee configuration ID for custom fee settings", + examples: ["custom-fee-config-1"], + }) + ), + cosmosPubKey: Schema.optionalKey( + Schema.String.annotate({ + description: "Cosmos public key for Cosmos staking", + examples: ["cosmospub1..."], + }) + ), + tezosPubKey: Schema.optionalKey( + Schema.String.annotate({ + description: "Tezos public key for Tezos staking", + examples: ["edpk..."], + }) + ), + cAddressBech: Schema.optionalKey( + Schema.String.annotate({ + description: "Avalanche C-chain address", + examples: ["0x123..."], + }) + ), + pAddressBech: Schema.optionalKey( + Schema.String.annotate({ + description: "Avalanche P-chain address", + examples: ["P-avax1..."], + }) + ), + executionMode: Schema.optionalKey( + Schema.Literals(["individual", "batched"]).annotate({ + description: "Transaction execution mode", + examples: ["individual"], + }) + ), + ledgerWalletApiCompatible: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "Transactions should have Ledger wallet API compatibility for hardware wallet users", + examples: [true], + }) + ), + useMaxAmount: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "Use max amount for ERC4626 withdraw", + examples: [true], + }) + ), + useInstantExecution: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "Use instant execution for exit (faster but may have fees)", + examples: [true], + }) + ), + useAutoClaim: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "Authorize the redeem operator to auto-claim settled async redemptions (one-time per wallet)", + examples: [true], + }) + ), + skipPrechecks: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "Skip pre-flight balance and rent checks", + examples: [false], + }) + ), + useMaxAllowance: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "When true, ERC20 approval transactions use the maximum allowance (uint256.max) instead of the exact deposit amount. Useful to avoid repeated approval transactions on subsequent deposits.", + examples: [true], + }) + ), + feePayerAddress: Schema.optionalKey( + Schema.String.annotate({ + description: + "Fee payer address for gas-sponsored wallets (Solana). When provided, this address is used as the payer for account creation instructions and as the transaction-level fee payer.", + examples: ["7Qo3awoTH4y5Vui1FQwsncq2arYDzUuivdeWhwgnAvVo"], + }) + ), + receiverAddress: Schema.optionalKey( + Schema.String.annotate({ + description: + "Receiver wallet address: ERC4626 vault flows, or on Solana the address for tokens after an optional post-exit swap", + }) + ), + rangeMin: Schema.optionalKey( + Schema.String.annotate({ + description: + "Minimum price bound for concentrated liquidity pools (as decimal string). Must be non-negative (can be 0) and less than rangeMax.", + examples: ["0.0"], + }) + ), + rangeMax: Schema.optionalKey( + Schema.String.annotate({ + description: + "Maximum price bound for concentrated liquidity pools (as decimal string). Must be positive and greater than rangeMin.", + examples: ["1.0"], + }) + ), + percentage: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Percentage of liquidity to exit (0-100). Required for partial exits from liquidity positions.", + examples: [50], + }) + .check(Schema.isFinite().annotate({ expected: "a finite number" })) + .check( + Schema.isGreaterThanOrEqualTo(0).annotate({ + expected: "a value greater than or equal to 0", + }) + ) + .check( + Schema.isLessThanOrEqualTo(100).annotate({ + expected: "a value less than or equal to 100", + }) + ) + ), + tokenId: Schema.optionalKey( + Schema.String.annotate({ + description: + "NFT token ID for concentrated liquidity positions. Required for exiting specific positions.", + examples: ["12345"], + }) + ), + }).annotate({ + description: + "Raw arguments exactly as submitted by the user for this action", }), - rawArguments: Schema.Union([ - Schema.suspend( - (): Schema.Codec => ActionArgumentsDto - ).annotate({ - description: - "Raw arguments exactly as submitted by the user for this action", - }), - Schema.Null, - ]), createdAt: Schema.String.annotate({ description: "When the action was created", format: "date-time", @@ -4263,7 +4919,7 @@ export type TransactionGasEstimateDto = { readonly token: TokenDto; readonly gasLimit?: string; readonly stepIndex: number; - readonly type: TransactionType | null; + readonly type: TransactionType; }; export const TransactionGasEstimateDto = Schema.Struct({ amount: Schema.Union([Schema.String, Schema.Null]), @@ -4272,7 +4928,7 @@ export const TransactionGasEstimateDto = Schema.Struct({ stepIndex: Schema.Number.check( Schema.isFinite().annotate({ expected: "a finite number" }) ), - type: Schema.Union([TransactionType, Schema.Null]), + type: TransactionType, }).annotate({ identifier: "TransactionGasEstimateDto" }); export type HealthStatusDto = { readonly status: HealthStatus; @@ -4281,170 +4937,44 @@ export type HealthStatusDto = { export const HealthStatusDto = Schema.Struct({ status: Schema.suspend( (): Schema.Codec => HealthStatus - ).annotate({ examples: ["OK"] }), + ).annotate({ + description: "The health status of the service", + examples: ["OK"], + }), timestamp: Schema.String.annotate({ description: "Timestamp when the health check was performed", examples: ["2024-01-15T10:30:00.000Z"], format: "date-time", }), }).annotate({ identifier: "HealthStatusDto" }); -export type RewardRateDto = { - readonly total: number; - readonly rateType: string; - readonly components: ReadonlyArray; -}; -export const RewardRateDto = Schema.Struct({ - total: Schema.Number.annotate({ - description: - "Estimated underlying integration reward rate across all sources. May include an additional campaign component when an active campaign applies to this project.", - examples: [6.5], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - rateType: Schema.String.annotate({ - description: "Whether this reward rate is APR or APY", - examples: ["APR"], - }), - components: Schema.Array(RewardDto).annotate({ - description: "Breakdown of reward rates by source", - }), -}).annotate({ identifier: "RewardRateDto" }); -export type SchedulePathDto = { - readonly kind: "instant" | "standard"; - readonly cadence: "continuous" | "daily_cutoff" | "periodic" | "scheduled"; - readonly status: "open" | "closed" | "settling"; - readonly businessDaysOnly?: boolean; - readonly cutoffTime?: string; - readonly currentWindow?: WindowBoundsDto | null; - readonly nextWindow?: WindowBoundsDto | null; - readonly settlement: SettlementSpecDto; - readonly accrual: AccrualSpecDto; - readonly limits?: PathLimitsDto; - readonly fee?: PathFeeDto; -}; -export const SchedulePathDto = Schema.Struct({ - kind: Schema.Literals(["instant", "standard"]).annotate({ - description: - "instant = atomic same-tx, liquidity/limit-bounded; standard = windowed / off-chain settled", - }), - cadence: Schema.Literals([ - "continuous", - "daily_cutoff", - "periodic", - "scheduled", - ]).annotate({ description: "How the path recurs" }), - status: Schema.Literals(["open", "closed", "settling"]).annotate({ - description: "Live status, refreshed by cron / on-chain read", - }), - businessDaysOnly: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "false/omitted = 24/7/365 (instant DeFi paths); true = market days only", - }) - ), - cutoffTime: Schema.optionalKey( - Schema.String.annotate({ - description: - 'For daily_cutoff: local cutoff time orders must be in by, e.g. "16:00"', - examples: ["16:00"], - }) - ), - currentWindow: Schema.optionalKey( - Schema.Union([ - Schema.suspend( - (): Schema.Codec => WindowBoundsDto - ).annotate({ - description: - "The window the user is acting into right now (null when continuous)", - }), - Schema.Null, - ]) - ), - nextWindow: Schema.optionalKey( - Schema.Union([ - Schema.suspend( - (): Schema.Codec => WindowBoundsDto - ).annotate({ - description: - "The next window after the current one closes; what a UI counts down to", - }), - Schema.Null, - ]) - ), - settlement: Schema.suspend( - (): Schema.Codec => SettlementSpecDto - ).annotate({ description: "When the order is actually processed" }), - accrual: Schema.suspend( - (): Schema.Codec => AccrualSpecDto - ).annotate({ - description: "When earning starts/stops relative to the order", - }), - limits: Schema.optionalKey( - Schema.suspend((): Schema.Codec => PathLimitsDto).annotate({ - description: - "Caps that gate an instant path or an on-demand liquidity pool", - }) - ), - fee: Schema.optionalKey( - Schema.suspend((): Schema.Codec => PathFeeDto).annotate({ - description: - "Fee this path charges on the amount (e.g. instant redemption fee)", - }) - ), -}).annotate({ identifier: "SchedulePathDto" }); -export type KycMetadataDto = { - readonly kycMode: - | "none" - | "oauth_redirect" - | "external_redirect" - | "iframe" - | "deeplink" - | "native_sdk"; - readonly iframeAllowed: boolean; - readonly authorizeUrl?: string; - readonly notes?: string; - readonly eligibility: KycEligibilityDto; - readonly selfAttestation?: SelfAttestationDto; - readonly mandatoryDisclosureUrl?: string; +export type BalancesRequestDto = { + readonly queries: ReadonlyArray; }; -export const KycMetadataDto = Schema.Struct({ - kycMode: Schema.Literals([ - "none", - "oauth_redirect", - "external_redirect", - "iframe", - "deeplink", - "native_sdk", - ]).annotate({ - description: "How the issuer KYC flow is delivered", - examples: ["oauth_redirect"], - }), - iframeAllowed: Schema.Boolean.annotate({ - description: "Whether the issuer KYC page may be embedded in an iframe", - }), - authorizeUrl: Schema.optionalKey( - Schema.String.annotate({ - description: "URL of the issuer-hosted KYC page (HTTPS)", - }) - ), - notes: Schema.optionalKey( - Schema.String.annotate({ - description: "Human-readable notes about the KYC requirement", - }) - ), - eligibility: KycEligibilityDto, - selfAttestation: Schema.optionalKey( - Schema.suspend( - (): Schema.Codec => SelfAttestationDto - ).annotate({ - description: - "Issuer-enforced self-attestation the user must complete before entering", - }) - ), - mandatoryDisclosureUrl: Schema.optionalKey( - Schema.String.annotate({ - description: "URL of a regulator-mandated disclosure document (HTTPS)", +export const BalancesRequestDto = Schema.Struct({ + queries: Schema.Array(BalancesQueryDto) + .annotate({ + description: "Array of balance queries (maximum 25 queries per request)", + examples: [ + [ + { + yieldId: "ethereum-eth-lido-staking", + address: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + network: "ethereum", + }, + ], + ], }) - ), -}).annotate({ identifier: "KycMetadataDto" }); + .check( + Schema.isMinLength(1).annotate({ + expected: "a value with a length of at least 1", + }) + ) + .check( + Schema.isMaxLength(25).annotate({ + expected: "a value with a length of at most 25", + }) + ), +}).annotate({ identifier: "BalancesRequestDto" }); export type YieldMechanicsArgumentsDto = { readonly enter?: ArgumentSchemaDto; readonly exit?: ArgumentSchemaDto; @@ -4469,90 +4999,25 @@ export const YieldMechanicsArgumentsDto = Schema.Struct({ }) ), }).annotate({ identifier: "YieldMechanicsArgumentsDto" }); -export type PendingActionDto = { - readonly intent: "enter" | "manage" | "exit"; - readonly type: - | "STAKE" - | "UNSTAKE" - | "WITHDRAW_REQUEST" - | "INSTANT_WITHDRAW" - | "CLAIM_REWARDS" - | "AUTO_SWEEP_UNSTAKE_REWARDS" - | "AUTO_SWEEP_WITHDRAW_REWARDS" - | "RESTAKE_REWARDS" - | "WITHDRAW" - | "WITHDRAW_ALL" - | "RESTAKE" - | "CLAIM_UNSTAKED" - | "UNLOCK_LOCKED" - | "STAKE_LOCKED" - | "VOTE" - | "REVOKE" - | "VOTE_LOCKED" - | "REVOTE" - | "REBOND" - | "MIGRATE" - | "VERIFY_WITHDRAW_CREDENTIALS" - | "DELEGATE"; - readonly passthrough: string; - readonly arguments?: ArgumentSchemaDto | null; - readonly amount?: string | null; +export type RewardRateDto = { + readonly total: number; + readonly rateType: string; + readonly components: ReadonlyArray; }; -export const PendingActionDto = Schema.Struct({ - intent: Schema.Literals(["enter", "manage", "exit"]).annotate({ - description: "High-level action intent", - examples: ["manage"], - }), - type: Schema.Literals([ - "STAKE", - "UNSTAKE", - "WITHDRAW_REQUEST", - "INSTANT_WITHDRAW", - "CLAIM_REWARDS", - "AUTO_SWEEP_UNSTAKE_REWARDS", - "AUTO_SWEEP_WITHDRAW_REWARDS", - "RESTAKE_REWARDS", - "WITHDRAW", - "WITHDRAW_ALL", - "RESTAKE", - "CLAIM_UNSTAKED", - "UNLOCK_LOCKED", - "STAKE_LOCKED", - "VOTE", - "REVOKE", - "VOTE_LOCKED", - "REVOTE", - "REBOND", - "MIGRATE", - "VERIFY_WITHDRAW_CREDENTIALS", - "DELEGATE", - ]).annotate({ - description: "Specific action type", - examples: ["CLAIM_REWARDS"], - }), - passthrough: Schema.String.annotate({ +export const RewardRateDto = Schema.Struct({ + total: Schema.Number.annotate({ description: - "Server-generated passthrough that must be included when executing the action", - examples: ["eyJhZGRyZXNzZXMiOnsiYWRkcmVzcyI6ImNvc21vczF5ZXk..."], + "Estimated underlying integration reward rate across all sources. May include an additional campaign component when an active campaign applies to this project.", + examples: [6.5], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + rateType: Schema.String.annotate({ + description: "Whether this reward rate is APR or APY", + examples: ["APR"], }), - arguments: Schema.optionalKey( - Schema.Union([ - Schema.suspend( - (): Schema.Codec => ArgumentSchemaDto - ).annotate({ - description: "Argument schema required to execute this action", - }), - Schema.Null, - ]) - ), - amount: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: - "Amount involved in the action, in human-readable token units (not the smallest denomination).", - examples: ["0.1"], - }) - ), -}).annotate({ identifier: "PendingActionDto" }); + components: Schema.Array(RewardDto).annotate({ + description: "Breakdown of reward rates by source", + }), +}).annotate({ identifier: "RewardRateDto" }); export type YieldStateDto = { readonly pricePerShareState?: PricePerShareStateDto; readonly concentratedLiquidityPoolState?: ConcentratedLiquidityPoolStateDto; @@ -4591,34 +5056,6 @@ export const YieldStateDto = Schema.Struct({ }) ), }).annotate({ identifier: "YieldStateDto" }); -export type BalancesRequestDto = { - readonly queries: ReadonlyArray; -}; -export const BalancesRequestDto = Schema.Struct({ - queries: Schema.Array(BalancesQueryDto) - .annotate({ - description: "Array of balance queries (maximum 25 queries per request)", - examples: [ - [ - { - yieldId: "ethereum-eth-lido-staking", - address: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - network: "ethereum", - }, - ], - ], - }) - .check( - Schema.isMinLength(1).annotate({ - expected: "a value with a length of at least 1", - }) - ) - .check( - Schema.isMaxLength(25).annotate({ - expected: "a value with a length of at most 25", - }) - ), -}).annotate({ identifier: "BalancesRequestDto" }); export type ValidatorProviderDto = { readonly name: string; readonly id: string; @@ -4630,7 +5067,7 @@ export type ValidatorProviderDto = { readonly references?: ReadonlyArray | null; readonly rank: number; readonly preferred: boolean; - readonly revshare?: RevShareTiersDto; + readonly revshare?: RevShareTiersDto | null; readonly uniqueId?: string; readonly createdAt?: string; readonly updatedAt?: string; @@ -4678,37 +5115,197 @@ export const ValidatorProviderDto = Schema.Struct({ examples: [true], }), revshare: Schema.optionalKey( - Schema.suspend( - (): Schema.Codec => RevShareTiersDto - ).annotate({ + Schema.Union([RevShareTiersDto, Schema.Null], { mode: "oneOf" }).annotate({ description: "Revenue sharing details by tier", - examples: [ - { - standard: { minRevShare: 0.3, maxRevShare: 0.7 }, - pro: { minRevShare: 0.4, maxRevShare: 0.8 }, - }, - ], }) ), - uniqueId: Schema.optionalKey( + uniqueId: Schema.optionalKey( + Schema.String.annotate({ + description: "Provider ID (deprecated, use `id` instead)", + examples: ["luganodes"], + }) + ), + createdAt: Schema.optionalKey( + Schema.String.annotate({ + description: "Creation timestamp (deprecated)", + format: "date-time", + }) + ), + updatedAt: Schema.optionalKey( + Schema.String.annotate({ + description: "Last update timestamp (deprecated)", + format: "date-time", + }) + ), +}).annotate({ identifier: "ValidatorProviderDto" }); +export type SchedulePathDto = { + readonly kind: "instant" | "standard"; + readonly cadence: "continuous" | "daily_cutoff" | "periodic" | "scheduled"; + readonly status: "open" | "closed" | "settling"; + readonly businessDaysOnly?: boolean; + readonly cutoffTime?: string; + readonly currentWindow?: { + readonly opensAt: string; + readonly closesAt: string; + readonly source?: "onchain" | "api" | "config"; + }; + readonly nextWindow?: { + readonly opensAt: string; + readonly closesAt: string; + readonly source?: "onchain" | "api" | "config"; + }; + readonly settlement: SettlementSpecDto; + readonly accrual: AccrualSpecDto; + readonly limits?: PathLimitsDto; + readonly fee?: PathFeeDto; +}; +export const SchedulePathDto = Schema.Struct({ + kind: Schema.Literals(["instant", "standard"]).annotate({ + description: + "instant = atomic same-tx, liquidity/limit-bounded; standard = windowed / off-chain settled", + }), + cadence: Schema.Literals([ + "continuous", + "daily_cutoff", + "periodic", + "scheduled", + ]).annotate({ description: "How the path recurs" }), + status: Schema.Literals(["open", "closed", "settling"]).annotate({ + description: "Live status, refreshed by cron / on-chain read", + }), + businessDaysOnly: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "false/omitted = 24/7/365 (instant DeFi paths); true = market days only", + }) + ), + cutoffTime: Schema.optionalKey( + Schema.String.annotate({ + description: + 'For daily_cutoff: local cutoff time orders must be in by, e.g. "16:00"', + examples: ["16:00"], + }) + ), + currentWindow: Schema.optionalKey( + Schema.Struct({ + opensAt: Schema.String.annotate({ + description: "Window open time (ISO 8601)", + examples: ["2026-07-21T08:00:00Z"], + }), + closesAt: Schema.String.annotate({ + description: + "Window close / cutoff time (ISO 8601); orders after this roll to nextWindow", + examples: ["2026-07-27T20:00:00Z"], + }), + source: Schema.optionalKey( + Schema.Literals(["onchain", "api", "config"]).annotate({ + description: + "Provenance of this window (on-chain read, issuer API, or hardcoded config)", + }) + ), + }).annotate({ + description: + "The window the user is acting into right now (null when continuous)", + }) + ), + nextWindow: Schema.optionalKey( + Schema.Struct({ + opensAt: Schema.String.annotate({ + description: "Window open time (ISO 8601)", + examples: ["2026-07-21T08:00:00Z"], + }), + closesAt: Schema.String.annotate({ + description: + "Window close / cutoff time (ISO 8601); orders after this roll to nextWindow", + examples: ["2026-07-27T20:00:00Z"], + }), + source: Schema.optionalKey( + Schema.Literals(["onchain", "api", "config"]).annotate({ + description: + "Provenance of this window (on-chain read, issuer API, or hardcoded config)", + }) + ), + }).annotate({ + description: + "The next window after the current one closes; what a UI counts down to", + }) + ), + settlement: Schema.suspend( + (): Schema.Codec => SettlementSpecDto + ).annotate({ description: "When the order is actually processed" }), + accrual: Schema.suspend( + (): Schema.Codec => AccrualSpecDto + ).annotate({ + description: "When earning starts/stops relative to the order", + }), + limits: Schema.optionalKey( + Schema.suspend((): Schema.Codec => PathLimitsDto).annotate({ + description: + "Caps that gate an instant path or an on-demand liquidity pool", + }) + ), + fee: Schema.optionalKey( + Schema.suspend((): Schema.Codec => PathFeeDto).annotate({ + description: + "Fee this path charges on the amount (e.g. instant redemption fee)", + }) + ), +}).annotate({ identifier: "SchedulePathDto" }); +export type KycMetadataDto = { + readonly kycMode: + | "none" + | "oauth_redirect" + | "external_redirect" + | "iframe" + | "deeplink" + | "native_sdk"; + readonly iframeAllowed: boolean; + readonly authorizeUrl?: string; + readonly notes?: string; + readonly eligibility: KycEligibilityDto; + readonly selfAttestation?: SelfAttestationDto; + readonly mandatoryDisclosureUrl?: string; +}; +export const KycMetadataDto = Schema.Struct({ + kycMode: Schema.Literals([ + "none", + "oauth_redirect", + "external_redirect", + "iframe", + "deeplink", + "native_sdk", + ]).annotate({ + description: "How the issuer KYC flow is delivered", + examples: ["oauth_redirect"], + }), + iframeAllowed: Schema.Boolean.annotate({ + description: "Whether the issuer KYC page may be embedded in an iframe", + }), + authorizeUrl: Schema.optionalKey( + Schema.String.annotate({ + description: "URL of the issuer-hosted KYC page (HTTPS)", + }) + ), + notes: Schema.optionalKey( Schema.String.annotate({ - description: "Provider ID (deprecated, use `id` instead)", - examples: ["luganodes"], + description: "Human-readable notes about the KYC requirement", }) ), - createdAt: Schema.optionalKey( - Schema.String.annotate({ - description: "Creation timestamp (deprecated)", - format: "date-time", + eligibility: KycEligibilityDto, + selfAttestation: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => SelfAttestationDto + ).annotate({ + description: + "Issuer-enforced self-attestation the user must complete before entering", }) ), - updatedAt: Schema.optionalKey( + mandatoryDisclosureUrl: Schema.optionalKey( Schema.String.annotate({ - description: "Last update timestamp (deprecated)", - format: "date-time", + description: "URL of a regulator-mandated disclosure document (HTTPS)", }) ), -}).annotate({ identifier: "ValidatorProviderDto" }); +}).annotate({ identifier: "KycMetadataDto" }); export type YieldRiskDto = { readonly updatedAt: string; readonly credora?: YieldRiskCredoraDto; @@ -4734,112 +5331,6 @@ export const SimulationGasDto = Schema.Struct({ gasLimit: Schema.optionalKey(Schema.String), transactions: Schema.Array(TransactionGasEstimateDto), }).annotate({ identifier: "SimulationGasDto" }); -export type YieldCampaignDto = { - readonly id: string; - readonly name?: string | null; - readonly createdAt: string; - readonly updatedAt: string; - readonly yieldId: string; - readonly status: CampaignStatus; - readonly rewardMode: CampaignRewardMode; - readonly rewardRate: RewardRateDto | null; - readonly totalBudget: string; - readonly distributedBudget: string; - readonly remainingBudget: string; - readonly configuredHourlyEmission?: string | null; - readonly apyCeiling?: number | null; - readonly qualificationConfig: CampaignQualificationConfigDto; - readonly startTime: string; - readonly endTime: string; - readonly lastProcessedHour?: string | null; - readonly nextPayoutDueAt?: string | null; - readonly payoutFrequency: CampaignPayoutFrequency; - readonly rewardToken: TokenDto; -}; -export const YieldCampaignDto = Schema.Struct({ - id: Schema.String, - name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - createdAt: Schema.String.annotate({ format: "date-time" }), - updatedAt: Schema.String.annotate({ format: "date-time" }), - yieldId: Schema.String, - status: CampaignStatus, - rewardMode: CampaignRewardMode, - rewardRate: Schema.Union([ - Schema.suspend((): Schema.Codec => RewardRateDto).annotate({ - description: - "Campaign reward rate in the same shape as yield reward rates. Null when TVL or emission data is unavailable.", - }), - Schema.Null, - ]), - totalBudget: Schema.String.annotate({ - description: "Total campaign reward budget.", - }), - distributedBudget: Schema.String.annotate({ - description: "Amount of budget distributed so far.", - }), - remainingBudget: Schema.String.annotate({ - description: "Amount of budget remaining.", - }), - configuredHourlyEmission: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Configured hourly emission amount.", - }) - ), - apyCeiling: Schema.optionalKey( - Schema.Union([ - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ), - Schema.Null, - ]).annotate({ - description: - "Optional APY ceiling as a decimal rate, where 0.125 = 12.5%.", - examples: [0.125], - }) - ), - qualificationConfig: Schema.suspend( - (): Schema.Codec => - CampaignQualificationConfigDto - ).annotate({ description: "Qualification configuration for the campaign." }), - startTime: Schema.String.annotate({ format: "date-time" }), - endTime: Schema.String.annotate({ format: "date-time" }), - lastProcessedHour: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ format: "date-time" }) - ), - nextPayoutDueAt: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ format: "date-time" }) - ), - payoutFrequency: CampaignPayoutFrequency, - rewardToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ - description: "Reward token metadata.", - }), -}).annotate({ identifier: "YieldCampaignDto" }); -export type SideScheduleDto = { - readonly paths: ReadonlyArray; -}; -export const SideScheduleDto = Schema.Struct({ - paths: Schema.Array(SchedulePathDto).annotate({ - description: - "Ways to act on this side (e.g. instant + standard); paths[0] is the default", - }), -}).annotate({ identifier: "SideScheduleDto" }); -export type YieldRequirementsDto = { - readonly kycRequired: boolean; - readonly kyc?: KycMetadataDto; -}; -export const YieldRequirementsDto = Schema.Struct({ - kycRequired: Schema.Boolean.annotate({ - description: "Whether off-chain KYC is required before transacting", - }), - kyc: Schema.optionalKey( - Schema.suspend((): Schema.Codec => KycMetadataDto).annotate( - { - description: - "Public KYC criteria for rendering verification UI per opportunity", - } - ) - ), -}).annotate({ identifier: "YieldRequirementsDto" }); export type ValidatorDto = { readonly address: string; readonly name?: string; @@ -4888,35 +5379,6 @@ export const ValidatorDto = Schema.Struct({ Schema.suspend((): Schema.Codec => RewardRateDto).annotate({ description: "Detailed reward rate breakdown by source (emissions, MEV, fees, etc.)", - examples: [ - { - total: 8.4, - rateType: "APR", - components: [ - { - rate: 6.8, - rateType: "APR", - token: { symbol: "SOL", name: "Solana" }, - yieldSource: "staking", - description: "Solana network inflation rewards", - }, - { - rate: 1.2, - rateType: "APR", - token: { symbol: "SOL", name: "Solana" }, - yieldSource: "validator_commission", - description: "Transaction fees from processed transactions", - }, - { - rate: 0.4, - rateType: "APR", - token: { symbol: "SOL", name: "Solana" }, - yieldSource: "mev", - description: "MEV from Jito block space auctions", - }, - ], - }, - ], }) ), provider: Schema.optionalKey( @@ -4980,52 +5442,333 @@ export const ValidatorDto = Schema.Struct({ examples: [8], }).check(Schema.isFinite().annotate({ expected: "a finite number" })) ), - nominatorCount: Schema.optionalKey( - Schema.Number.annotate({ - description: "Number of current nominators", - examples: [321], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + nominatorCount: Schema.optionalKey( + Schema.Number.annotate({ + description: "Number of current nominators", + examples: [321], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + status: Schema.optionalKey( + Schema.String.annotate({ + description: + "Validator status description (active, jailed, unbonding, etc.)", + examples: ["active"], + }) + ), + providerId: Schema.optionalKey( + Schema.String.annotate({ + description: "ID of the provider backing this validator", + examples: ["provider-1"], + }) + ), + subnet: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => ValidatorSubnetDto + ).annotate({ + description: + "Subnet metadata when the validator operates within a subnet (Bittensor)", + }) + ), +}).annotate({ identifier: "ValidatorDto" }); +export type SideScheduleDto = { + readonly paths: ReadonlyArray; +}; +export const SideScheduleDto = Schema.Struct({ + paths: Schema.Array(SchedulePathDto).annotate({ + description: + "Ways to act on this side (e.g. instant + standard); paths[0] is the default", + }), +}).annotate({ identifier: "SideScheduleDto" }); +export type YieldRequirementsDto = { + readonly kycRequired: boolean; + readonly kyc?: KycMetadataDto; +}; +export const YieldRequirementsDto = Schema.Struct({ + kycRequired: Schema.Boolean.annotate({ + description: "Whether off-chain KYC is required before transacting", + }), + kyc: Schema.optionalKey( + Schema.suspend((): Schema.Codec => KycMetadataDto).annotate( + { + description: + "Public KYC criteria for rendering verification UI per opportunity", + } + ) + ), +}).annotate({ identifier: "YieldRequirementsDto" }); +export type ActionSimulationDto = { + readonly gas: SimulationGasDto; + readonly entryReserveEstimate?: string; +}; +export const ActionSimulationDto = Schema.Struct({ + gas: Schema.suspend( + (): Schema.Codec => SimulationGasDto + ).annotate({ + description: + "Estimated gas cost of the action, aggregated and per transaction.", + }), + entryReserveEstimate: Schema.optionalKey( + Schema.String.annotate({ + description: + "Total SOL side-reserve required for enter validation: account rent plus ~0.005 SOL priority-fee buffer. For max native-SOL deposit use balance minus this value; do not also subtract the gas amount. Only returned on enter simulations; omitted for exits and when unavailable.", + }) + ), +}).annotate({ identifier: "ActionSimulationDto" }); +export type BalanceDto = { + readonly address: string; + readonly type: BalanceType; + readonly amount: string; + readonly amountRaw: string; + readonly date?: string | null; + readonly feeConfigurationId?: string; + readonly pendingActions: ReadonlyArray; + readonly token: TokenDto; + readonly validator?: { + readonly address: string; + readonly name?: string; + readonly logoURI?: string; + readonly website?: string; + readonly rewardRate?: RewardRateDto; + readonly provider?: ValidatorProviderDto; + readonly commission?: number; + readonly tvlUsd?: string; + readonly tvl?: string; + readonly tvlRaw?: string; + readonly votingPower?: number; + readonly preferred?: boolean; + readonly minimumStake?: string; + readonly remainingPossibleStake?: string; + readonly remainingSlots?: number; + readonly nominatorCount?: number; + readonly status?: string; + readonly providerId?: string; + readonly subnet?: ValidatorSubnetDto; + }; + readonly validators?: ReadonlyArray | null; + readonly amountUsd?: string | null; + readonly isEarning: boolean; + readonly priceRange?: { readonly min: string; readonly max: string } & { + readonly [x: string]: Schema.Json; + }; + readonly tokenId?: string; + readonly shareAmount?: string; + readonly shareAmountRaw?: string; + readonly shareToken?: TokenDto; +}; +export const BalanceDto = Schema.Struct({ + address: Schema.String.annotate({ + description: "User wallet address that owns this balance", + examples: ["0x1234..."], + }), + type: Schema.suspend((): Schema.Codec => BalanceType).annotate({ + description: "Type of balance", + }), + amount: Schema.String.annotate({ + description: "Balance amount in underlying token", + examples: ["2.625"], + }), + amountRaw: Schema.String.annotate({ + description: "Raw balance amount (full precision)", + examples: ["2625000000000000000"], + }), + date: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Date relevant to this balance state", + examples: ["2025-04-23T08:00:00Z"], + format: "date-time", + }) + ), + feeConfigurationId: Schema.optionalKey( + Schema.String.annotate({ + description: "Fee configuration ID (if applicable)", + examples: ["fee-config-1"], + }) + ), + pendingActions: Schema.Array(PendingActionDto).annotate({ + description: "Pending actions for this balance", + }), + token: Schema.suspend((): Schema.Codec => TokenDto).annotate({ + description: "Token used for balance amounts", + }), + validator: Schema.optionalKey( + Schema.Struct({ + address: Schema.String.annotate({ + description: "Validator address or ID", + examples: ["cosmosvaloper1abc..."], + }), + name: Schema.optionalKey( + Schema.String.annotate({ + description: "Validator display name", + examples: ["StakeKit Validator"], + }) + ), + logoURI: Schema.optionalKey( + Schema.String.annotate({ + description: "Validator logo URI", + examples: ["https://stakekit.com/logo.png"], + }) + ), + website: Schema.optionalKey( + Schema.String.annotate({ + description: "Link to validator website", + examples: ["https://stakekit.com"], + }) + ), + rewardRate: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => RewardRateDto + ).annotate({ + description: + "Detailed reward rate breakdown by source (emissions, MEV, fees, etc.)", + }) + ), + provider: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => ValidatorProviderDto + ).annotate({ description: "Provider information for this validator" }) + ), + commission: Schema.optionalKey( + Schema.Number.annotate({ + description: "Commission rate charged by validator", + examples: [0.05], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + tvlUsd: Schema.optionalKey( + Schema.String.annotate({ + description: "Total value locked with this validator in USD", + examples: ["18,340,000"], + }) + ), + tvl: Schema.optionalKey( + Schema.String.annotate({ + description: "Total value locked with this validator in native token", + examples: ["8250.45"], + }) + ), + tvlRaw: Schema.optionalKey( + Schema.String.annotate({ + description: + "Raw total value locked with this validator (full precision)", + examples: ["8250450000000000000000"], + }) + ), + votingPower: Schema.optionalKey( + Schema.Number.annotate({ + description: "Validator's voting power share (0–1)", + examples: [0.013], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + preferred: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "Whether this validator is flagged as preferred", + examples: [true], + }) + ), + minimumStake: Schema.optionalKey( + Schema.String.annotate({ + description: "Minimum stake allowed in native token", + examples: ["1.0"], + }) + ), + remainingPossibleStake: Schema.optionalKey( + Schema.String.annotate({ + description: + "Maximum available stake before hitting cap in native token", + examples: ["285,714.28"], + }) + ), + remainingSlots: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Number of remaining nominator/delegator slots (for capped chains)", + examples: [8], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + nominatorCount: Schema.optionalKey( + Schema.Number.annotate({ + description: "Number of current nominators", + examples: [321], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })) + ), + status: Schema.optionalKey( + Schema.String.annotate({ + description: + "Validator status description (active, jailed, unbonding, etc.)", + examples: ["active"], + }) + ), + providerId: Schema.optionalKey( + Schema.String.annotate({ + description: "ID of the provider backing this validator", + examples: ["provider-1"], + }) + ), + subnet: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => ValidatorSubnetDto + ).annotate({ + description: + "Subnet metadata when the validator operates within a subnet (Bittensor)", + }) + ), + }).annotate({ description: "Validator information (if applicable)" }) + ), + validators: Schema.optionalKey( + Schema.Union([Schema.Array(ValidatorDto), Schema.Null]).annotate({ + description: + "Multiple validators information (when balance is distributed across multiple validators)", + }) + ), + amountUsd: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Value of the balance in USD", + examples: ["2,500.00"], + }) + ), + isEarning: Schema.Boolean.annotate({ + description: "Whether this balance is currently earning rewards", + examples: [true], + }), + priceRange: Schema.optionalKey( + Schema.StructWithRest( + Schema.Struct({ min: Schema.String, max: Schema.String }), + [ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), + ] + ).annotate({ + description: + "Price range for concentrated liquidity positions in tokens[1]/tokens[0] format", + }) ), - status: Schema.optionalKey( + tokenId: Schema.optionalKey( Schema.String.annotate({ description: - "Validator status description (active, jailed, unbonding, etc.)", - examples: ["active"], + "NFT token ID for liquidity positions (e.g., PancakeSwap V3 position NFT ID)", + examples: ["12345"], }) ), - providerId: Schema.optionalKey( + shareAmount: Schema.optionalKey( Schema.String.annotate({ - description: "ID of the provider backing this validator", - examples: ["provider-1"], + description: "Share balance in human-readable format", + examples: ["1.5"], }) ), - subnet: Schema.optionalKey( - Schema.suspend( - (): Schema.Codec => ValidatorSubnetDto - ).annotate({ - description: - "Subnet metadata when the validator operates within a subnet (Bittensor)", + shareAmountRaw: Schema.optionalKey( + Schema.String.annotate({ + description: "Share balance in full precision (smallest unit)", + examples: ["1500000000000000000"], }) ), -}).annotate({ identifier: "ValidatorDto" }); -export type ActionSimulationDto = { - readonly gas: SimulationGasDto; - readonly entryReserveEstimate?: string; -}; -export const ActionSimulationDto = Schema.Struct({ - gas: Schema.suspend( - (): Schema.Codec => SimulationGasDto - ).annotate({ - description: - "Estimated gas cost of the action, aggregated and per transaction.", - }), - entryReserveEstimate: Schema.optionalKey( - Schema.String.annotate({ + shareToken: Schema.optionalKey( + Schema.suspend((): Schema.Codec => TokenDto).annotate({ description: - "Total SOL side-reserve required for enter validation: account rent plus ~0.005 SOL priority-fee buffer. For max native-SOL deposit use balance minus this value; do not also subtract the gas amount. Only returned on enter simulations; omitted for exits and when unavailable.", + "The share token that shareAmount and shareAmountRaw are denominated in", }) ), -}).annotate({ identifier: "ActionSimulationDto" }); +}).annotate({ identifier: "BalanceDto" }); export type InvestmentScheduleDto = { readonly timezone: string; readonly subscription: SideScheduleDto; @@ -5068,15 +5811,27 @@ export type YieldMechanicsDto = { readonly possibleFeeTakingMechanisms?: PossibleFeeTakingMechanismsDto; }; export const YieldMechanicsDto = Schema.Struct({ - type: YieldType, + type: Schema.suspend((): Schema.Codec => YieldType).annotate({ + description: + "Type of yield mechanism (staking, restaking, LP, vault, etc.)", + }), requiresValidatorSelection: Schema.optionalKey( Schema.Boolean.annotate({ description: "Indicates whether this yield requires validator selection", examples: [true], }) ), - rewardSchedule: RewardSchedule, - rewardClaiming: RewardClaiming, + rewardSchedule: Schema.suspend( + (): Schema.Codec => RewardSchedule + ).annotate({ + description: + "How often rewards are distributed (e.g. continuously, epoch-based)", + }), + rewardClaiming: Schema.suspend( + (): Schema.Codec => RewardClaiming + ).annotate({ + description: "How rewards are claimed: auto, manual, or mixed", + }), gasFeeToken: Schema.suspend((): Schema.Codec => TokenDto).annotate({ description: "Token used for gas fees (typically native)", }), @@ -5140,114 +5895,311 @@ export const YieldMechanicsDto = Schema.Struct({ }) ), }).annotate({ identifier: "YieldMechanicsDto" }); -export type BalanceDto = { - readonly address: string; - readonly type: BalanceType; - readonly amount: string; - readonly amountRaw: string; - readonly date?: string | null; - readonly feeConfigurationId?: string; - readonly pendingActions: ReadonlyArray; - readonly token: TokenDto; - readonly validator?: ValidatorDto | null; - readonly validators?: ReadonlyArray | null; - readonly amountUsd?: string | null; - readonly isEarning: boolean; - readonly priceRange?: { readonly min: string; readonly max: string }; - readonly tokenId?: string; - readonly shareAmount?: string; - readonly shareAmountRaw?: string; - readonly shareToken?: TokenDto; +export type YieldBalancesDto = { + readonly yieldId: string; + readonly balances: ReadonlyArray; + readonly outputTokenBalance?: { + readonly address: string; + readonly type: BalanceType; + readonly amount: string; + readonly amountRaw: string; + readonly date?: string | null; + readonly feeConfigurationId?: string; + readonly pendingActions: ReadonlyArray; + readonly token: TokenDto; + readonly validator?: { + readonly address: string; + readonly name?: string; + readonly logoURI?: string; + readonly website?: string; + readonly rewardRate?: RewardRateDto; + readonly provider?: ValidatorProviderDto; + readonly commission?: number; + readonly tvlUsd?: string; + readonly tvl?: string; + readonly tvlRaw?: string; + readonly votingPower?: number; + readonly preferred?: boolean; + readonly minimumStake?: string; + readonly remainingPossibleStake?: string; + readonly remainingSlots?: number; + readonly nominatorCount?: number; + readonly status?: string; + readonly providerId?: string; + readonly subnet?: ValidatorSubnetDto; + }; + readonly validators?: ReadonlyArray | null; + readonly amountUsd?: string | null; + readonly isEarning: boolean; + readonly priceRange?: { readonly min: string; readonly max: string } & { + readonly [x: string]: Schema.Json; + }; + readonly tokenId?: string; + readonly shareAmount?: string; + readonly shareAmountRaw?: string; + readonly shareToken?: TokenDto; + }; + readonly rewardRate?: { + readonly total: number; + readonly rateType: string; + readonly components: ReadonlyArray; + }; }; -export const BalanceDto = Schema.Struct({ - address: Schema.String.annotate({ - description: "User wallet address that owns this balance", - examples: ["0x1234..."], - }), - type: BalanceType, - amount: Schema.String.annotate({ - description: "Balance amount in underlying token", - examples: ["2.625"], - }), - amountRaw: Schema.String.annotate({ - description: "Raw balance amount (full precision)", - examples: ["2625000000000000000"], - }), - date: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Date relevant to this balance state", - examples: ["2025-04-23T08:00:00Z"], - format: "date-time", - }) - ), - feeConfigurationId: Schema.optionalKey( - Schema.String.annotate({ - description: "Fee configuration ID (if applicable)", - examples: ["fee-config-1"], - }) - ), - pendingActions: Schema.Array(PendingActionDto).annotate({ - description: "Pending actions for this balance", +export const YieldBalancesDto = Schema.Struct({ + yieldId: Schema.String.annotate({ + description: "Unique identifier of the yield", + examples: ["ethereum-eth-lido-staking"], }), - token: Schema.suspend((): Schema.Codec => TokenDto).annotate({ - description: "Token used for balance amounts", + balances: Schema.Array(BalanceDto).annotate({ + description: "List of balances for this yield", }), - validator: Schema.optionalKey( - Schema.Union([ - Schema.suspend((): Schema.Codec => ValidatorDto).annotate({ - description: "Validator information (if applicable)", + outputTokenBalance: Schema.optionalKey( + Schema.Struct({ + address: Schema.String.annotate({ + description: "User wallet address that owns this balance", + examples: ["0x1234..."], }), - Schema.Null, - ]) - ), - validators: Schema.optionalKey( - Schema.Union([Schema.Array(ValidatorDto), Schema.Null]).annotate({ - description: - "Multiple validators information (when balance is distributed across multiple validators)", - }) - ), - amountUsd: Schema.optionalKey( - Schema.Union([Schema.String, Schema.Null]).annotate({ - description: "Value of the balance in USD", - examples: ["2,500.00"], - }) - ), - isEarning: Schema.Boolean.annotate({ - description: "Whether this balance is currently earning rewards", - examples: [true], - }), - priceRange: Schema.optionalKey( - Schema.Struct({ min: Schema.String, max: Schema.String }).annotate({ - description: - "Price range for concentrated liquidity positions in tokens[1]/tokens[0] format", - }) - ), - tokenId: Schema.optionalKey( - Schema.String.annotate({ - description: - "NFT token ID for liquidity positions (e.g., PancakeSwap V3 position NFT ID)", - examples: ["12345"], - }) - ), - shareAmount: Schema.optionalKey( - Schema.String.annotate({ - description: "Share balance in human-readable format", - examples: ["1.5"], - }) - ), - shareAmountRaw: Schema.optionalKey( - Schema.String.annotate({ - description: "Share balance in full precision (smallest unit)", - examples: ["1500000000000000000"], - }) + type: Schema.suspend( + (): Schema.Codec => BalanceType + ).annotate({ description: "Type of balance" }), + amount: Schema.String.annotate({ + description: "Balance amount in underlying token", + examples: ["2.625"], + }), + amountRaw: Schema.String.annotate({ + description: "Raw balance amount (full precision)", + examples: ["2625000000000000000"], + }), + date: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Date relevant to this balance state", + examples: ["2025-04-23T08:00:00Z"], + format: "date-time", + }) + ), + feeConfigurationId: Schema.optionalKey( + Schema.String.annotate({ + description: "Fee configuration ID (if applicable)", + examples: ["fee-config-1"], + }) + ), + pendingActions: Schema.Array(PendingActionDto).annotate({ + description: "Pending actions for this balance", + }), + token: Schema.suspend((): Schema.Codec => TokenDto).annotate({ + description: "Token used for balance amounts", + }), + validator: Schema.optionalKey( + Schema.Struct({ + address: Schema.String.annotate({ + description: "Validator address or ID", + examples: ["cosmosvaloper1abc..."], + }), + name: Schema.optionalKey( + Schema.String.annotate({ + description: "Validator display name", + examples: ["StakeKit Validator"], + }) + ), + logoURI: Schema.optionalKey( + Schema.String.annotate({ + description: "Validator logo URI", + examples: ["https://stakekit.com/logo.png"], + }) + ), + website: Schema.optionalKey( + Schema.String.annotate({ + description: "Link to validator website", + examples: ["https://stakekit.com"], + }) + ), + rewardRate: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => RewardRateDto + ).annotate({ + description: + "Detailed reward rate breakdown by source (emissions, MEV, fees, etc.)", + }) + ), + provider: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => ValidatorProviderDto + ).annotate({ + description: "Provider information for this validator", + }) + ), + commission: Schema.optionalKey( + Schema.Number.annotate({ + description: "Commission rate charged by validator", + examples: [0.05], + }).check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + ), + tvlUsd: Schema.optionalKey( + Schema.String.annotate({ + description: "Total value locked with this validator in USD", + examples: ["18,340,000"], + }) + ), + tvl: Schema.optionalKey( + Schema.String.annotate({ + description: + "Total value locked with this validator in native token", + examples: ["8250.45"], + }) + ), + tvlRaw: Schema.optionalKey( + Schema.String.annotate({ + description: + "Raw total value locked with this validator (full precision)", + examples: ["8250450000000000000000"], + }) + ), + votingPower: Schema.optionalKey( + Schema.Number.annotate({ + description: "Validator's voting power share (0–1)", + examples: [0.013], + }).check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + ), + preferred: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "Whether this validator is flagged as preferred", + examples: [true], + }) + ), + minimumStake: Schema.optionalKey( + Schema.String.annotate({ + description: "Minimum stake allowed in native token", + examples: ["1.0"], + }) + ), + remainingPossibleStake: Schema.optionalKey( + Schema.String.annotate({ + description: + "Maximum available stake before hitting cap in native token", + examples: ["285,714.28"], + }) + ), + remainingSlots: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Number of remaining nominator/delegator slots (for capped chains)", + examples: [8], + }).check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + ), + nominatorCount: Schema.optionalKey( + Schema.Number.annotate({ + description: "Number of current nominators", + examples: [321], + }).check( + Schema.isFinite().annotate({ expected: "a finite number" }) + ) + ), + status: Schema.optionalKey( + Schema.String.annotate({ + description: + "Validator status description (active, jailed, unbonding, etc.)", + examples: ["active"], + }) + ), + providerId: Schema.optionalKey( + Schema.String.annotate({ + description: "ID of the provider backing this validator", + examples: ["provider-1"], + }) + ), + subnet: Schema.optionalKey( + Schema.suspend( + (): Schema.Codec => ValidatorSubnetDto + ).annotate({ + description: + "Subnet metadata when the validator operates within a subnet (Bittensor)", + }) + ), + }).annotate({ description: "Validator information (if applicable)" }) + ), + validators: Schema.optionalKey( + Schema.Union([Schema.Array(ValidatorDto), Schema.Null]).annotate({ + description: + "Multiple validators information (when balance is distributed across multiple validators)", + }) + ), + amountUsd: Schema.optionalKey( + Schema.Union([Schema.String, Schema.Null]).annotate({ + description: "Value of the balance in USD", + examples: ["2,500.00"], + }) + ), + isEarning: Schema.Boolean.annotate({ + description: "Whether this balance is currently earning rewards", + examples: [true], + }), + priceRange: Schema.optionalKey( + Schema.StructWithRest( + Schema.Struct({ min: Schema.String, max: Schema.String }), + [ + Schema.Record( + Schema.String, + Schema.Json.annotate({ expected: "JSON value" }) + ), + ] + ).annotate({ + description: + "Price range for concentrated liquidity positions in tokens[1]/tokens[0] format", + }) + ), + tokenId: Schema.optionalKey( + Schema.String.annotate({ + description: + "NFT token ID for liquidity positions (e.g., PancakeSwap V3 position NFT ID)", + examples: ["12345"], + }) + ), + shareAmount: Schema.optionalKey( + Schema.String.annotate({ + description: "Share balance in human-readable format", + examples: ["1.5"], + }) + ), + shareAmountRaw: Schema.optionalKey( + Schema.String.annotate({ + description: "Share balance in full precision (smallest unit)", + examples: ["1500000000000000000"], + }) + ), + shareToken: Schema.optionalKey( + Schema.suspend((): Schema.Codec => TokenDto).annotate({ + description: + "The share token that shareAmount and shareAmountRaw are denominated in", + }) + ), + }).annotate({ description: "Balance for the output token" }) ), - shareToken: Schema.optionalKey( - Schema.suspend((): Schema.Codec => TokenDto).annotate({ + rewardRate: Schema.optionalKey( + Schema.Struct({ + total: Schema.Number.annotate({ + description: + "Estimated underlying integration reward rate across all sources. May include an additional campaign component when an active campaign applies to this project.", + examples: [6.5], + }).check(Schema.isFinite().annotate({ expected: "a finite number" })), + rateType: Schema.String.annotate({ + description: "Whether this reward rate is APR or APY", + examples: ["APR"], + }), + components: Schema.Array(RewardDto).annotate({ + description: "Breakdown of reward rates by source", + }), + }).annotate({ description: - "The share token that shareAmount and shareAmountRaw are denominated in", + "Personalized reward rate breakdown for this balance position", }) ), -}).annotate({ identifier: "BalanceDto" }); +}).annotate({ identifier: "YieldBalancesDto" }); export type YieldDto = { readonly id: string; readonly network: @@ -5272,6 +6224,7 @@ export type YieldDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -5402,6 +6355,7 @@ export const YieldDto = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -5585,80 +6539,13 @@ export const YieldDto = Schema.Struct({ ), executionContracts: Schema.optionalKey( Schema.suspend( - (): Schema.Codec => ExecutionContractsDto - ).annotate({ - description: - "Per-action set of on-chain contract addresses that transactions may target (tx.to). Used by policy-enforced custody providers to whitelist execution destinations.", - }) - ), -}).annotate({ identifier: "YieldDto" }); -export type YieldBalancesDto = { - readonly yieldId: string; - readonly balances: ReadonlyArray; - readonly outputTokenBalance?: BalanceDto | null; - readonly rewardRate?: RewardRateDto | null; -}; -export const YieldBalancesDto = Schema.Struct({ - yieldId: Schema.String.annotate({ - description: "Unique identifier of the yield", - examples: ["ethereum-eth-lido-staking"], - }), - balances: Schema.Array(BalanceDto).annotate({ - description: "List of balances for this yield", - }), - outputTokenBalance: Schema.optionalKey( - Schema.Union([ - Schema.suspend((): Schema.Codec => BalanceDto).annotate({ - description: "Balance for the output token", - }), - Schema.Null, - ]) - ), - rewardRate: Schema.optionalKey( - Schema.Union([ - Schema.suspend((): Schema.Codec => RewardRateDto).annotate( - { - description: - "Personalized reward rate breakdown for this balance position", - } - ), - Schema.Null, - ]) - ), -}).annotate({ identifier: "YieldBalancesDto" }); -export type BalanceHistorySnapshotDto = { - readonly timestamp: string; - readonly blockNumber: number; - readonly yieldId: string; - readonly balances: ReadonlyArray; - readonly periodDelta?: BalanceHistorySnapshotPeriodDeltaDto; -}; -export const BalanceHistorySnapshotDto = Schema.Struct({ - timestamp: Schema.String.annotate({ - description: "Timestamp of this snapshot (ISO 8601)", - examples: ["2025-07-12T00:00:00.000Z"], - }), - blockNumber: Schema.Number.annotate({ - description: "Block number closest to this snapshot", - examples: [20540000], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - yieldId: Schema.String.annotate({ - description: "Unique identifier of the yield", - examples: ["ethereum-eth-lido-staking"], - }), - balances: Schema.Array(BalanceDto).annotate({ - description: "Balance entries at this point in time", - }), - periodDelta: Schema.optionalKey( - Schema.suspend( - (): Schema.Codec => - BalanceHistorySnapshotPeriodDeltaDto + (): Schema.Codec => ExecutionContractsDto ).annotate({ description: - "Balance delta during this period vs the previous snapshot. Omitted for point-in-time (blockNumber) queries.", + "Per-action set of on-chain contract addresses that transactions may target (tx.to). Used by policy-enforced custody providers to whitelist execution destinations.", }) ), -}).annotate({ identifier: "BalanceHistorySnapshotDto" }); +}).annotate({ identifier: "YieldDto" }); export type BalancesResponseDto = { readonly items: ReadonlyArray; readonly errors: ReadonlyArray; @@ -5697,6 +6584,7 @@ export type YieldsControllerGetYieldsParams = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -5824,7 +6712,7 @@ export type YieldsControllerGetYieldsParams = { }; export const YieldsControllerGetYieldsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -5833,7 +6721,7 @@ export const YieldsControllerGetYieldsParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -5869,6 +6757,7 @@ export const YieldsControllerGetYieldsParams = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -5954,21 +6843,25 @@ export const YieldsControllerGetYieldsParams = Schema.Struct({ "hyperliquid", ]) ), - chainId: Schema.optionalKey(Schema.String), + chainId: Schema.optionalKey(Schema.String.annotate({ examples: ["1"] })), networks: Schema.optionalKey(Schema.String), yieldId: Schema.optionalKey( - Schema.String.check( + Schema.String.annotate({ + examples: ["optimism-usdt-aave-v3-lending"], + }).check( Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200", }) ) ), yieldIds: Schema.optionalKey( - Schema.Array(Schema.String).check( - Schema.isMaxLength(100).annotate({ - expected: "a value with a length of at most 100", - }) - ) + Schema.Array(Schema.String) + .annotate({ examples: [["optimism-usdt-aave-v3-lending"]] }) + .check( + Schema.isMaxLength(100).annotate({ + expected: "a value with a length of at most 100", + }) + ) ), type: Schema.optionalKey( Schema.Literals([ @@ -5998,15 +6891,19 @@ export const YieldsControllerGetYieldsParams = Schema.Struct({ ]) ) ), - hasCooldownPeriod: Schema.optionalKey(Schema.Boolean), - hasWarmupPeriod: Schema.optionalKey(Schema.Boolean), + hasCooldownPeriod: Schema.optionalKey( + Schema.Boolean.annotate({ examples: [true] }) + ), + hasWarmupPeriod: Schema.optionalKey( + Schema.Boolean.annotate({ examples: [true] }) + ), token: Schema.optionalKey(Schema.String), inputToken: Schema.optionalKey(Schema.String), inputTokens: Schema.optionalKey(Schema.Array(Schema.String)), provider: Schema.optionalKey(Schema.String), providers: Schema.optionalKey(Schema.Array(Schema.String)), search: Schema.optionalKey(Schema.String), - prime: Schema.optionalKey(Schema.Boolean), + prime: Schema.optionalKey(Schema.Boolean.annotate({ examples: [true] })), sort: Schema.optionalKey( Schema.Literals([ "statusEnterAsc", @@ -6022,7 +6919,7 @@ export type YieldsControllerGetYields200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export const YieldsControllerGetYields200 = Schema.Struct({ total: Schema.Number.annotate({ @@ -6037,7 +6934,7 @@ export const YieldsControllerGetYields200 = Schema.Struct({ description: "Limit of the current page", examples: [20], }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - items: Schema.optionalKey(Schema.Array(YieldDto)), + items: Schema.optionalKey(Schema.Never), }); export type YieldsControllerGetYields400 = { readonly message?: string; @@ -6361,154 +7258,6 @@ export const YieldsControllerGetYieldRisk500 = Schema.Struct({ ) ), }); -export type YieldsControllerGetBalanceHistoryParams = { - readonly address: string; - readonly from?: string; - readonly to?: string; - readonly blockNumber?: number; - readonly feeConfigurationId?: string; - readonly interval?: "block" | "hour" | "day" | "week"; - readonly sort?: "asc" | "desc"; - readonly limit?: number; - readonly offset?: number; -}; -export const YieldsControllerGetBalanceHistoryParams = Schema.Struct({ - address: Schema.String, - from: Schema.optionalKey(Schema.String), - to: Schema.optionalKey(Schema.String), - blockNumber: Schema.optionalKey( - Schema.Number.check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), - feeConfigurationId: Schema.optionalKey(Schema.String), - interval: Schema.optionalKey( - Schema.Literals(["block", "hour", "day", "week"]) - ), - sort: Schema.optionalKey(Schema.Literals(["asc", "desc"])), - limit: Schema.optionalKey( - Schema.Number.annotate({ default: 30 }) - .check(Schema.isFinite().annotate({ expected: "a finite number" })) - .check( - Schema.isGreaterThanOrEqualTo(1).annotate({ - expected: "a value greater than or equal to 1", - }) - ) - .check( - Schema.isLessThanOrEqualTo(100).annotate({ - expected: "a value less than or equal to 100", - }) - ) - ), - offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) - .check(Schema.isFinite().annotate({ expected: "a finite number" })) - .check( - Schema.isGreaterThanOrEqualTo(0).annotate({ - expected: "a value greater than or equal to 0", - }) - ) - ), -}); -export type YieldsControllerGetBalanceHistory200 = { - readonly total: number; - readonly offset: number; - readonly limit: number; - readonly items?: ReadonlyArray; -}; -export const YieldsControllerGetBalanceHistory200 = Schema.Struct({ - total: Schema.Number.annotate({ - description: "Total number of items available", - examples: [100], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - offset: Schema.Number.annotate({ - description: "Offset of the current page", - examples: [0], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - limit: Schema.Number.annotate({ - description: "Limit of the current page", - examples: [20], - }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - items: Schema.optionalKey(Schema.Array(BalanceHistorySnapshotDto)), -}); -export type YieldsControllerGetBalanceHistory400 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; -}; -export const YieldsControllerGetBalanceHistory400 = Schema.Struct({ - message: Schema.optionalKey( - Schema.String.annotate({ examples: ["Validation failed"] }) - ), - error: Schema.optionalKey( - Schema.String.annotate({ examples: ["Bad Request"] }) - ), - statusCode: Schema.optionalKey( - Schema.Number.annotate({ examples: [400] }).check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), -}); -export type YieldsControllerGetBalanceHistory401 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; -}; -export const YieldsControllerGetBalanceHistory401 = Schema.Struct({ - message: Schema.optionalKey( - Schema.String.annotate({ examples: ["Invalid API key"] }) - ), - error: Schema.optionalKey( - Schema.String.annotate({ examples: ["Unauthorized"] }) - ), - statusCode: Schema.optionalKey( - Schema.Number.annotate({ examples: [401] }).check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), -}); -export type YieldsControllerGetBalanceHistory429 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; - readonly retryAfter?: number; -}; -export const YieldsControllerGetBalanceHistory429 = Schema.Struct({ - message: Schema.optionalKey( - Schema.String.annotate({ examples: ["Rate limit exceeded"] }) - ), - error: Schema.optionalKey( - Schema.String.annotate({ examples: ["Too Many Requests"] }) - ), - statusCode: Schema.optionalKey( - Schema.Number.annotate({ examples: [429] }).check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), - retryAfter: Schema.optionalKey( - Schema.Number.annotate({ examples: [30] }).check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), -}); -export type YieldsControllerGetBalanceHistory500 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; -}; -export const YieldsControllerGetBalanceHistory500 = Schema.Struct({ - message: Schema.optionalKey( - Schema.String.annotate({ examples: ["Internal server error"] }) - ), - error: Schema.optionalKey( - Schema.String.annotate({ examples: ["Internal Server Error"] }) - ), - statusCode: Schema.optionalKey( - Schema.Number.annotate({ examples: [500] }).check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), -}); export type YieldsControllerGetYieldBalancesRequestJson = YieldBalancesRequestDto; export const YieldsControllerGetYieldBalancesRequestJson = @@ -6593,123 +7342,6 @@ export const YieldsControllerGetYieldBalances500 = Schema.Struct({ ) ), }); -export type YieldsControllerGetYieldRewardsParams = { - readonly address: string; - readonly from?: string; - readonly to?: string; - readonly sort?: "asc" | "desc"; - readonly limit?: number; - readonly offset?: number; -}; -export const YieldsControllerGetYieldRewardsParams = Schema.Struct({ - address: Schema.String, - from: Schema.optionalKey(Schema.String), - to: Schema.optionalKey(Schema.String), - sort: Schema.optionalKey(Schema.Literals(["asc", "desc"])), - limit: Schema.optionalKey( - Schema.Number.annotate({ default: 100 }) - .check(Schema.isFinite().annotate({ expected: "a finite number" })) - .check( - Schema.isGreaterThanOrEqualTo(1).annotate({ - expected: "a value greater than or equal to 1", - }) - ) - .check( - Schema.isLessThanOrEqualTo(100).annotate({ - expected: "a value less than or equal to 100", - }) - ) - ), - offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) - .check(Schema.isFinite().annotate({ expected: "a finite number" })) - .check( - Schema.isGreaterThanOrEqualTo(0).annotate({ - expected: "a value greater than or equal to 0", - }) - ) - ), -}); -export type YieldsControllerGetYieldRewards200 = PaginatedResponseDto; -export const YieldsControllerGetYieldRewards200 = PaginatedResponseDto; -export type YieldsControllerGetYieldRewards400 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; -}; -export const YieldsControllerGetYieldRewards400 = Schema.Struct({ - message: Schema.optionalKey( - Schema.String.annotate({ examples: ["Validation failed"] }) - ), - error: Schema.optionalKey( - Schema.String.annotate({ examples: ["Bad Request"] }) - ), - statusCode: Schema.optionalKey( - Schema.Number.annotate({ examples: [400] }).check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), -}); -export type YieldsControllerGetYieldRewards401 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; -}; -export const YieldsControllerGetYieldRewards401 = Schema.Struct({ - message: Schema.optionalKey( - Schema.String.annotate({ examples: ["Invalid API key"] }) - ), - error: Schema.optionalKey( - Schema.String.annotate({ examples: ["Unauthorized"] }) - ), - statusCode: Schema.optionalKey( - Schema.Number.annotate({ examples: [401] }).check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), -}); -export type YieldsControllerGetYieldRewards429 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; - readonly retryAfter?: number; -}; -export const YieldsControllerGetYieldRewards429 = Schema.Struct({ - message: Schema.optionalKey( - Schema.String.annotate({ examples: ["Rate limit exceeded"] }) - ), - error: Schema.optionalKey( - Schema.String.annotate({ examples: ["Too Many Requests"] }) - ), - statusCode: Schema.optionalKey( - Schema.Number.annotate({ examples: [429] }).check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), - retryAfter: Schema.optionalKey( - Schema.Number.annotate({ examples: [30] }).check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), -}); -export type YieldsControllerGetYieldRewards500 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; -}; -export const YieldsControllerGetYieldRewards500 = Schema.Struct({ - message: Schema.optionalKey( - Schema.String.annotate({ examples: ["Internal server error"] }) - ), - error: Schema.optionalKey( - Schema.String.annotate({ examples: ["Internal Server Error"] }) - ), - statusCode: Schema.optionalKey( - Schema.Number.annotate({ examples: [500] }).check( - Schema.isFinite().annotate({ expected: "a finite number" }) - ) - ), -}); export type YieldsControllerGetYieldRewardRateHistoryParams = { readonly offset?: number; readonly limit?: number; @@ -6720,7 +7352,7 @@ export type YieldsControllerGetYieldRewardRateHistoryParams = { }; export const YieldsControllerGetYieldRewardRateHistoryParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -6729,7 +7361,7 @@ export const YieldsControllerGetYieldRewardRateHistoryParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 100 }) + Schema.Number.annotate({ default: 100, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -6742,8 +7374,12 @@ export const YieldsControllerGetYieldRewardRateHistoryParams = Schema.Struct({ }) ) ), - from: Schema.optionalKey(Schema.String), - to: Schema.optionalKey(Schema.String), + from: Schema.optionalKey( + Schema.String.annotate({ examples: ["2025-01-01T00:00:00Z"] }) + ), + to: Schema.optionalKey( + Schema.String.annotate({ examples: ["2025-07-10T00:00:00Z"] }) + ), period: Schema.optionalKey( Schema.Literals(["1d", "7d", "30d", "90d", "1y", "all"]) ), @@ -6842,7 +7478,7 @@ export type YieldsControllerGetYieldTvlHistoryParams = { }; export const YieldsControllerGetYieldTvlHistoryParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -6851,7 +7487,7 @@ export const YieldsControllerGetYieldTvlHistoryParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 100 }) + Schema.Number.annotate({ default: 100, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -6864,13 +7500,21 @@ export const YieldsControllerGetYieldTvlHistoryParams = Schema.Struct({ }) ) ), - from: Schema.optionalKey(Schema.String), - to: Schema.optionalKey(Schema.String), + from: Schema.optionalKey( + Schema.String.annotate({ examples: ["2025-01-01T00:00:00Z"] }) + ), + to: Schema.optionalKey( + Schema.String.annotate({ examples: ["2025-07-10T00:00:00Z"] }) + ), period: Schema.optionalKey( Schema.Literals(["1d", "7d", "30d", "90d", "1y", "all"]) ), interval: Schema.optionalKey(Schema.Literals(["day", "week", "month"])), - feeConfigurationId: Schema.optionalKey(Schema.String), + feeConfigurationId: Schema.optionalKey( + Schema.String.annotate({ + examples: ["66f299cd-aaaa-bbbb-cccc-d1f26e3a02db"], + }) + ), }); export type YieldsControllerGetYieldTvlHistory200 = TvlHistoryResponseDto; export const YieldsControllerGetYieldTvlHistory200 = TvlHistoryResponseDto; @@ -6963,7 +7607,7 @@ export type YieldsControllerGetYieldValidatorsParams = { }; export const YieldsControllerGetYieldValidatorsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -6972,7 +7616,7 @@ export const YieldsControllerGetYieldValidatorsParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -6995,7 +7639,7 @@ export type YieldsControllerGetYieldValidators200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export const YieldsControllerGetYieldValidators200 = Schema.Struct({ total: Schema.Number.annotate({ @@ -7010,7 +7654,7 @@ export const YieldsControllerGetYieldValidators200 = Schema.Struct({ description: "Limit of the current page", examples: [20], }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - items: Schema.optionalKey(Schema.Array(ValidatorDto)), + items: Schema.optionalKey(Schema.Never), }); export type YieldsControllerGetYieldValidators400 = { readonly message?: string; @@ -7097,7 +7741,7 @@ export type YieldsControllerGetYieldCampaignsParams = { }; export const YieldsControllerGetYieldCampaignsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -7106,7 +7750,7 @@ export const YieldsControllerGetYieldCampaignsParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -7125,7 +7769,7 @@ export type YieldsControllerGetYieldCampaigns200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export const YieldsControllerGetYieldCampaigns200 = Schema.Struct({ total: Schema.Number.annotate({ @@ -7140,7 +7784,7 @@ export const YieldsControllerGetYieldCampaigns200 = Schema.Struct({ description: "Limit of the current page", examples: [20], }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - items: Schema.optionalKey(Schema.Array(YieldCampaignDto)), + items: Schema.optionalKey(Schema.Never), }); export type YieldsControllerGetYieldCampaigns400 = { readonly message?: string; @@ -7247,6 +7891,7 @@ export type TokensControllerGetTokensParams = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -7386,6 +8031,7 @@ export const TokensControllerGetTokensParams = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -7510,7 +8156,7 @@ export type TokensControllerGetTokens200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export const TokensControllerGetTokens200 = Schema.Struct({ total: Schema.Number.annotate({ @@ -7525,7 +8171,7 @@ export const TokensControllerGetTokens200 = Schema.Struct({ description: "Limit of the current page", examples: [20], }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - items: Schema.optionalKey(Schema.Array(TokenWithAvailableYieldsDto)), + items: Schema.optionalKey(Schema.Never), }); export type TokensControllerGetTokens400 = { readonly message?: string; @@ -7684,6 +8330,7 @@ export type ActionsControllerGetActionsParams = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -7770,7 +8417,7 @@ export type ActionsControllerGetActionsParams = { }; export const ActionsControllerGetActionsParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -7779,7 +8426,7 @@ export const ActionsControllerGetActionsParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -7792,7 +8439,9 @@ export const ActionsControllerGetActionsParams = Schema.Struct({ }) ) ), - address: Schema.String, + address: Schema.String.annotate({ + examples: ["0x742d35Cc6634C0532925a3b844Bc454e4438f44e"], + }), status: Schema.optionalKey( Schema.Literals([ "CANCELED", @@ -7844,7 +8493,9 @@ export const ActionsControllerGetActionsParams = Schema.Struct({ "DELEGATE", ]) ), - yieldId: Schema.optionalKey(Schema.String), + yieldId: Schema.optionalKey( + Schema.String.annotate({ examples: ["ethereum-eth-lido-staking"] }) + ), yieldTypes: Schema.optionalKey( Schema.Array( Schema.Literals([ @@ -7883,6 +8534,7 @@ export const ActionsControllerGetActionsParams = Schema.Struct({ "monad", "robinhood", "robinhood-testnet", + "arc-testnet", "avalanche-c", "avalanche-c-atomic", "avalanche-p", @@ -7973,7 +8625,7 @@ export type ActionsControllerGetActions200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export const ActionsControllerGetActions200 = Schema.Struct({ total: Schema.Number.annotate({ @@ -7988,7 +8640,7 @@ export const ActionsControllerGetActions200 = Schema.Struct({ description: "Limit of the current page", examples: [20], }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - items: Schema.optionalKey(Schema.Array(ActionDto)), + items: Schema.optionalKey(Schema.Never), }); export type ActionsControllerGetActions400 = { readonly message?: string; @@ -8994,7 +9646,7 @@ export type ProvidersControllerGetProvidersParams = { }; export const ProvidersControllerGetProvidersParams = Schema.Struct({ offset: Schema.optionalKey( - Schema.Number.annotate({ default: 0 }) + Schema.Number.annotate({ default: 0, examples: [0] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(0).annotate({ @@ -9003,7 +9655,7 @@ export const ProvidersControllerGetProvidersParams = Schema.Struct({ ) ), limit: Schema.optionalKey( - Schema.Number.annotate({ default: 20 }) + Schema.Number.annotate({ default: 20, examples: [20] }) .check(Schema.isFinite().annotate({ expected: "a finite number" })) .check( Schema.isGreaterThanOrEqualTo(1).annotate({ @@ -9021,7 +9673,7 @@ export type ProvidersControllerGetProviders200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export const ProvidersControllerGetProviders200 = Schema.Struct({ total: Schema.Number.annotate({ @@ -9036,7 +9688,7 @@ export const ProvidersControllerGetProviders200 = Schema.Struct({ description: "Limit of the current page", examples: [20], }).check(Schema.isFinite().annotate({ expected: "a finite number" })), - items: Schema.optionalKey(Schema.Array(ProviderDto)), + items: Schema.optionalKey(Schema.Never), }); export type ProvidersControllerGetProviders400 = { readonly message?: string; diff --git a/packages/widget/src/generated/api/yield.ts b/packages/widget/src/generated/api/yield.ts index dc78e1469..1629a1077 100644 --- a/packages/widget/src/generated/api/yield.ts +++ b/packages/widget/src/generated/api/yield.ts @@ -7,6 +7,172 @@ import * as HttpClientError from "effect/unstable/http/HttpClientError"; import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest"; import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse"; // non-recursive definitions +export type Networks = + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; +export type GetBalancesArgumentsDto = { + readonly cAddressBech?: string; + readonly pAddressBech?: string; + readonly autoSweepDayOfMonth?: number; + readonly autoSweepTimezone?: string; +}; +export type BalanceType = + | "active" + | "entering" + | "exiting" + | "withdrawable" + | "claimable" + | "locked"; +export type ArgumentFieldDto = { + readonly name: + | "amount" + | "amountRaw" + | "amounts" + | "shareAmount" + | "shareAmountRaw" + | "validatorAddress" + | "validatorAddresses" + | "receiverAddress" + | "providerId" + | "duration" + | "inputToken" + | "inputTokenNetwork" + | "outputToken" + | "outputTokenNetwork" + | "subnetId" + | "tronResource" + | "feeConfigurationId" + | "cosmosPubKey" + | "tezosPubKey" + | "cAddressBech" + | "pAddressBech" + | "executionMode" + | "ledgerWalletApiCompatible" + | "useMaxAmount" + | "useInstantExecution" + | "useAutoClaim" + | "rangeMin" + | "rangeMax" + | "percentage" + | "tokenId" + | "skipPrechecks" + | "useMaxAllowance" + | "feePayerAddress"; + readonly type: "string" | "number" | "address" | "enum" | "boolean"; + readonly label: string; + readonly description?: string; + readonly required?: boolean; + readonly options?: ReadonlyArray; + readonly optionsRef?: string; + readonly default?: { readonly [x: string]: unknown }; + readonly placeholder?: string; + readonly minimum?: string | null; + readonly maximum?: string | null; + readonly isArray?: boolean; +}; export type TokenDto = { readonly symbol: string; readonly name: string; @@ -33,6 +199,7 @@ export type TokenDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -121,6 +288,21 @@ export type TokenDto = { readonly isPoints?: boolean; readonly coinGeckoId?: string; }; +export type RevShareDetailsDto = { + readonly minRevShare: number; + readonly maxRevShare: number; +}; +export type ValidatorSubnetDto = { + readonly id: number; + readonly name?: string; + readonly tokenSymbol?: string; + readonly tvl?: string; + readonly pricePerShare?: string; +}; +export type YieldErrorDto = { + readonly yieldId: string; + readonly error: string; +}; export type YieldStatisticsDto = { readonly tvlUsd?: string | null; readonly tvl?: string | null; @@ -201,53 +383,6 @@ export type SelfAttestationDocumentDto = { readonly name: string; readonly url: string; }; -export type ArgumentFieldDto = { - readonly name: - | "amount" - | "amountRaw" - | "amounts" - | "shareAmount" - | "shareAmountRaw" - | "validatorAddress" - | "validatorAddresses" - | "receiverAddress" - | "providerId" - | "duration" - | "inputToken" - | "inputTokenNetwork" - | "outputToken" - | "outputTokenNetwork" - | "subnetId" - | "tronResource" - | "feeConfigurationId" - | "cosmosPubKey" - | "tezosPubKey" - | "cAddressBech" - | "pAddressBech" - | "executionMode" - | "ledgerWalletApiCompatible" - | "useMaxAmount" - | "useInstantExecution" - | "useAutoClaim" - | "rangeMin" - | "rangeMax" - | "percentage" - | "tokenId" - | "skipPrechecks" - | "useMaxAllowance" - | "feePayerAddress"; - readonly type: "string" | "number" | "address" | "enum" | "boolean"; - readonly label: string; - readonly description?: string; - readonly required?: boolean; - readonly options?: ReadonlyArray; - readonly optionsRef?: string; - readonly default?: {}; - readonly placeholder?: string; - readonly minimum?: string | null; - readonly maximum?: string | null; - readonly isArray?: boolean; -}; export type PossibleFeeTakingMechanismsDto = { readonly depositFee: boolean; readonly managementFee: boolean; @@ -268,161 +403,140 @@ export type LiquidityStateDto = { readonly liquidity?: string | null; readonly utilization?: string | null; }; -export type AllocationRewardRateDto = { - readonly total: number; - readonly rateType: string; -}; -export type WindowBoundsDto = { - readonly opensAt: string; - readonly closesAt: string; - readonly source?: "onchain" | "api" | "config"; -}; -export type PathLimitsDto = { - readonly individualPer24h?: string; - readonly globalPer24h?: string; - readonly globalRemainingPer24h?: string; - readonly maxFractionOfNav?: number; - readonly liquidityBounded?: boolean; - readonly availableLiquidity?: string; - readonly minimumAmount?: string; -}; -export type PathFeeDto = { readonly rate: number }; -export type ExecutionContractsDto = { - readonly enter?: ReadonlyArray; - readonly exit?: ReadonlyArray; -}; -export type Networks = - | "ethereum" - | "ethereum-goerli" - | "ethereum-holesky" - | "ethereum-sepolia" - | "ethereum-hoodi" - | "arbitrum" - | "base" - | "base-sepolia" - | "gnosis" - | "optimism" - | "polygon" - | "polygon-amoy" - | "starknet" - | "zksync" - | "linea" - | "unichain" - | "plume" - | "monad-testnet" - | "monad" - | "robinhood" - | "robinhood-testnet" - | "avalanche-c" - | "avalanche-c-atomic" - | "avalanche-p" - | "binance" - | "celo" - | "fantom" - | "harmony" - | "moonriver" - | "okc" - | "viction" - | "core" - | "sonic" - | "plasma" - | "katana" - | "hyperevm" - | "tempo" - | "pharos" - | "agoric" - | "akash" - | "axelar" - | "band-protocol" - | "bitsong" - | "canto" - | "chihuahua" - | "comdex" - | "coreum" - | "cosmos" - | "crescent" - | "cronos" - | "cudos" - | "desmos" - | "dydx" - | "evmos" - | "fetch-ai" - | "gravity-bridge" - | "injective" - | "irisnet" - | "juno" - | "kava" - | "ki-network" - | "mars-protocol" - | "nym" - | "okex-chain" - | "onomy" - | "osmosis" - | "persistence" - | "quicksilver" - | "regen" - | "secret" - | "sentinel" - | "sommelier" - | "stafi" - | "stargaze" - | "stride" - | "teritori" - | "tgrade" - | "umee" - | "sei" - | "mantra" - | "celestia" - | "saga" - | "zetachain" - | "dymension" - | "humansai" - | "neutron" - | "polkadot" - | "kusama" - | "westend" - | "bittensor" - | "aptos" - | "binancebeacon" - | "cardano" - | "near" - | "solana" - | "solana-devnet" - | "stellar" - | "stellar-testnet" - | "sui" - | "tezos" - | "tron" - | "ton" - | "ton-testnet" - | "hyperliquid"; -export type GetBalancesArgumentsDto = { - readonly cAddressBech?: string; - readonly pAddressBech?: string; - readonly autoSweepDayOfMonth?: number; - readonly autoSweepTimezone?: string; -}; -export type BalanceType = - | "active" - | "entering" - | "exiting" - | "withdrawable" - | "claimable" - | "locked"; -export type RevShareDetailsDto = { - readonly minRevShare: number; - readonly maxRevShare: number; +export type AllocationDto = { + readonly address: string; + readonly network: + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; + readonly name: string; + readonly yieldId?: string; + readonly providerId?: string; + readonly allocation: string; + readonly allocationUsd: string | null; + readonly weight: number; + readonly targetWeight: number; + readonly rewardRate: { readonly total: number; readonly rateType: string }; + readonly tvl: string | null; + readonly tvlUsd: string | null; + readonly maxCapacity: string | null; + readonly remainingCapacity: string | null; }; -export type ValidatorSubnetDto = { - readonly id: number; - readonly name?: string; - readonly tokenSymbol?: string; - readonly tvl?: string; - readonly pricePerShare?: string; +export type PathLimitsDto = { + readonly individualPer24h?: string; + readonly globalPer24h?: string; + readonly globalRemainingPer24h?: string; + readonly maxFractionOfNav?: number; + readonly liquidityBounded?: boolean; + readonly availableLiquidity?: string; + readonly minimumAmount?: string; }; -export type YieldErrorDto = { - readonly yieldId: string; - readonly error: string; +export type PathFeeDto = { readonly rate: number }; +export type ExecutionContractsDto = { + readonly enter?: ReadonlyArray; + readonly exit?: ReadonlyArray; }; export type YieldRiskCredoraDto = { readonly rating?: string | null; @@ -434,17 +548,6 @@ export type YieldRiskCredoraDto = { export type YieldRiskStakingRewardsMetricsDto = { readonly users?: number | null; }; -export type BalanceHistorySnapshotPeriodDeltaDto = { - readonly shareAmount: string; - readonly shareAmountRaw: string; - readonly amount: string; - readonly amountRaw: string; -}; -export type PaginatedResponseDto = { - readonly total: number; - readonly offset: number; - readonly limit: number; -}; export type RewardRateSnapshotDto = { readonly timestamp: string; readonly rewardRate: string; @@ -459,13 +562,6 @@ export type TvlHistoryResponseDto = { readonly to: string; }; export type CampaignStatus = "draft" | "active" | "paused" | "ended"; -export type CampaignRewardMode = "normal" | "compound"; -export type CampaignQualificationType = "min_token_amount"; -export type CampaignPayoutFrequency = - | "weekly" - | "daily" - | "six_hourly" - | "end_of_campaign"; export type TransactionDto = { readonly id: string; readonly title: string; @@ -491,6 +587,7 @@ export type TransactionDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -698,6 +795,7 @@ export type ActionArgumentsDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -804,6 +902,7 @@ export type ActionArgumentsDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -999,6 +1098,7 @@ export type NetworkDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -1097,8 +1197,54 @@ export type ProviderDto = { readonly references?: ReadonlyArray | null; }; export type HealthStatus = "OK" | "FAIL"; -export type RewardDto = { - readonly rate: number; +export type BalancesQueryDto = { + readonly yieldId?: string; + readonly address: string; + readonly network: Networks; + readonly arguments?: GetBalancesArgumentsDto; +}; +export type YieldBalancesRequestDto = { + readonly address: string; + readonly arguments?: GetBalancesArgumentsDto; +}; +export type PendingActionDto = { + readonly intent: "enter" | "manage" | "exit"; + readonly type: + | "STAKE" + | "UNSTAKE" + | "WITHDRAW_REQUEST" + | "INSTANT_WITHDRAW" + | "CLAIM_REWARDS" + | "AUTO_SWEEP_UNSTAKE_REWARDS" + | "AUTO_SWEEP_WITHDRAW_REWARDS" + | "RESTAKE_REWARDS" + | "WITHDRAW" + | "WITHDRAW_ALL" + | "RESTAKE" + | "CLAIM_UNSTAKED" + | "UNLOCK_LOCKED" + | "STAKE_LOCKED" + | "VOTE" + | "REVOKE" + | "VOTE_LOCKED" + | "REVOTE" + | "REBOND" + | "MIGRATE" + | "VERIFY_WITHDRAW_CREDENTIALS" + | "DELEGATE"; + readonly passthrough: string; + readonly arguments?: { + readonly fields: ReadonlyArray; + readonly notes?: string; + }; + readonly amount?: string | null; +}; +export type ArgumentSchemaDto = { + readonly fields: ReadonlyArray; + readonly notes?: string; +}; +export type RewardDto = { + readonly rate: number; readonly rateType: string; readonly token: TokenDto; readonly yieldSource: @@ -1132,9 +1278,10 @@ export type ConcentratedLiquidityPoolStateDto = { readonly baseToken: TokenDto; readonly quoteToken: TokenDto; }; -export type TokenWithAvailableYieldsDto = { - readonly token: TokenDto; - readonly availableYields: ReadonlyArray; +export type RevShareTiersDto = { + readonly trial?: RevShareDetailsDto; + readonly standard?: RevShareDetailsDto; + readonly pro?: RevShareDetailsDto; }; export type YieldFeeConfigurationDto = { readonly id: string; @@ -1190,145 +1337,6 @@ export type SelfAttestationDto = { readonly documents: ReadonlyArray; readonly notes?: string; }; -export type ArgumentSchemaDto = { - readonly fields: ReadonlyArray; - readonly notes?: string; -}; -export type AllocationDto = { - readonly address: string; - readonly network: - | "ethereum" - | "ethereum-goerli" - | "ethereum-holesky" - | "ethereum-sepolia" - | "ethereum-hoodi" - | "arbitrum" - | "base" - | "base-sepolia" - | "gnosis" - | "optimism" - | "polygon" - | "polygon-amoy" - | "starknet" - | "zksync" - | "linea" - | "unichain" - | "plume" - | "monad-testnet" - | "monad" - | "robinhood" - | "robinhood-testnet" - | "avalanche-c" - | "avalanche-c-atomic" - | "avalanche-p" - | "binance" - | "celo" - | "fantom" - | "harmony" - | "moonriver" - | "okc" - | "viction" - | "core" - | "sonic" - | "plasma" - | "katana" - | "hyperevm" - | "tempo" - | "pharos" - | "agoric" - | "akash" - | "axelar" - | "band-protocol" - | "bitsong" - | "canto" - | "chihuahua" - | "comdex" - | "coreum" - | "cosmos" - | "crescent" - | "cronos" - | "cudos" - | "desmos" - | "dydx" - | "evmos" - | "fetch-ai" - | "gravity-bridge" - | "injective" - | "irisnet" - | "juno" - | "kava" - | "ki-network" - | "mars-protocol" - | "nym" - | "okex-chain" - | "onomy" - | "osmosis" - | "persistence" - | "quicksilver" - | "regen" - | "secret" - | "sentinel" - | "sommelier" - | "stafi" - | "stargaze" - | "stride" - | "teritori" - | "tgrade" - | "umee" - | "sei" - | "mantra" - | "celestia" - | "saga" - | "zetachain" - | "dymension" - | "humansai" - | "neutron" - | "polkadot" - | "kusama" - | "westend" - | "bittensor" - | "aptos" - | "binancebeacon" - | "cardano" - | "near" - | "solana" - | "solana-devnet" - | "stellar" - | "stellar-testnet" - | "sui" - | "tezos" - | "tron" - | "ton" - | "ton-testnet" - | "hyperliquid"; - readonly name: string; - readonly yieldId?: string; - readonly providerId?: string; - readonly allocation: string; - readonly allocationUsd: string | null; - readonly weight: number; - readonly targetWeight: number; - readonly rewardRate: AllocationRewardRateDto | null; - readonly tvl: string | null; - readonly tvlUsd: string | null; - readonly maxCapacity: string | null; - readonly remainingCapacity: string | null; -}; -export type BalancesQueryDto = { - readonly yieldId?: string; - readonly address: string; - readonly network: Networks; - readonly arguments?: GetBalancesArgumentsDto; -}; -export type YieldBalancesRequestDto = { - readonly address: string; - readonly arguments?: GetBalancesArgumentsDto; -}; -export type RevShareTiersDto = { - readonly trial?: RevShareDetailsDto; - readonly standard?: RevShareDetailsDto; - readonly pro?: RevShareDetailsDto; -}; export type YieldRiskStakingRewardsDto = { readonly rating?: string | null; readonly score?: number | null; @@ -1355,11 +1363,6 @@ export type RewardRateHistoryResponseDto = { readonly from: string; readonly to: string; }; -export type CampaignQualificationConfigDto = { - readonly type: CampaignQualificationType; - readonly threshold: string; - readonly maxIncentivizedTvlToken?: string | null; -}; export type ActionDto = { readonly id: string; readonly intent: "enter" | "manage" | "exit"; @@ -1395,7 +1398,251 @@ export type ActionDto = { readonly transactions: ReadonlyArray; readonly events?: ReadonlyArray; readonly executionPattern: "synchronous" | "asynchronous" | "batch"; - readonly rawArguments: ActionArgumentsDto | null; + readonly rawArguments: { + readonly amount?: string; + readonly amountRaw?: string; + readonly amounts?: ReadonlyArray; + readonly shareAmount?: string; + readonly shareAmountRaw?: string; + readonly validatorAddress?: string; + readonly validatorAddresses?: ReadonlyArray; + readonly providerId?: string; + readonly duration?: number; + readonly inputToken?: string; + readonly inputTokenNetwork?: + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; + readonly outputToken?: string; + readonly outputTokenNetwork?: + | "ethereum" + | "ethereum-goerli" + | "ethereum-holesky" + | "ethereum-sepolia" + | "ethereum-hoodi" + | "arbitrum" + | "base" + | "base-sepolia" + | "gnosis" + | "optimism" + | "polygon" + | "polygon-amoy" + | "starknet" + | "zksync" + | "linea" + | "unichain" + | "plume" + | "monad-testnet" + | "monad" + | "robinhood" + | "robinhood-testnet" + | "arc-testnet" + | "avalanche-c" + | "avalanche-c-atomic" + | "avalanche-p" + | "binance" + | "celo" + | "fantom" + | "harmony" + | "moonriver" + | "okc" + | "viction" + | "core" + | "sonic" + | "plasma" + | "katana" + | "hyperevm" + | "tempo" + | "pharos" + | "agoric" + | "akash" + | "axelar" + | "band-protocol" + | "bitsong" + | "canto" + | "chihuahua" + | "comdex" + | "coreum" + | "cosmos" + | "crescent" + | "cronos" + | "cudos" + | "desmos" + | "dydx" + | "evmos" + | "fetch-ai" + | "gravity-bridge" + | "injective" + | "irisnet" + | "juno" + | "kava" + | "ki-network" + | "mars-protocol" + | "nym" + | "okex-chain" + | "onomy" + | "osmosis" + | "persistence" + | "quicksilver" + | "regen" + | "secret" + | "sentinel" + | "sommelier" + | "stafi" + | "stargaze" + | "stride" + | "teritori" + | "tgrade" + | "umee" + | "sei" + | "mantra" + | "celestia" + | "saga" + | "zetachain" + | "dymension" + | "humansai" + | "neutron" + | "polkadot" + | "kusama" + | "westend" + | "bittensor" + | "aptos" + | "binancebeacon" + | "cardano" + | "near" + | "solana" + | "solana-devnet" + | "stellar" + | "stellar-testnet" + | "sui" + | "tezos" + | "tron" + | "ton" + | "ton-testnet" + | "hyperliquid"; + readonly subnetId?: number; + readonly tronResource?: "BANDWIDTH" | "ENERGY"; + readonly feeConfigurationId?: string; + readonly cosmosPubKey?: string; + readonly tezosPubKey?: string; + readonly cAddressBech?: string; + readonly pAddressBech?: string; + readonly executionMode?: "individual" | "batched"; + readonly ledgerWalletApiCompatible?: boolean; + readonly useMaxAmount?: boolean; + readonly useInstantExecution?: boolean; + readonly useAutoClaim?: boolean; + readonly skipPrechecks?: boolean; + readonly useMaxAllowance?: boolean; + readonly feePayerAddress?: string; + readonly receiverAddress?: string; + readonly rangeMin?: string; + readonly rangeMax?: string; + readonly percentage?: number; + readonly tokenId?: string; + }; readonly createdAt: string; readonly completedAt: string | null; readonly status: @@ -1446,25 +1693,65 @@ export type TransactionGasEstimateDto = { readonly token: TokenDto; readonly gasLimit?: string; readonly stepIndex: number; - readonly type: TransactionType | null; + readonly type: TransactionType; }; export type HealthStatusDto = { readonly status: HealthStatus; readonly timestamp: string; }; +export type BalancesRequestDto = { + readonly queries: ReadonlyArray; +}; +export type YieldMechanicsArgumentsDto = { + readonly enter?: ArgumentSchemaDto; + readonly exit?: ArgumentSchemaDto; + readonly manage?: { readonly [x: string]: ArgumentSchemaDto }; + readonly balance?: ArgumentSchemaDto; +}; export type RewardRateDto = { readonly total: number; readonly rateType: string; readonly components: ReadonlyArray; }; +export type YieldStateDto = { + readonly pricePerShareState?: PricePerShareStateDto; + readonly concentratedLiquidityPoolState?: ConcentratedLiquidityPoolStateDto; + readonly capacityState?: CapacityDto; + readonly liquidityState?: LiquidityStateDto; + readonly allocations?: ReadonlyArray; +}; +export type ValidatorProviderDto = { + readonly name: string; + readonly id: string; + readonly logoURI: string; + readonly description: string; + readonly website: string; + readonly tvlUsd: string | null; + readonly type: "protocol" | "validator_provider"; + readonly references?: ReadonlyArray | null; + readonly rank: number; + readonly preferred: boolean; + readonly revshare?: RevShareTiersDto | null; + readonly uniqueId?: string; + readonly createdAt?: string; + readonly updatedAt?: string; +}; export type SchedulePathDto = { readonly kind: "instant" | "standard"; readonly cadence: "continuous" | "daily_cutoff" | "periodic" | "scheduled"; readonly status: "open" | "closed" | "settling"; readonly businessDaysOnly?: boolean; readonly cutoffTime?: string; - readonly currentWindow?: WindowBoundsDto | null; - readonly nextWindow?: WindowBoundsDto | null; + readonly currentWindow?: { + readonly opensAt: string; + readonly closesAt: string; + readonly source?: "onchain" | "api" | "config"; + }; + readonly nextWindow?: { + readonly opensAt: string; + readonly closesAt: string; + readonly source?: "onchain" | "api" | "config"; + }; readonly settlement: SettlementSpecDto; readonly accrual: AccrualSpecDto; readonly limits?: PathLimitsDto; @@ -1485,67 +1772,6 @@ export type KycMetadataDto = { readonly selfAttestation?: SelfAttestationDto; readonly mandatoryDisclosureUrl?: string; }; -export type YieldMechanicsArgumentsDto = { - readonly enter?: ArgumentSchemaDto; - readonly exit?: ArgumentSchemaDto; - readonly manage?: { readonly [x: string]: ArgumentSchemaDto }; - readonly balance?: ArgumentSchemaDto; -}; -export type PendingActionDto = { - readonly intent: "enter" | "manage" | "exit"; - readonly type: - | "STAKE" - | "UNSTAKE" - | "WITHDRAW_REQUEST" - | "INSTANT_WITHDRAW" - | "CLAIM_REWARDS" - | "AUTO_SWEEP_UNSTAKE_REWARDS" - | "AUTO_SWEEP_WITHDRAW_REWARDS" - | "RESTAKE_REWARDS" - | "WITHDRAW" - | "WITHDRAW_ALL" - | "RESTAKE" - | "CLAIM_UNSTAKED" - | "UNLOCK_LOCKED" - | "STAKE_LOCKED" - | "VOTE" - | "REVOKE" - | "VOTE_LOCKED" - | "REVOTE" - | "REBOND" - | "MIGRATE" - | "VERIFY_WITHDRAW_CREDENTIALS" - | "DELEGATE"; - readonly passthrough: string; - readonly arguments?: ArgumentSchemaDto | null; - readonly amount?: string | null; -}; -export type YieldStateDto = { - readonly pricePerShareState?: PricePerShareStateDto; - readonly concentratedLiquidityPoolState?: ConcentratedLiquidityPoolStateDto; - readonly capacityState?: CapacityDto; - readonly liquidityState?: LiquidityStateDto; - readonly allocations?: ReadonlyArray; -}; -export type BalancesRequestDto = { - readonly queries: ReadonlyArray; -}; -export type ValidatorProviderDto = { - readonly name: string; - readonly id: string; - readonly logoURI: string; - readonly description: string; - readonly website: string; - readonly tvlUsd: string | null; - readonly type: "protocol" | "validator_provider"; - readonly references?: ReadonlyArray | null; - readonly rank: number; - readonly preferred: boolean; - readonly revshare?: RevShareTiersDto; - readonly uniqueId?: string; - readonly createdAt?: string; - readonly updatedAt?: string; -}; export type YieldRiskDto = { readonly updatedAt: string; readonly credora?: YieldRiskCredoraDto; @@ -1557,35 +1783,6 @@ export type SimulationGasDto = { readonly gasLimit?: string; readonly transactions: ReadonlyArray; }; -export type YieldCampaignDto = { - readonly id: string; - readonly name?: string | null; - readonly createdAt: string; - readonly updatedAt: string; - readonly yieldId: string; - readonly status: CampaignStatus; - readonly rewardMode: CampaignRewardMode; - readonly rewardRate: RewardRateDto | null; - readonly totalBudget: string; - readonly distributedBudget: string; - readonly remainingBudget: string; - readonly configuredHourlyEmission?: string | null; - readonly apyCeiling?: number | null; - readonly qualificationConfig: CampaignQualificationConfigDto; - readonly startTime: string; - readonly endTime: string; - readonly lastProcessedHour?: string | null; - readonly nextPayoutDueAt?: string | null; - readonly payoutFrequency: CampaignPayoutFrequency; - readonly rewardToken: TokenDto; -}; -export type SideScheduleDto = { - readonly paths: ReadonlyArray; -}; -export type YieldRequirementsDto = { - readonly kycRequired: boolean; - readonly kyc?: KycMetadataDto; -}; export type ValidatorDto = { readonly address: string; readonly name?: string; @@ -1607,10 +1804,58 @@ export type ValidatorDto = { readonly providerId?: string; readonly subnet?: ValidatorSubnetDto; }; +export type SideScheduleDto = { + readonly paths: ReadonlyArray; +}; +export type YieldRequirementsDto = { + readonly kycRequired: boolean; + readonly kyc?: KycMetadataDto; +}; export type ActionSimulationDto = { readonly gas: SimulationGasDto; readonly entryReserveEstimate?: string; }; +export type BalanceDto = { + readonly address: string; + readonly type: BalanceType; + readonly amount: string; + readonly amountRaw: string; + readonly date?: string | null; + readonly feeConfigurationId?: string; + readonly pendingActions: ReadonlyArray; + readonly token: TokenDto; + readonly validator?: { + readonly address: string; + readonly name?: string; + readonly logoURI?: string; + readonly website?: string; + readonly rewardRate?: RewardRateDto; + readonly provider?: ValidatorProviderDto; + readonly commission?: number; + readonly tvlUsd?: string; + readonly tvl?: string; + readonly tvlRaw?: string; + readonly votingPower?: number; + readonly preferred?: boolean; + readonly minimumStake?: string; + readonly remainingPossibleStake?: string; + readonly remainingSlots?: number; + readonly nominatorCount?: number; + readonly status?: string; + readonly providerId?: string; + readonly subnet?: ValidatorSubnetDto; + }; + readonly validators?: ReadonlyArray | null; + readonly amountUsd?: string | null; + readonly isEarning: boolean; + readonly priceRange?: { readonly min: string; readonly max: string } & { + readonly [x: string]: unknown; + }; + readonly tokenId?: string; + readonly shareAmount?: string; + readonly shareAmountRaw?: string; + readonly shareToken?: TokenDto; +}; export type InvestmentScheduleDto = { readonly timezone: string; readonly subscription: SideScheduleDto; @@ -1634,24 +1879,55 @@ export type YieldMechanicsDto = { readonly arguments?: YieldMechanicsArgumentsDto; readonly possibleFeeTakingMechanisms?: PossibleFeeTakingMechanismsDto; }; -export type BalanceDto = { - readonly address: string; - readonly type: BalanceType; - readonly amount: string; - readonly amountRaw: string; - readonly date?: string | null; - readonly feeConfigurationId?: string; - readonly pendingActions: ReadonlyArray; - readonly token: TokenDto; - readonly validator?: ValidatorDto | null; - readonly validators?: ReadonlyArray | null; - readonly amountUsd?: string | null; - readonly isEarning: boolean; - readonly priceRange?: { readonly min: string; readonly max: string }; - readonly tokenId?: string; - readonly shareAmount?: string; - readonly shareAmountRaw?: string; - readonly shareToken?: TokenDto; +export type YieldBalancesDto = { + readonly yieldId: string; + readonly balances: ReadonlyArray; + readonly outputTokenBalance?: { + readonly address: string; + readonly type: BalanceType; + readonly amount: string; + readonly amountRaw: string; + readonly date?: string | null; + readonly feeConfigurationId?: string; + readonly pendingActions: ReadonlyArray; + readonly token: TokenDto; + readonly validator?: { + readonly address: string; + readonly name?: string; + readonly logoURI?: string; + readonly website?: string; + readonly rewardRate?: RewardRateDto; + readonly provider?: ValidatorProviderDto; + readonly commission?: number; + readonly tvlUsd?: string; + readonly tvl?: string; + readonly tvlRaw?: string; + readonly votingPower?: number; + readonly preferred?: boolean; + readonly minimumStake?: string; + readonly remainingPossibleStake?: string; + readonly remainingSlots?: number; + readonly nominatorCount?: number; + readonly status?: string; + readonly providerId?: string; + readonly subnet?: ValidatorSubnetDto; + }; + readonly validators?: ReadonlyArray | null; + readonly amountUsd?: string | null; + readonly isEarning: boolean; + readonly priceRange?: { readonly min: string; readonly max: string } & { + readonly [x: string]: unknown; + }; + readonly tokenId?: string; + readonly shareAmount?: string; + readonly shareAmountRaw?: string; + readonly shareToken?: TokenDto; + }; + readonly rewardRate?: { + readonly total: number; + readonly rateType: string; + readonly components: ReadonlyArray; + }; }; export type YieldDto = { readonly id: string; @@ -1677,6 +1953,7 @@ export type YieldDto = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -1780,19 +2057,6 @@ export type YieldDto = { readonly investmentSchedule?: InvestmentScheduleDto; readonly executionContracts?: ExecutionContractsDto; }; -export type YieldBalancesDto = { - readonly yieldId: string; - readonly balances: ReadonlyArray; - readonly outputTokenBalance?: BalanceDto | null; - readonly rewardRate?: RewardRateDto | null; -}; -export type BalanceHistorySnapshotDto = { - readonly timestamp: string; - readonly blockNumber: number; - readonly yieldId: string; - readonly balances: ReadonlyArray; - readonly periodDelta?: BalanceHistorySnapshotPeriodDeltaDto; -}; export type BalancesResponseDto = { readonly items: ReadonlyArray; readonly errors: ReadonlyArray; @@ -1823,6 +2087,7 @@ export type YieldsControllerGetYieldsParams = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -1952,7 +2217,7 @@ export type YieldsControllerGetYields200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export type YieldsControllerGetYields400 = { readonly message?: string; @@ -2043,44 +2308,6 @@ export type YieldsControllerGetYieldRisk500 = { readonly error?: string; readonly statusCode?: number; }; -export type YieldsControllerGetBalanceHistoryParams = { - readonly address: string; - readonly from?: string; - readonly to?: string; - readonly blockNumber?: number; - readonly feeConfigurationId?: string; - readonly interval?: "block" | "hour" | "day" | "week"; - readonly sort?: "asc" | "desc"; - readonly limit?: number; - readonly offset?: number; -}; -export type YieldsControllerGetBalanceHistory200 = { - readonly total: number; - readonly offset: number; - readonly limit: number; - readonly items?: ReadonlyArray; -}; -export type YieldsControllerGetBalanceHistory400 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; -}; -export type YieldsControllerGetBalanceHistory401 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; -}; -export type YieldsControllerGetBalanceHistory429 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; - readonly retryAfter?: number; -}; -export type YieldsControllerGetBalanceHistory500 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; -}; export type YieldsControllerGetYieldBalancesRequestJson = YieldBalancesRequestDto; export type YieldsControllerGetYieldBalances200 = YieldBalancesDto; @@ -2105,36 +2332,6 @@ export type YieldsControllerGetYieldBalances500 = { readonly error?: string; readonly statusCode?: number; }; -export type YieldsControllerGetYieldRewardsParams = { - readonly address: string; - readonly from?: string; - readonly to?: string; - readonly sort?: "asc" | "desc"; - readonly limit?: number; - readonly offset?: number; -}; -export type YieldsControllerGetYieldRewards200 = PaginatedResponseDto; -export type YieldsControllerGetYieldRewards400 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; -}; -export type YieldsControllerGetYieldRewards401 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; -}; -export type YieldsControllerGetYieldRewards429 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; - readonly retryAfter?: number; -}; -export type YieldsControllerGetYieldRewards500 = { - readonly message?: string; - readonly error?: string; - readonly statusCode?: number; -}; export type YieldsControllerGetYieldRewardRateHistoryParams = { readonly offset?: number; readonly limit?: number; @@ -2210,7 +2407,7 @@ export type YieldsControllerGetYieldValidators200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export type YieldsControllerGetYieldValidators400 = { readonly message?: string; @@ -2242,7 +2439,7 @@ export type YieldsControllerGetYieldCampaigns200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export type YieldsControllerGetYieldCampaigns400 = { readonly message?: string; @@ -2292,6 +2489,7 @@ export type TokensControllerGetTokensParams = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -2394,7 +2592,7 @@ export type TokensControllerGetTokens200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export type TokensControllerGetTokens400 = { readonly message?: string; @@ -2496,6 +2694,7 @@ export type ActionsControllerGetActionsParams = { | "monad" | "robinhood" | "robinhood-testnet" + | "arc-testnet" | "avalanche-c" | "avalanche-c-atomic" | "avalanche-p" @@ -2584,7 +2783,7 @@ export type ActionsControllerGetActions200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export type ActionsControllerGetActions400 = { readonly message?: string; @@ -2872,7 +3071,7 @@ export type ProvidersControllerGetProviders200 = { readonly total: number; readonly offset: number; readonly limit: number; - readonly items?: ReadonlyArray; + readonly items?: never; }; export type ProvidersControllerGetProviders400 = { readonly message?: string; @@ -2999,6 +3198,51 @@ export const make = ( : (request) => Effect.flatMap(httpClient.execute(request), withOptionalResponse); }; + const __encodePathParam = encodeURIComponent; + const __makePathRequest = ( + method: (url: string) => HttpClientRequest.HttpClientRequest, + parameters: ReadonlyArray, + getPath: () => string + ) => + Effect.suspend(() => { + const fail = (description: string, cause?: unknown) => + Effect.fail( + new HttpClientError.HttpClientError({ + reason: new HttpClientError.InvalidUrlError({ + request: method(""), + cause, + description, + }), + }) + ); + if ( + parameters.some( + (value) => value === "" || /^(?:\.|%2e){1,2}$/i.test(value) + ) + ) { + return fail( + "Path parameters must be non-empty and cannot be dot segments" + ); + } + let path: string; + try { + path = getPath(); + } catch (cause) { + return fail("Failed to encode path parameter", cause); + } + if ( + path.split("/").some((segment) => /^(?:\.|%2e){1,2}$/i.test(segment)) + ) { + return fail("Request paths cannot contain dot segments"); + } + return Effect.succeed(method(path)); + }); + const decodeBinary = (response: HttpClientResponse.HttpClientResponse) => + Effect.map(response.arrayBuffer, (buffer) => new Uint8Array(buffer)); + const decodeVoidError = + (tag: Tag) => + (response: HttpClientResponse.HttpClientResponse) => + Effect.fail(YieldApiError(tag, undefined, response)); const decodeSuccess = (response: HttpClientResponse.HttpClientResponse) => response.json as Effect.Effect; const decodeVoid = (_response: HttpClientResponse.HttpClientResponse) => @@ -3019,7 +3263,12 @@ export const make = ( (config: Config | undefined) => ( successCodes: ReadonlyArray, - errorCodes?: Record + errorCodes?: Record, + responseCodes: { + readonly binary: ReadonlyArray; + readonly voidSuccess: ReadonlyArray; + readonly voidError: ReadonlyArray; + } = { binary: [], voidSuccess: [], voidError: [] } ) => { const cases: any = { orElse: unexpectedStatus }; for (const code of successCodes) { @@ -3030,7 +3279,20 @@ export const make = ( cases[code] = decodeError(tag); } } - if (successCodes.length === 0) { + for (const code of responseCodes.binary) { + cases[code] = decodeBinary; + } + for (const code of responseCodes.voidSuccess) { + cases[code] = decodeVoid; + } + for (const code of responseCodes.voidError) { + cases[code] = decodeVoidError(code); + } + if ( + successCodes.length === 0 && + responseCodes.binary.length === 0 && + responseCodes.voidSuccess.length === 0 + ) { cases["2xx"] = decodeVoid; } return withResponse(config)(HttpClientResponse.matchStatus(cases) as any); @@ -3038,7 +3300,7 @@ export const make = ( return { httpClient, YieldsControllerGetYields: (options) => - HttpClientRequest.get(`/v1/yields`).pipe( + HttpClientRequest.get("/v1/yields").pipe( HttpClientRequest.setUrlParams({ offset: options?.params?.["offset"] as any, limit: options?.params?.["limit"] as any, @@ -3068,7 +3330,7 @@ export const make = ( }) ), YieldsControllerGetAggregateBalances: (options) => - HttpClientRequest.post(`/v1/yields/balances`).pipe( + HttpClientRequest.post("/v1/yields/balances").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), onRequest(options.config)(["2xx"], { "400": "YieldsControllerGetAggregateBalances400", @@ -3078,139 +3340,189 @@ export const make = ( }) ), YieldsControllerGetYield: (yieldId, options) => - HttpClientRequest.get(`/v1/yields/${yieldId}`).pipe( - onRequest(options?.config)(["2xx"], { - "400": "YieldsControllerGetYield400", - "401": "YieldsControllerGetYield401", - "429": "YieldsControllerGetYield429", - "500": "YieldsControllerGetYield500", - }) + __makePathRequest( + HttpClientRequest.get, + [yieldId], + () => "/v1/yields/" + __encodePathParam(yieldId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "400": "YieldsControllerGetYield400", + "401": "YieldsControllerGetYield401", + "429": "YieldsControllerGetYield429", + "500": "YieldsControllerGetYield500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), YieldsControllerGetYieldRisk: (yieldId, options) => - HttpClientRequest.get(`/v1/yields/${yieldId}/risk`).pipe( - onRequest(options?.config)(["2xx"], { - "400": "YieldsControllerGetYieldRisk400", - "401": "YieldsControllerGetYieldRisk401", - "429": "YieldsControllerGetYieldRisk429", - "500": "YieldsControllerGetYieldRisk500", - }) - ), - YieldsControllerGetBalanceHistory: (yieldId, options) => - HttpClientRequest.get(`/v1/yields/${yieldId}/balances/history`).pipe( - HttpClientRequest.setUrlParams({ - address: options.params["address"] as any, - from: options.params["from"] as any, - to: options.params["to"] as any, - blockNumber: options.params["blockNumber"] as any, - feeConfigurationId: options.params["feeConfigurationId"] as any, - interval: options.params["interval"] as any, - sort: options.params["sort"] as any, - limit: options.params["limit"] as any, - offset: options.params["offset"] as any, - }), - onRequest(options.config)(["2xx"], { - "400": "YieldsControllerGetBalanceHistory400", - "401": "YieldsControllerGetBalanceHistory401", - "429": "YieldsControllerGetBalanceHistory429", - "500": "YieldsControllerGetBalanceHistory500", - }) + __makePathRequest( + HttpClientRequest.get, + [yieldId], + () => "/v1/yields/" + __encodePathParam(yieldId) + "/risk" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "400": "YieldsControllerGetYieldRisk400", + "401": "YieldsControllerGetYieldRisk401", + "429": "YieldsControllerGetYieldRisk429", + "500": "YieldsControllerGetYieldRisk500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), YieldsControllerGetYieldBalances: (yieldId, options) => - HttpClientRequest.post(`/v1/yields/${yieldId}/balances`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "YieldsControllerGetYieldBalances400", - "401": "YieldsControllerGetYieldBalances401", - "429": "YieldsControllerGetYieldBalances429", - "500": "YieldsControllerGetYieldBalances500", - }) - ), - YieldsControllerGetYieldRewards: (yieldId, options) => - HttpClientRequest.get(`/v1/yields/${yieldId}/rewards/history`).pipe( - HttpClientRequest.setUrlParams({ - address: options.params["address"] as any, - from: options.params["from"] as any, - to: options.params["to"] as any, - sort: options.params["sort"] as any, - limit: options.params["limit"] as any, - offset: options.params["offset"] as any, - }), - onRequest(options.config)(["2xx"], { - "400": "YieldsControllerGetYieldRewards400", - "401": "YieldsControllerGetYieldRewards401", - "429": "YieldsControllerGetYieldRewards429", - "500": "YieldsControllerGetYieldRewards500", - }) + __makePathRequest( + HttpClientRequest.post, + [yieldId], + () => "/v1/yields/" + __encodePathParam(yieldId) + "/balances" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)( + ["2xx"], + { + "400": "YieldsControllerGetYieldBalances400", + "401": "YieldsControllerGetYieldBalances401", + "429": "YieldsControllerGetYieldBalances429", + "500": "YieldsControllerGetYieldBalances500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), YieldsControllerGetYieldRewardRateHistory: (yieldId, options) => - HttpClientRequest.get(`/v1/yields/${yieldId}/reward-rate/history`).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - from: options?.params?.["from"] as any, - to: options?.params?.["to"] as any, - period: options?.params?.["period"] as any, - interval: options?.params?.["interval"] as any, - }), - onRequest(options?.config)(["2xx"], { - "400": "YieldsControllerGetYieldRewardRateHistory400", - "401": "YieldsControllerGetYieldRewardRateHistory401", - "429": "YieldsControllerGetYieldRewardRateHistory429", - "500": "YieldsControllerGetYieldRewardRateHistory500", - }) + __makePathRequest( + HttpClientRequest.get, + [yieldId], + () => + "/v1/yields/" + __encodePathParam(yieldId) + "/reward-rate/history" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + from: options?.params?.["from"] as any, + to: options?.params?.["to"] as any, + period: options?.params?.["period"] as any, + interval: options?.params?.["interval"] as any, + }), + onRequest(options?.config)( + ["2xx"], + { + "400": "YieldsControllerGetYieldRewardRateHistory400", + "401": "YieldsControllerGetYieldRewardRateHistory401", + "429": "YieldsControllerGetYieldRewardRateHistory429", + "500": "YieldsControllerGetYieldRewardRateHistory500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), YieldsControllerGetYieldTvlHistory: (yieldId, options) => - HttpClientRequest.get(`/v1/yields/${yieldId}/tvl/history`).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - from: options?.params?.["from"] as any, - to: options?.params?.["to"] as any, - period: options?.params?.["period"] as any, - interval: options?.params?.["interval"] as any, - feeConfigurationId: options?.params?.["feeConfigurationId"] as any, - }), - onRequest(options?.config)(["2xx"], { - "400": "YieldsControllerGetYieldTvlHistory400", - "401": "YieldsControllerGetYieldTvlHistory401", - "429": "YieldsControllerGetYieldTvlHistory429", - "500": "YieldsControllerGetYieldTvlHistory500", - }) + __makePathRequest( + HttpClientRequest.get, + [yieldId], + () => "/v1/yields/" + __encodePathParam(yieldId) + "/tvl/history" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + from: options?.params?.["from"] as any, + to: options?.params?.["to"] as any, + period: options?.params?.["period"] as any, + interval: options?.params?.["interval"] as any, + feeConfigurationId: options?.params?.[ + "feeConfigurationId" + ] as any, + }), + onRequest(options?.config)( + ["2xx"], + { + "400": "YieldsControllerGetYieldTvlHistory400", + "401": "YieldsControllerGetYieldTvlHistory401", + "429": "YieldsControllerGetYieldTvlHistory429", + "500": "YieldsControllerGetYieldTvlHistory500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), YieldsControllerGetYieldValidators: (yieldId, options) => - HttpClientRequest.get(`/v1/yields/${yieldId}/validators`).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - name: options?.params?.["name"] as any, - address: options?.params?.["address"] as any, - provider: options?.params?.["provider"] as any, - status: options?.params?.["status"] as any, - preferred: options?.params?.["preferred"] as any, - }), - onRequest(options?.config)(["2xx"], { - "400": "YieldsControllerGetYieldValidators400", - "401": "YieldsControllerGetYieldValidators401", - "429": "YieldsControllerGetYieldValidators429", - "500": "YieldsControllerGetYieldValidators500", - }) + __makePathRequest( + HttpClientRequest.get, + [yieldId], + () => "/v1/yields/" + __encodePathParam(yieldId) + "/validators" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + name: options?.params?.["name"] as any, + address: options?.params?.["address"] as any, + provider: options?.params?.["provider"] as any, + status: options?.params?.["status"] as any, + preferred: options?.params?.["preferred"] as any, + }), + onRequest(options?.config)( + ["2xx"], + { + "400": "YieldsControllerGetYieldValidators400", + "401": "YieldsControllerGetYieldValidators401", + "429": "YieldsControllerGetYieldValidators429", + "500": "YieldsControllerGetYieldValidators500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), YieldsControllerGetYieldCampaigns: (yieldId, options) => - HttpClientRequest.get(`/v1/yields/${yieldId}/campaigns`).pipe( - HttpClientRequest.setUrlParams({ - offset: options?.params?.["offset"] as any, - limit: options?.params?.["limit"] as any, - status: options?.params?.["status"] as any, - }), - onRequest(options?.config)(["2xx"], { - "400": "YieldsControllerGetYieldCampaigns400", - "401": "YieldsControllerGetYieldCampaigns401", - "429": "YieldsControllerGetYieldCampaigns429", - "500": "YieldsControllerGetYieldCampaigns500", - }) + __makePathRequest( + HttpClientRequest.get, + [yieldId], + () => "/v1/yields/" + __encodePathParam(yieldId) + "/campaigns" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + offset: options?.params?.["offset"] as any, + limit: options?.params?.["limit"] as any, + status: options?.params?.["status"] as any, + }), + onRequest(options?.config)( + ["2xx"], + { + "400": "YieldsControllerGetYieldCampaigns400", + "401": "YieldsControllerGetYieldCampaigns401", + "429": "YieldsControllerGetYieldCampaigns429", + "500": "YieldsControllerGetYieldCampaigns500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), TokensControllerGetTokens: (options) => - HttpClientRequest.get(`/v1/tokens`).pipe( + HttpClientRequest.get("/v1/tokens").pipe( HttpClientRequest.setUrlParams({ address: options?.params?.["address"] as any, symbol: options?.params?.["symbol"] as any, @@ -3229,7 +3541,7 @@ export const make = ( }) ), ActionsControllerGetActions: (options) => - HttpClientRequest.get(`/v1/actions`).pipe( + HttpClientRequest.get("/v1/actions").pipe( HttpClientRequest.setUrlParams({ offset: options.params["offset"] as any, limit: options.params["limit"] as any, @@ -3250,110 +3562,191 @@ export const make = ( }) ), ActionsControllerGetAction: (actionId, options) => - HttpClientRequest.get(`/v1/actions/${actionId}`).pipe( - onRequest(options?.config)(["2xx"], { - "400": "ActionsControllerGetAction400", - "401": "ActionsControllerGetAction401", - "429": "ActionsControllerGetAction429", - "500": "ActionsControllerGetAction500", - }) + __makePathRequest( + HttpClientRequest.get, + [actionId], + () => "/v1/actions/" + __encodePathParam(actionId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "400": "ActionsControllerGetAction400", + "401": "ActionsControllerGetAction401", + "429": "ActionsControllerGetAction429", + "500": "ActionsControllerGetAction500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), ActionsControllerEnterYield: (options) => - HttpClientRequest.post(`/v1/actions/enter`).pipe( + HttpClientRequest.post("/v1/actions/enter").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "ActionsControllerEnterYield400", - "401": "ActionsControllerEnterYield401", - "403": "ActionsControllerEnterYield403", - "429": "ActionsControllerEnterYield429", - "500": "ActionsControllerEnterYield500", - }) + onRequest(options.config)( + ["2xx"], + { + "400": "ActionsControllerEnterYield400", + "401": "ActionsControllerEnterYield401", + "403": "ActionsControllerEnterYield403", + "429": "ActionsControllerEnterYield429", + "500": "ActionsControllerEnterYield500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) ), ActionsControllerExitYield: (options) => - HttpClientRequest.post(`/v1/actions/exit`).pipe( + HttpClientRequest.post("/v1/actions/exit").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "ActionsControllerExitYield400", - "401": "ActionsControllerExitYield401", - "403": "ActionsControllerExitYield403", - "429": "ActionsControllerExitYield429", - "500": "ActionsControllerExitYield500", - }) + onRequest(options.config)( + ["2xx"], + { + "400": "ActionsControllerExitYield400", + "401": "ActionsControllerExitYield401", + "403": "ActionsControllerExitYield403", + "429": "ActionsControllerExitYield429", + "500": "ActionsControllerExitYield500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) ), ActionsControllerSimulateEnter: (options) => - HttpClientRequest.post(`/v1/actions/enter/simulate`).pipe( + HttpClientRequest.post("/v1/actions/enter/simulate").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "ActionsControllerSimulateEnter400", - "401": "ActionsControllerSimulateEnter401", - "403": "ActionsControllerSimulateEnter403", - "429": "ActionsControllerSimulateEnter429", - "500": "ActionsControllerSimulateEnter500", - }) + onRequest(options.config)( + ["2xx"], + { + "400": "ActionsControllerSimulateEnter400", + "401": "ActionsControllerSimulateEnter401", + "403": "ActionsControllerSimulateEnter403", + "429": "ActionsControllerSimulateEnter429", + "500": "ActionsControllerSimulateEnter500", + }, + { binary: [], voidSuccess: [], voidError: ["404", "412"] } + ) ), ActionsControllerSimulateExit: (options) => - HttpClientRequest.post(`/v1/actions/exit/simulate`).pipe( + HttpClientRequest.post("/v1/actions/exit/simulate").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "ActionsControllerSimulateExit400", - "401": "ActionsControllerSimulateExit401", - "403": "ActionsControllerSimulateExit403", - "429": "ActionsControllerSimulateExit429", - "500": "ActionsControllerSimulateExit500", - }) + onRequest(options.config)( + ["2xx"], + { + "400": "ActionsControllerSimulateExit400", + "401": "ActionsControllerSimulateExit401", + "403": "ActionsControllerSimulateExit403", + "429": "ActionsControllerSimulateExit429", + "500": "ActionsControllerSimulateExit500", + }, + { binary: [], voidSuccess: [], voidError: ["404", "412"] } + ) ), ActionsControllerManageYield: (options) => - HttpClientRequest.post(`/v1/actions/manage`).pipe( + HttpClientRequest.post("/v1/actions/manage").pipe( HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "400": "ActionsControllerManageYield400", - "401": "ActionsControllerManageYield401", - "403": "ActionsControllerManageYield403", - "429": "ActionsControllerManageYield429", - "500": "ActionsControllerManageYield500", - }) + onRequest(options.config)( + ["2xx"], + { + "400": "ActionsControllerManageYield400", + "401": "ActionsControllerManageYield401", + "403": "ActionsControllerManageYield403", + "429": "ActionsControllerManageYield429", + "500": "ActionsControllerManageYield500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) ), TransactionsControllerSubmitTransactionHash: (transactionId, options) => - HttpClientRequest.put( - `/v1/transactions/${transactionId}/submit-hash` + __makePathRequest( + HttpClientRequest.put, + [transactionId], + () => + "/v1/transactions/" + + __encodePathParam(transactionId) + + "/submit-hash" ).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "401": "TransactionsControllerSubmitTransactionHash401", - "429": "TransactionsControllerSubmitTransactionHash429", - "500": "TransactionsControllerSubmitTransactionHash500", - }) + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)( + ["2xx"], + { + "401": "TransactionsControllerSubmitTransactionHash401", + "429": "TransactionsControllerSubmitTransactionHash429", + "500": "TransactionsControllerSubmitTransactionHash500", + }, + { binary: [], voidSuccess: [], voidError: ["400", "404"] } + ) + ) + ) ), TransactionsControllerSubmitTransaction: (transactionId, options) => - HttpClientRequest.post(`/v1/transactions/${transactionId}/submit`).pipe( - HttpClientRequest.bodyJsonUnsafe(options.payload), - onRequest(options.config)(["2xx"], { - "401": "TransactionsControllerSubmitTransaction401", - "429": "TransactionsControllerSubmitTransaction429", - "500": "TransactionsControllerSubmitTransaction500", - }) + __makePathRequest( + HttpClientRequest.post, + [transactionId], + () => "/v1/transactions/" + __encodePathParam(transactionId) + "/submit" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.bodyJsonUnsafe(options.payload), + onRequest(options.config)( + ["2xx"], + { + "401": "TransactionsControllerSubmitTransaction401", + "429": "TransactionsControllerSubmitTransaction429", + "500": "TransactionsControllerSubmitTransaction500", + }, + { binary: [], voidSuccess: [], voidError: ["400", "404"] } + ) + ) + ) ), TransactionsControllerGetTransaction: (transactionId, options) => - HttpClientRequest.get(`/v1/transactions/${transactionId}`).pipe( - onRequest(options?.config)(["2xx"], { - "400": "TransactionsControllerGetTransaction400", - "401": "TransactionsControllerGetTransaction401", - "429": "TransactionsControllerGetTransaction429", - "500": "TransactionsControllerGetTransaction500", - }) + __makePathRequest( + HttpClientRequest.get, + [transactionId], + () => "/v1/transactions/" + __encodePathParam(transactionId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)( + ["2xx"], + { + "400": "TransactionsControllerGetTransaction400", + "401": "TransactionsControllerGetTransaction401", + "429": "TransactionsControllerGetTransaction429", + "500": "TransactionsControllerGetTransaction500", + }, + { binary: [], voidSuccess: [], voidError: ["404"] } + ) + ) + ) ), KycControllerGetStatus: (yieldId, options) => - HttpClientRequest.get(`/v1/yields/${yieldId}/kyc/status`).pipe( - HttpClientRequest.setUrlParams({ - address: options.params["address"] as any, - }), - onRequest(options.config)(["2xx"], { - "401": "KycControllerGetStatus401", - "429": "KycControllerGetStatus429", - }) + __makePathRequest( + HttpClientRequest.get, + [yieldId], + () => "/v1/yields/" + __encodePathParam(yieldId) + "/kyc/status" + ).pipe( + Effect.flatMap((request) => + request.pipe( + HttpClientRequest.setUrlParams({ + address: options.params["address"] as any, + }), + onRequest(options.config)( + ["2xx"], + { + "401": "KycControllerGetStatus401", + "429": "KycControllerGetStatus429", + }, + { binary: [], voidSuccess: [], voidError: ["400", "404"] } + ) + ) + ) ), NetworksControllerGetNetworks: (options) => - HttpClientRequest.get(`/v1/networks`).pipe( + HttpClientRequest.get("/v1/networks").pipe( onRequest(options?.config)(["2xx"], { "400": "NetworksControllerGetNetworks400", "401": "NetworksControllerGetNetworks401", @@ -3362,7 +3755,7 @@ export const make = ( }) ), ProvidersControllerGetProviders: (options) => - HttpClientRequest.get(`/v1/providers`).pipe( + HttpClientRequest.get("/v1/providers").pipe( HttpClientRequest.setUrlParams({ offset: options?.params?.["offset"] as any, limit: options?.params?.["limit"] as any, @@ -3375,16 +3768,24 @@ export const make = ( }) ), ProvidersControllerGetProvider: (providerId, options) => - HttpClientRequest.get(`/v1/providers/${providerId}`).pipe( - onRequest(options?.config)(["2xx"], { - "400": "ProvidersControllerGetProvider400", - "401": "ProvidersControllerGetProvider401", - "429": "ProvidersControllerGetProvider429", - "500": "ProvidersControllerGetProvider500", - }) + __makePathRequest( + HttpClientRequest.get, + [providerId], + () => "/v1/providers/" + __encodePathParam(providerId) + "" + ).pipe( + Effect.flatMap((request) => + request.pipe( + onRequest(options?.config)(["2xx"], { + "400": "ProvidersControllerGetProvider400", + "401": "ProvidersControllerGetProvider401", + "429": "ProvidersControllerGetProvider429", + "500": "ProvidersControllerGetProvider500", + }) + ) + ) ), HealthControllerHealth: (options) => - HttpClientRequest.get(`/health`).pipe( + HttpClientRequest.get("/health").pipe( onRequest(options?.config)(["2xx"]) ), }; @@ -3463,6 +3864,7 @@ export interface YieldApi { | YieldApiError<"YieldsControllerGetYield401", YieldsControllerGetYield401> | YieldApiError<"YieldsControllerGetYield429", YieldsControllerGetYield429> | YieldApiError<"YieldsControllerGetYield500", YieldsControllerGetYield500> + | YieldApiError<"404", undefined> >; /** * Retrieve consolidated risk ratings from third-party providers for a yield. @@ -3489,35 +3891,7 @@ export interface YieldApi { "YieldsControllerGetYieldRisk500", YieldsControllerGetYieldRisk500 > - >; - /** - * Returns a chronological time series of balance snapshots for a wallet address within a yield. Each entry reflects the position at a specific timestamp or block. Supports configurable sampling intervals and point-in-time queries. Only available for ERC4626 vaults with indexed transfer history. - */ - readonly YieldsControllerGetBalanceHistory: ( - yieldId: string, - options: { - readonly params: YieldsControllerGetBalanceHistoryParams; - readonly config?: Config | undefined; - } - ) => Effect.Effect< - WithOptionalResponse, - | HttpClientError.HttpClientError - | YieldApiError< - "YieldsControllerGetBalanceHistory400", - YieldsControllerGetBalanceHistory400 - > - | YieldApiError< - "YieldsControllerGetBalanceHistory401", - YieldsControllerGetBalanceHistory401 - > - | YieldApiError< - "YieldsControllerGetBalanceHistory429", - YieldsControllerGetBalanceHistory429 - > - | YieldApiError< - "YieldsControllerGetBalanceHistory500", - YieldsControllerGetBalanceHistory500 - > + | YieldApiError<"404", undefined> >; /** * Retrieve all balances associated with a yield opportunity for a specific wallet address, including active, pending, claimable, and withdrawable balances. The network is automatically determined from the yield configuration. @@ -3547,35 +3921,7 @@ export interface YieldApi { "YieldsControllerGetYieldBalances500", YieldsControllerGetYieldBalances500 > - >; - /** - * Retrieve a chronological list of on-chain reward events for an indexed yield. Each record includes timestamp, token metadata, amount, reward source, and transaction reference. - */ - readonly YieldsControllerGetYieldRewards: ( - yieldId: string, - options: { - readonly params: YieldsControllerGetYieldRewardsParams; - readonly config?: Config | undefined; - } - ) => Effect.Effect< - WithOptionalResponse, - | HttpClientError.HttpClientError - | YieldApiError< - "YieldsControllerGetYieldRewards400", - YieldsControllerGetYieldRewards400 - > - | YieldApiError< - "YieldsControllerGetYieldRewards401", - YieldsControllerGetYieldRewards401 - > - | YieldApiError< - "YieldsControllerGetYieldRewards429", - YieldsControllerGetYieldRewards429 - > - | YieldApiError< - "YieldsControllerGetYieldRewards500", - YieldsControllerGetYieldRewards500 - > + | YieldApiError<"404", undefined> >; /** * Returns a chronological time series of reward rate snapshots for the specified yield, suitable for charting and analytics. Supports configurable time ranges, sampling intervals (day/week/month), and pagination. @@ -3611,6 +3957,7 @@ export interface YieldApi { "YieldsControllerGetYieldRewardRateHistory500", YieldsControllerGetYieldRewardRateHistory500 > + | YieldApiError<"404", undefined> >; /** * Returns a chronological time series of Total Value Locked for the specified yield, expressed in underlying token units. Supports configurable time ranges, sampling intervals (day/week/month), and pagination. @@ -3644,6 +3991,7 @@ export interface YieldApi { "YieldsControllerGetYieldTvlHistory500", YieldsControllerGetYieldTvlHistory500 > + | YieldApiError<"404", undefined> >; /** * Retrieve a paginated list of validators available for staking or delegation for this yield opportunity. @@ -3677,6 +4025,7 @@ export interface YieldApi { "YieldsControllerGetYieldValidators500", YieldsControllerGetYieldValidators500 > + | YieldApiError<"404", undefined> >; /** * Returns campaign metadata for the given yield opportunity within the API key project scope. @@ -3708,6 +4057,7 @@ export interface YieldApi { "YieldsControllerGetYieldCampaigns500", YieldsControllerGetYieldCampaigns500 > + | YieldApiError<"404", undefined> >; /** * Retrieve tokens that have at least one enabled yield available for this project. Optionally filter by exact token identity, enter/exit availability, networks, and yield types. Returns the full list by default; callers should respect `total` and use `offset`/`limit`, as a default page size may be introduced in future. Maintenance, deprecated, and decommissioned yields are always excluded. @@ -3740,7 +4090,7 @@ export interface YieldApi { > >; /** - * Retrieve all actions performed by a user, with optional filtering by yield, status, category, etc. In the future, this may include personalized action recommendations. + * Retrieve all actions performed by a user, with optional filtering by yield, status, category, etc. STALE actions that never reached the chain are excluded unless a status filter is provided. In the future, this may include personalized action recommendations. */ readonly ActionsControllerGetActions: < Config extends OperationConfig, @@ -3792,6 +4142,7 @@ export interface YieldApi { "ActionsControllerGetAction500", ActionsControllerGetAction500 > + | YieldApiError<"404", undefined> >; /** * Generate the transactions needed to enter a yield position with the provided parameters. @@ -3824,6 +4175,7 @@ export interface YieldApi { "ActionsControllerEnterYield500", ActionsControllerEnterYield500 > + | YieldApiError<"404", undefined> >; /** * Generate the transactions needed to exit a yield position with the provided parameters. @@ -3856,6 +4208,7 @@ export interface YieldApi { "ActionsControllerExitYield500", ActionsControllerExitYield500 > + | YieldApiError<"404", undefined> >; /** * Simulates an enter action without creating or persisting an action or transactions. The response is sectioned so it can grow additively: v1 returns `gas` (and `entryReserveEstimate` for Solana enters); fee and execution-outcome sections will be added as further optional keys. A 200 does not guarantee the action would succeed on-chain — construction-level prechecks may be skipped during simulation. @@ -3888,6 +4241,8 @@ export interface YieldApi { "ActionsControllerSimulateEnter500", ActionsControllerSimulateEnter500 > + | YieldApiError<"404", undefined> + | YieldApiError<"412", undefined> >; /** * Simulates an exit action without creating or persisting an action or transactions. The response is sectioned so it can grow additively: v1 returns `gas`; fee and execution-outcome sections will be added as further optional keys. A 200 does not guarantee the action would succeed on-chain — construction-level prechecks may be skipped during simulation. @@ -3920,6 +4275,8 @@ export interface YieldApi { "ActionsControllerSimulateExit500", ActionsControllerSimulateExit500 > + | YieldApiError<"404", undefined> + | YieldApiError<"412", undefined> >; /** * Generate the transactions needed to perform management actions on a yield position. @@ -3952,6 +4309,7 @@ export interface YieldApi { "ActionsControllerManageYield500", ActionsControllerManageYield500 > + | YieldApiError<"404", undefined> >; /** * Submit the transaction hash after broadcasting a transaction to the blockchain. This updates the transaction status and enables tracking. @@ -3982,6 +4340,8 @@ export interface YieldApi { "TransactionsControllerSubmitTransactionHash500", TransactionsControllerSubmitTransactionHash500 > + | YieldApiError<"400", undefined> + | YieldApiError<"404", undefined> >; /** * Submit the transaction to the blockchain. @@ -4009,6 +4369,8 @@ export interface YieldApi { "TransactionsControllerSubmitTransaction500", TransactionsControllerSubmitTransaction500 > + | YieldApiError<"400", undefined> + | YieldApiError<"404", undefined> >; /** * Retrieve detailed information about a specific transaction including current status, hash, and execution details. @@ -4037,6 +4399,7 @@ export interface YieldApi { "TransactionsControllerGetTransaction500", TransactionsControllerGetTransaction500 > + | YieldApiError<"404", undefined> >; /** * Returns the normalized KYC status for the given address. Yields without a KYC requirement return not_required. @@ -4052,6 +4415,8 @@ export interface YieldApi { | HttpClientError.HttpClientError | YieldApiError<"KycControllerGetStatus401", KycControllerGetStatus401> | YieldApiError<"KycControllerGetStatus429", KycControllerGetStatus429> + | YieldApiError<"400", undefined> + | YieldApiError<"404", undefined> >; /** * Retrieve networks with enabled yield opportunities for the authenticated project. diff --git a/packages/widget/src/public-api/types.ts b/packages/widget/src/public-api/types.ts index 20e96d752..205ac5713 100644 --- a/packages/widget/src/public-api/types.ts +++ b/packages/widget/src/public-api/types.ts @@ -316,7 +316,8 @@ export type SKBorrowTxMeta = { | "repay" | "withdraw" | "enableCollateral" - | "disableCollateral"; + | "disableCollateral" + | "supplyAndBorrow"; readonly address: string; readonly integrationId: string; readonly rawArguments: { @@ -341,7 +342,8 @@ export type SKBorrowTxMeta = { | "REPAY" | "WITHDRAW" | "ENABLE_COLLATERAL" - | "DISABLE_COLLATERAL"; + | "DISABLE_COLLATERAL" + | "BUNDLE"; }; export type SKBorrowWallet = SKWallet & { diff --git a/packages/widget/tests/borrow/action-preparation/prepare.test.ts b/packages/widget/tests/borrow/action-preparation/prepare.test.ts index c07704a7c..0683d68f1 100644 --- a/packages/widget/tests/borrow/action-preparation/prepare.test.ts +++ b/packages/widget/tests/borrow/action-preparation/prepare.test.ts @@ -66,6 +66,7 @@ const market = Schema.decodeSync(Market)({ network: "ethereum", originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, poolAddress: "0x0000000000000000000000000000000000000001", supplyCollateralFeeBps: "0", totalBorrow: "500000", diff --git a/packages/widget/tests/borrow/action-preparation/wallet-balances.test.ts b/packages/widget/tests/borrow/action-preparation/wallet-balances.test.ts index e82d4ad00..bb40c5139 100644 --- a/packages/widget/tests/borrow/action-preparation/wallet-balances.test.ts +++ b/packages/widget/tests/borrow/action-preparation/wallet-balances.test.ts @@ -49,6 +49,7 @@ const market = Schema.decodeSync(Market)({ feeWrapperAddress: null, originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, minLoan: null, }); diff --git a/packages/widget/tests/borrow/architecture/api-boundary.test.ts b/packages/widget/tests/borrow/architecture/api-boundary.test.ts index 6753c07b6..fcf270ceb 100644 --- a/packages/widget/tests/borrow/architecture/api-boundary.test.ts +++ b/packages/widget/tests/borrow/architecture/api-boundary.test.ts @@ -64,6 +64,7 @@ const market = { feeWrapperAddress: null, originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, minLoan: null, } as const; diff --git a/packages/widget/tests/borrow/borrow-entry/atoms.test.ts b/packages/widget/tests/borrow/borrow-entry/atoms.test.ts index e1a52e804..e1d2dcdf5 100644 --- a/packages/widget/tests/borrow/borrow-entry/atoms.test.ts +++ b/packages/widget/tests/borrow/borrow-entry/atoms.test.ts @@ -98,6 +98,7 @@ const marketDto = { feeWrapperAddress: null, originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, minLoan: null, } as const; diff --git a/packages/widget/tests/borrow/borrow-entry/market-groups.test.ts b/packages/widget/tests/borrow/borrow-entry/market-groups.test.ts index 05e755b31..48cd90b45 100644 --- a/packages/widget/tests/borrow/borrow-entry/market-groups.test.ts +++ b/packages/widget/tests/borrow/borrow-entry/market-groups.test.ts @@ -86,6 +86,7 @@ const makeMarket = ({ feeWrapperAddress: null, originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, minLoan: null, }); diff --git a/packages/widget/tests/borrow/domain/catalog.test.ts b/packages/widget/tests/borrow/domain/catalog.test.ts index a5b90a7fd..24eaeab54 100644 --- a/packages/widget/tests/borrow/domain/catalog.test.ts +++ b/packages/widget/tests/borrow/domain/catalog.test.ts @@ -49,6 +49,7 @@ const marketDto = { feeWrapperAddress: null, originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, minLoan: null, } as const; diff --git a/packages/widget/tests/borrow/domain/risk-position.test.ts b/packages/widget/tests/borrow/domain/risk-position.test.ts index c03722028..45d3ece62 100644 --- a/packages/widget/tests/borrow/domain/risk-position.test.ts +++ b/packages/widget/tests/borrow/domain/risk-position.test.ts @@ -70,6 +70,7 @@ const makeMarket = ({ network: "ethereum", originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, poolAddress: "0x0000000000000000000000000000000000000001", supplyCollateralFeeBps: "0", totalBorrow: "500000", diff --git a/packages/widget/tests/borrow/market-position/action-preparation-atoms.test.ts b/packages/widget/tests/borrow/market-position/action-preparation-atoms.test.ts index 6f447bc53..97b0be502 100644 --- a/packages/widget/tests/borrow/market-position/action-preparation-atoms.test.ts +++ b/packages/widget/tests/borrow/market-position/action-preparation-atoms.test.ts @@ -100,6 +100,7 @@ const marketDto = { feeWrapperAddress: null, originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, minLoan: null, } as const; diff --git a/packages/widget/tests/borrow/positions/borrow-positions.test.ts b/packages/widget/tests/borrow/positions/borrow-positions.test.ts index 951050f75..ef3eaf368 100644 --- a/packages/widget/tests/borrow/positions/borrow-positions.test.ts +++ b/packages/widget/tests/borrow/positions/borrow-positions.test.ts @@ -58,6 +58,7 @@ const marketDto = { feeWrapperAddress: null, originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, minLoan: null, } as const; diff --git a/packages/widget/tests/borrow/positions/resource-atoms.test.ts b/packages/widget/tests/borrow/positions/resource-atoms.test.ts index a673c0543..ff0e0ac83 100644 --- a/packages/widget/tests/borrow/positions/resource-atoms.test.ts +++ b/packages/widget/tests/borrow/positions/resource-atoms.test.ts @@ -98,6 +98,7 @@ const marketDto = { feeWrapperAddress: null, originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, minLoan: null, } as const; diff --git a/packages/widget/tests/domain/earn-models.test.ts b/packages/widget/tests/domain/earn-models.test.ts index ad044fc57..813b10ec9 100644 --- a/packages/widget/tests/domain/earn-models.test.ts +++ b/packages/widget/tests/domain/earn-models.test.ts @@ -6,6 +6,7 @@ import { EarnPosition, EarnProvider, EarnValidator, + EarnValidatorPage, EarnYield, } from "../../src/domain/earn/models"; import { Token } from "../../src/domain/token/token"; @@ -46,6 +47,57 @@ describe("Earn application models", () => { expect(validator.key).toBe("validator-1:7"); }); + it("decodes validator with nullable provider revshare", () => { + const validator = Schema.decodeSync(EarnValidator)({ + address: "BbM5kJgrwEj3tYFfBPnjcARB54wDUHkXmLUTkazUmt2x", + preferred: true, + provider: { + id: "tangem", + name: "Tangem", + logoURI: "https://example.com/logo.png", + description: "Tangem validator provider", + website: "https://tangem.com", + tvlUsd: null, + type: "validator_provider", + rank: 99, + preferred: true, + revshare: null, + }, + }); + + expect(validator.provider?.revshare).toBeNull(); + expect(validator.key).toBe("BbM5kJgrwEj3tYFfBPnjcARB54wDUHkXmLUTkazUmt2x"); + }); + + it("preserves validators with nullable provider revshare in EarnValidatorPage", () => { + const page = Schema.decodeSync(EarnValidatorPage)({ + total: 1, + offset: 0, + limit: 100, + items: [ + { + address: "BbM5kJgrwEj3tYFfBPnjcARB54wDUHkXmLUTkazUmt2x", + preferred: true, + provider: { + id: "tangem", + name: "Tangem", + logoURI: "https://example.com/logo.png", + description: "Tangem validator provider", + website: "https://tangem.com", + tvlUsd: null, + type: "validator_provider", + rank: 99, + preferred: true, + revshare: null, + }, + }, + ], + }); + + expect(page.items).toHaveLength(1); + expect(page.items?.[0]?.provider?.revshare).toBeNull(); + }); + it("uses lossless balance amount and raw-unit representations", () => { const balance = Schema.decodeSync(EarnBalance)({ address: "wallet-1", diff --git a/packages/widget/tests/features/semantic-invalidation.test.ts b/packages/widget/tests/features/semantic-invalidation.test.ts index cf6871ae7..69667ea61 100644 --- a/packages/widget/tests/features/semantic-invalidation.test.ts +++ b/packages/widget/tests/features/semantic-invalidation.test.ts @@ -136,6 +136,7 @@ const borrowMarket = Schema.decodeSync(Market)({ network: "ethereum", originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, poolAddress: "0x0000000000000000000000000000000000000001", supplyCollateralFeeBps: "0", totalBorrow: "500000", diff --git a/packages/widget/tests/pages-dashboard/borrow-position-action-wallet-scope.dom.test.tsx b/packages/widget/tests/pages-dashboard/borrow-position-action-wallet-scope.dom.test.tsx index eebb8ff7f..a519ec84c 100644 --- a/packages/widget/tests/pages-dashboard/borrow-position-action-wallet-scope.dom.test.tsx +++ b/packages/widget/tests/pages-dashboard/borrow-position-action-wallet-scope.dom.test.tsx @@ -60,6 +60,7 @@ const marketDto = { network: "ethereum", originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, poolAddress: "0x0000000000000000000000000000000000000001", supplyCollateralFeeBps: "0", totalBorrow: "500000", diff --git a/packages/widget/tests/pages-dashboard/borrow-position-details.browser.test.tsx b/packages/widget/tests/pages-dashboard/borrow-position-details.browser.test.tsx index 3a640c749..10d593302 100644 --- a/packages/widget/tests/pages-dashboard/borrow-position-details.browser.test.tsx +++ b/packages/widget/tests/pages-dashboard/borrow-position-details.browser.test.tsx @@ -64,6 +64,7 @@ const market = { feeWrapperAddress: null, originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, minLoan: null, } as const; diff --git a/packages/widget/tests/use-cases/renders-initial-page.browser.test.tsx b/packages/widget/tests/use-cases/renders-initial-page.browser.test.tsx index 8b507ef34..a6c151a83 100644 --- a/packages/widget/tests/use-cases/renders-initial-page.browser.test.tsx +++ b/packages/widget/tests/use-cases/renders-initial-page.browser.test.tsx @@ -509,6 +509,7 @@ describe("Renders initial page", () => { feeWrapperAddress: null, originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, minLoan: null, }, { @@ -552,6 +553,7 @@ describe("Renders initial page", () => { feeWrapperAddress: null, originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, minLoan: null, }, ], @@ -709,6 +711,7 @@ describe("Renders initial page", () => { feeWrapperAddress: null, originationFeeBps: "0", originationFeeWrapperAddress: null, + blueBundleOriginationFeeBps: null, minLoan: null, }, ],