From 2e5bad4619ebde07b856854ed0453e0fba618878 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 13 Nov 2025 11:15:22 +0000 Subject: [PATCH 1/2] ## Typescript SDK Changes Detected: * `avalanche.metrics.liveCheck()`: **Added** * `avalanche.data.primaryNetwork.listBlockchains()`: `response.blockchains.[].evmChainId` **Changed** * `avalanche.data.primaryNetwork.getBlockchainById()`: `response.evmchainid` **Changed** * `avalanche.data.primaryNetwork.listSubnets()`: `response.subnets.[].blockchains.[].evmChainId` **Changed** * `avalanche.data.primaryNetwork.getSubnetById()`: `response.blockchains.[].evmChainId` **Changed** * `avalanche.data.primaryNetwork.utxos.listByAddresses()`: * `request.minUtxoAmount` **Added** * `avalanche.data.primaryNetwork.utxos.listByAddressesV2()`: * `request.minUtxoAmount` **Added** --- .speakeasy/workflow.lock | 14 +- chainkit/.speakeasy/gen.lock | 50 +++-- chainkit/.speakeasy/gen.yaml | 3 +- chainkit/README.md | 2 + chainkit/RELEASES.md | 12 +- chainkit/docs/models/components/blockchain.md | 2 +- .../operations/getutxosbyaddressesrequest.md | 2 + .../getutxosbyaddressesv2request.md | 2 + chainkit/docs/sdks/metrics/README.md | 74 +++++++ chainkit/docs/sdks/utxos/README.md | 4 + chainkit/examples/package-lock.json | 2 +- chainkit/package-lock.json | 4 +- chainkit/package.json | 2 +- .../dataPrimaryNetworkUtxosListByAddresses.ts | 1 + ...ataPrimaryNetworkUtxosListByAddressesV2.ts | 1 + chainkit/src/funcs/metricsLiveCheck.ts | 204 ++++++++++++++++++ chainkit/src/lib/config.ts | 6 +- chainkit/src/mcp-server/mcp-server.ts | 2 +- chainkit/src/mcp-server/server.ts | 4 +- .../src/mcp-server/tools/metricsLiveCheck.ts | 30 +++ chainkit/src/models/components/blockchain.ts | 8 +- .../models/operations/getutxosbyaddresses.ts | 7 + .../operations/getutxosbyaddressesv2.ts | 7 + chainkit/src/models/operations/index.ts | 1 + .../src/models/operations/metricslivecheck.ts | 7 + chainkit/src/sdk/metrics.ts | 16 ++ chainkit/src/types/enums.ts | 61 +++++- chainkit/src/types/index.ts | 1 - 28 files changed, 482 insertions(+), 47 deletions(-) create mode 100644 chainkit/src/funcs/metricsLiveCheck.ts create mode 100644 chainkit/src/mcp-server/tools/metricsLiveCheck.ts create mode 100644 chainkit/src/models/operations/metricslivecheck.ts diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 39024689..4209e8a1 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.650.0 +speakeasyVersion: 1.656.1 sources: chainkit-source: sourceNamespace: avalanche-sdk-chainkit-typescript - sourceRevisionDigest: sha256:ab3972b494cb8bf8b42f03e60b9328034c38065c779fc006d59f42573513fb7b - sourceBlobDigest: sha256:bd8f240c05cc61972898e16aaf9a51b3ca94fb6af5f589f4dbefe0d0219842aa + sourceRevisionDigest: sha256:e2953246d53ca27f12a6617f56a2f787c4e3b4ae9d84575647b160eaf82f09aa + sourceBlobDigest: sha256:98e9809f2b8b28ebd8e65286fe0c7820897af9284d20934ea6614b373254f069 tags: - latest - - speakeasy-sdk-regen-1762514433 + - speakeasy-sdk-regen-1762886584 - 1.0.0 targets: chainkit-sdk: source: chainkit-source sourceNamespace: avalanche-sdk-chainkit-typescript - sourceRevisionDigest: sha256:ab3972b494cb8bf8b42f03e60b9328034c38065c779fc006d59f42573513fb7b - sourceBlobDigest: sha256:bd8f240c05cc61972898e16aaf9a51b3ca94fb6af5f589f4dbefe0d0219842aa + sourceRevisionDigest: sha256:e2953246d53ca27f12a6617f56a2f787c4e3b4ae9d84575647b160eaf82f09aa + sourceBlobDigest: sha256:98e9809f2b8b28ebd8e65286fe0c7820897af9284d20934ea6614b373254f069 codeSamplesNamespace: avalanche-sdk-chainkit-typescript-code-samples - codeSamplesRevisionDigest: sha256:9bdf92d8e9e8447d7d15817c2be482258490395145fe99cccbed8fe4c26767b3 + codeSamplesRevisionDigest: sha256:2db91ddf35288c9adfbe48a0673b1e06cb3ba3c2a9f2a71c6dc5012db2afecd3 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/chainkit/.speakeasy/gen.lock b/chainkit/.speakeasy/gen.lock index 42c1aca7..0bfd4b92 100644 --- a/chainkit/.speakeasy/gen.lock +++ b/chainkit/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 125b8491-d8a2-4e4f-ad7e-83badf249c68 management: - docChecksum: ef2075f5fdb3c1d8c753b26c69506b9f + docChecksum: efae928baffb9610349ce5af551e06ca docVersion: 1.0.0 - speakeasyVersion: 1.650.0 - generationVersion: 2.743.2 - releaseVersion: 0.3.0-alpha.8 - configChecksum: 0c3ddab268d08f518a28224675737e40 + speakeasyVersion: 1.656.1 + generationVersion: 2.753.1 + releaseVersion: 0.3.0-alpha.9 + configChecksum: a4d1ddd06bf56a50029bc01f068a4af1 repoURL: https://github.com/ava-labs/avalanche-sdk-typescript.git repoSubDirectory: chainkit installationURL: https://gitpkg.now.sh/ava-labs/avalanche-sdk-typescript/chainkit @@ -15,7 +15,7 @@ features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.12 - core: 3.26.3 + core: 3.26.6 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 enumUnions: 0.1.0 @@ -736,6 +736,7 @@ generatedFiles: - src/funcs/metricsL1ValidatorsGetMetricsBySubnetId.ts - src/funcs/metricsL1ValidatorsGetMetricsByValidationId.ts - src/funcs/metricsL1ValidatorsListMetrics.ts + - src/funcs/metricsLiveCheck.ts - src/funcs/metricsNetworksGetStakingMetrics.ts - src/funcs/metricsSubnetsGetValidators.ts - src/funcs/webhooksAddressesAdd.ts @@ -868,6 +869,7 @@ generatedFiles: - src/mcp-server/tools/metricsL1ValidatorsGetMetricsBySubnetId.ts - src/mcp-server/tools/metricsL1ValidatorsGetMetricsByValidationId.ts - src/mcp-server/tools/metricsL1ValidatorsListMetrics.ts + - src/mcp-server/tools/metricsLiveCheck.ts - src/mcp-server/tools/metricsNetworksGetStakingMetrics.ts - src/mcp-server/tools/metricsSubnetsGetValidators.ts - src/mcp-server/tools/webhooksAddressesAdd.ts @@ -1256,6 +1258,7 @@ generatedFiles: - src/models/operations/listwebhooks.ts - src/models/operations/livecheck.ts - src/models/operations/metricshealthcheck.ts + - src/models/operations/metricslivecheck.ts - src/models/operations/posttransactionexportjob.ts - src/models/operations/reindexnft.ts - src/models/operations/removeaddressesfromwebhook.ts @@ -4573,6 +4576,7 @@ examples: addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg" pageSize: 10 sortOrder: "asc" + minUtxoAmount: 1000 responses: "200": application/json: {"utxos": [{"addresses": ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], "asset": {"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", "name": "Avalanche", "symbol": "AVAX", "denomination": 9, "type": "nft", "amount": "5001000"}, "consumedOnChainId": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", "consumingTxHash": "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", "createdOnChainId": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", "utxoId": "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", "consumingTxTimestamp": 1599696000, "creationTxHash": "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z", "credentials": [{"signature": "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", "publicKey": "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI"}], "locktime": 0, "outputIndex": "38", "threshold": 1, "timestamp": 1599696000, "utxoType": "mint"}], "chainInfo": {"chainName": "x-chain", "network": "mainnet"}} @@ -6262,6 +6266,7 @@ examples: query: pageSize: 10 sortOrder: "asc" + minUtxoAmount: 1000 requestBody: application/json: {"addresses": "P-avax1abc123,X-avax1def456,C-avax1ghi789"} responses: @@ -6304,16 +6309,27 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": "", "statusCode": 503, "error": "Service Unavailable"} + metrics-live-check: + speakeasy-default-metrics-live-check: + responses: + "200": + application/json: {"info": {"database": {"status": "up"}}, "error": {}, "details": {"database": {"status": "up"}}} + "400": + application/json: {"message": "", "statusCode": 400, "error": "Bad Request"} + "401": + application/json: {"message": [""], "statusCode": 401, "error": "Unauthorized"} + "403": + application/json: {"message": "", "statusCode": 403, "error": "Forbidden"} + "404": + application/json: {"message": "", "statusCode": 404, "error": "Not Found"} + "429": + application/json: {"message": "", "statusCode": 429, "error": "Too Many Requests"} + "500": + application/json: {"message": ["", ""], "statusCode": 500, "error": "Internal Server Error"} + "502": + application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} + "503": + application/json: {"message": "", "statusCode": 503, "error": "Service Unavailable"} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: | - ## Typescript SDK Changes Detected: - * `avalanche.data.primaryNetwork.listBlockchains()`: `response.blockchains.[].genesisData` **Changed** **Breaking** :warning: - * `avalanche.data.primaryNetwork.getBlockchainById()`: `response.genesisdata` **Changed** **Breaking** :warning: - * `avalanche.data.primaryNetwork.listSubnets()`: `response.subnets.[].blockchains.[].genesisData` **Changed** **Breaking** :warning: - * `avalanche.data.primaryNetwork.getSubnetById()`: `response.blockchains.[].genesisData` **Changed** **Breaking** :warning: - * `avalanche.data.primaryNetwork.transactions.get()`: `response.[pchaintransaction].blockchainInfo.genesisData` **Changed** **Breaking** :warning: - * `avalanche.data.primaryNetwork.transactions.listLatest()`: `response.[listpchaintransactionsresponse].transactions.[].blockchainInfo.genesisData` **Changed** **Breaking** :warning: - * `avalanche.data.primaryNetwork.transactions.listActiveStakingTransactions()`: `response.transactions.[].blockchainInfo.genesisData` **Changed** **Breaking** :warning: - * `avalanche.avaxSupply.get()`: `response` **Changed** **Breaking** :warning: - * `avalanche.data.liveCheck()`: **Added** +releaseNotes: "## Typescript SDK Changes Detected:\n* `avalanche.metrics.liveCheck()`: **Added**\n* `avalanche.data.primaryNetwork.listBlockchains()`: `response.blockchains.[].evmChainId` **Changed**\n* `avalanche.data.primaryNetwork.getBlockchainById()`: `response.evmchainid` **Changed**\n* `avalanche.data.primaryNetwork.listSubnets()`: `response.subnets.[].blockchains.[].evmChainId` **Changed**\n* `avalanche.data.primaryNetwork.getSubnetById()`: `response.blockchains.[].evmChainId` **Changed**\n* `avalanche.data.primaryNetwork.utxos.listByAddresses()`: \n * `request.minUtxoAmount` **Added**\n* `avalanche.data.primaryNetwork.utxos.listByAddressesV2()`: \n * `request.minUtxoAmount` **Added**\n" diff --git a/chainkit/.speakeasy/gen.yaml b/chainkit/.speakeasy/gen.yaml index 8a52da0a..095c13b4 100644 --- a/chainkit/.speakeasy/gen.yaml +++ b/chainkit/.speakeasy/gen.yaml @@ -25,7 +25,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false typescript: - version: 0.3.0-alpha.8 + version: 0.3.0-alpha.9 acceptHeaderEnum: true additionalDependencies: dependencies: @@ -72,6 +72,7 @@ typescript: responseFormat: flat sseFlatResponse: false templateVersion: v2 + unionStrategy: left-to-right usageSDKInitImports: [] useIndexModules: true zodVersion: v3 diff --git a/chainkit/README.md b/chainkit/README.md index e85e0fb1..19b293f3 100644 --- a/chainkit/README.md +++ b/chainkit/README.md @@ -397,6 +397,7 @@ run(); ### [metrics](docs/sdks/metrics/README.md) * [healthCheck](docs/sdks/metrics/README.md#healthcheck) - Get the health of the service +* [liveCheck](docs/sdks/metrics/README.md#livecheck) - Get the liveliness of the service #### [metrics.chains](docs/sdks/metricschains/README.md) @@ -540,6 +541,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`metricsL1ValidatorsGetMetricsBySubnetId`](docs/sdks/l1validators/README.md#getmetricsbysubnetid) - Get metric values with given subnetId and timestamp range - [`metricsL1ValidatorsGetMetricsByValidationId`](docs/sdks/l1validators/README.md#getmetricsbyvalidationid) - Get metric values with given validationId and timestamp range - [`metricsL1ValidatorsListMetrics`](docs/sdks/l1validators/README.md#listmetrics) - Get given metric for all validators +- [`metricsLiveCheck`](docs/sdks/metrics/README.md#livecheck) - Get the liveliness of the service - [`metricsNetworksGetStakingMetrics`](docs/sdks/networks/README.md#getstakingmetrics) - Get staking metrics for a given subnet - [`metricsSubnetsGetValidators`](docs/sdks/subnets/README.md#getvalidators) - Get addresses running validators during a given time frame - [`webhooksAddressesAdd`](docs/sdks/addresses/README.md#add) - Add addresses to EVM activity webhook diff --git a/chainkit/RELEASES.md b/chainkit/RELEASES.md index 76bc0526..86517627 100644 --- a/chainkit/RELEASES.md +++ b/chainkit/RELEASES.md @@ -100,4 +100,14 @@ Based on: ### Generated - [typescript v0.3.0-alpha.8] chainkit ### Releases -- [NPM v0.3.0-alpha.8] https://www.npmjs.com/package/@avalanche-sdk/chainkit/v/0.3.0-alpha.8 - chainkit \ No newline at end of file +- [NPM v0.3.0-alpha.8] https://www.npmjs.com/package/@avalanche-sdk/chainkit/v/0.3.0-alpha.8 - chainkit + +## 2025-11-13 11:13:15 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.656.1 (2.753.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.3.0-alpha.9] chainkit +### Releases +- [NPM v0.3.0-alpha.9] https://www.npmjs.com/package/@avalanche-sdk/chainkit/v/0.3.0-alpha.9 - chainkit \ No newline at end of file diff --git a/chainkit/docs/models/components/blockchain.md b/chainkit/docs/models/components/blockchain.md index b377995a..0b627ef7 100644 --- a/chainkit/docs/models/components/blockchain.md +++ b/chainkit/docs/models/components/blockchain.md @@ -27,5 +27,5 @@ let value: Blockchain = { | `vmId` | *string* | :heavy_check_mark: | N/A | | | `subnetId` | *string* | :heavy_check_mark: | N/A | | | `blockchainName` | *string* | :heavy_check_mark: | N/A | | -| `evmChainId` | *number* | :heavy_check_mark: | EVM Chain ID for the EVM-based chains. This field is extracted from genesis data, and may be present for non-EVM chains as well. | 43114 | +| `evmChainId` | *number* | :heavy_minus_sign: | EVM Chain ID for the EVM-based chains. This field is extracted from genesis data, and may be present for non-EVM chains as well. | 43114 | | `genesisData` | *components.BlockchainGenesisData* | :heavy_minus_sign: | The genesis data of the blockchain. Can be either a parsed EvmGenesisDto object or a raw JSON string. | | \ No newline at end of file diff --git a/chainkit/docs/models/operations/getutxosbyaddressesrequest.md b/chainkit/docs/models/operations/getutxosbyaddressesrequest.md index 014f3199..3eefedee 100644 --- a/chainkit/docs/models/operations/getutxosbyaddressesrequest.md +++ b/chainkit/docs/models/operations/getutxosbyaddressesrequest.md @@ -8,6 +8,7 @@ import { GetUtxosByAddressesRequest } from "@avalanche-sdk/chainkit/models/opera let value: GetUtxosByAddressesRequest = { addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", blockchainId: "p-chain", + minUtxoAmount: 1000, sortOrder: "asc", }; ``` @@ -22,6 +23,7 @@ let value: GetUtxosByAddressesRequest = { | `blockchainId` | [components.BlockchainId](../../models/components/blockchainid.md) | :heavy_check_mark: | A primary network blockchain id or alias. | p-chain | | `network` | [components.GlobalParamNetwork](../../models/components/globalparamnetwork.md) | :heavy_minus_sign: | Either mainnet or testnet/fuji. | mainnet | | `assetId` | *string* | :heavy_minus_sign: | Asset ID for any asset (only applicable X-Chain) | | +| `minUtxoAmount` | *number* | :heavy_minus_sign: | The minimum UTXO amount in nAVAX (inclusive), used to filter the set of UTXOs being returned. Default is 0. | 1000 | | `includeSpent` | *boolean* | :heavy_minus_sign: | Boolean filter to include spent UTXOs. | | | `sortBy` | [components.UtxosSortByOption](../../models/components/utxossortbyoption.md) | :heavy_minus_sign: | Which property to sort by, in conjunction with sortOrder. | | | `sortOrder` | [components.SortOrder](../../models/components/sortorder.md) | :heavy_minus_sign: | The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided. | asc | \ No newline at end of file diff --git a/chainkit/docs/models/operations/getutxosbyaddressesv2request.md b/chainkit/docs/models/operations/getutxosbyaddressesv2request.md index 660486f8..1aa97356 100644 --- a/chainkit/docs/models/operations/getutxosbyaddressesv2request.md +++ b/chainkit/docs/models/operations/getutxosbyaddressesv2request.md @@ -7,6 +7,7 @@ import { GetUtxosByAddressesV2Request } from "@avalanche-sdk/chainkit/models/ope let value: GetUtxosByAddressesV2Request = { blockchainId: "p-chain", + minUtxoAmount: 1000, sortOrder: "asc", primaryNetworkAddressesBodyDto: { addresses: "P-avax1abc123,X-avax1def456,C-avax1ghi789", @@ -23,6 +24,7 @@ let value: GetUtxosByAddressesV2Request = { | `blockchainId` | [components.BlockchainId](../../models/components/blockchainid.md) | :heavy_check_mark: | A primary network blockchain id or alias. | p-chain | | `network` | [components.GlobalParamNetwork](../../models/components/globalparamnetwork.md) | :heavy_minus_sign: | Either mainnet or testnet/fuji. | mainnet | | `assetId` | *string* | :heavy_minus_sign: | Asset ID for any asset (only applicable X-Chain) | | +| `minUtxoAmount` | *number* | :heavy_minus_sign: | The minimum UTXO amount in nAVAX (inclusive), used to filter the set of UTXOs being returned. Default is 0. | 1000 | | `includeSpent` | *boolean* | :heavy_minus_sign: | Boolean filter to include spent UTXOs. | | | `sortBy` | [components.UtxosSortByOption](../../models/components/utxossortbyoption.md) | :heavy_minus_sign: | Which property to sort by, in conjunction with sortOrder. | | | `sortOrder` | [components.SortOrder](../../models/components/sortorder.md) | :heavy_minus_sign: | The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided. | asc | diff --git a/chainkit/docs/sdks/metrics/README.md b/chainkit/docs/sdks/metrics/README.md index 20e61bf0..db8f8b56 100644 --- a/chainkit/docs/sdks/metrics/README.md +++ b/chainkit/docs/sdks/metrics/README.md @@ -6,6 +6,7 @@ ### Available Operations * [healthCheck](#healthcheck) - Get the health of the service +* [liveCheck](#livecheck) - Get the liveliness of the service ## healthCheck @@ -68,6 +69,79 @@ run(); ### Errors +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| errors.BadRequestError | 400 | application/json | +| errors.UnauthorizedError | 401 | application/json | +| errors.ForbiddenError | 403 | application/json | +| errors.NotFoundError | 404 | application/json | +| errors.TooManyRequestsError | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.BadGatewayError | 502 | application/json | +| errors.ServiceUnavailableError | 503 | application/json | +| errors.AvalancheAPIError | 4XX, 5XX | \*/\* | + +## liveCheck + +Check the liveliness of the service. + +### Example Usage + + +```typescript +import { Avalanche } from "@avalanche-sdk/chainkit"; + +const avalanche = new Avalanche(); + +async function run() { + const result = await avalanche.metrics.liveCheck(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { AvalancheCore } from "@avalanche-sdk/chainkit/core.js"; +import { metricsLiveCheck } from "@avalanche-sdk/chainkit/funcs/metricsLiveCheck.js"; + +// Use `AvalancheCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const avalanche = new AvalancheCore(); + +async function run() { + const res = await metricsLiveCheck(avalanche); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("metricsLiveCheck failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| `options.serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | + +### Response + +**Promise\<[components.HealthCheckResultDto](../../models/components/healthcheckresultdto.md)\>** + +### Errors + | Error Type | Status Code | Content Type | | ------------------------------ | ------------------------------ | ------------------------------ | | errors.BadRequestError | 400 | application/json | diff --git a/chainkit/docs/sdks/utxos/README.md b/chainkit/docs/sdks/utxos/README.md index 2842b628..63387948 100644 --- a/chainkit/docs/sdks/utxos/README.md +++ b/chainkit/docs/sdks/utxos/README.md @@ -26,6 +26,7 @@ async function run() { const result = await avalanche.data.primaryNetwork.utxos.listByAddresses({ addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", blockchainId: "p-chain", + minUtxoAmount: 1000, sortOrder: "asc", }); @@ -55,6 +56,7 @@ async function run() { const res = await dataPrimaryNetworkUtxosListByAddresses(avalanche, { addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", blockchainId: "p-chain", + minUtxoAmount: 1000, sortOrder: "asc", }); if (res.ok) { @@ -116,6 +118,7 @@ async function run() { const result = await avalanche.data.primaryNetwork.utxos.listByAddressesV2({ pageSize: 10, blockchainId: "p-chain", + minUtxoAmount: 1000, sortOrder: "asc", primaryNetworkAddressesBodyDto: { addresses: "P-avax1abc123,X-avax1def456,C-avax1ghi789", @@ -148,6 +151,7 @@ async function run() { const res = await dataPrimaryNetworkUtxosListByAddressesV2(avalanche, { pageSize: 10, blockchainId: "p-chain", + minUtxoAmount: 1000, sortOrder: "asc", primaryNetworkAddressesBodyDto: { addresses: "P-avax1abc123,X-avax1def456,C-avax1ghi789", diff --git a/chainkit/examples/package-lock.json b/chainkit/examples/package-lock.json index 59e3565d..4ed82324 100644 --- a/chainkit/examples/package-lock.json +++ b/chainkit/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@avalanche-sdk/chainkit", - "version": "0.3.0-alpha.8", + "version": "0.3.0-alpha.9", "license": "BSD-3-Clause", "dependencies": { "json-canonicalize": "^1.0.6", diff --git a/chainkit/package-lock.json b/chainkit/package-lock.json index 76b0554d..cacb0747 100644 --- a/chainkit/package-lock.json +++ b/chainkit/package-lock.json @@ -1,12 +1,12 @@ { "name": "@avalanche-sdk/chainkit", - "version": "0.3.0-alpha.8", + "version": "0.3.0-alpha.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@avalanche-sdk/chainkit", - "version": "0.3.0-alpha.8", + "version": "0.3.0-alpha.9", "license": "BSD-3-Clause", "dependencies": { "json-canonicalize": "^1.0.6", diff --git a/chainkit/package.json b/chainkit/package.json index de3df7b1..3aef1def 100644 --- a/chainkit/package.json +++ b/chainkit/package.json @@ -1,6 +1,6 @@ { "name": "@avalanche-sdk/chainkit", - "version": "0.3.0-alpha.8", + "version": "0.3.0-alpha.9", "author": "Sayan Kar", "license": "BSD-3-Clause", "publishConfig": { diff --git a/chainkit/src/funcs/dataPrimaryNetworkUtxosListByAddresses.ts b/chainkit/src/funcs/dataPrimaryNetworkUtxosListByAddresses.ts index 9fda54c5..50e2167d 100644 --- a/chainkit/src/funcs/dataPrimaryNetworkUtxosListByAddresses.ts +++ b/chainkit/src/funcs/dataPrimaryNetworkUtxosListByAddresses.ts @@ -142,6 +142,7 @@ async function $do( "addresses": payload.addresses, "assetId": payload.assetId, "includeSpent": payload.includeSpent, + "minUtxoAmount": payload.minUtxoAmount, "pageSize": payload.pageSize, "pageToken": payload.pageToken, "sortBy": payload.sortBy, diff --git a/chainkit/src/funcs/dataPrimaryNetworkUtxosListByAddressesV2.ts b/chainkit/src/funcs/dataPrimaryNetworkUtxosListByAddressesV2.ts index 6bd607c7..02b4a71c 100644 --- a/chainkit/src/funcs/dataPrimaryNetworkUtxosListByAddressesV2.ts +++ b/chainkit/src/funcs/dataPrimaryNetworkUtxosListByAddressesV2.ts @@ -143,6 +143,7 @@ async function $do( const query = encodeFormQuery({ "assetId": payload.assetId, "includeSpent": payload.includeSpent, + "minUtxoAmount": payload.minUtxoAmount, "pageSize": payload.pageSize, "pageToken": payload.pageToken, "sortBy": payload.sortBy, diff --git a/chainkit/src/funcs/metricsLiveCheck.ts b/chainkit/src/funcs/metricsLiveCheck.ts new file mode 100644 index 00000000..e77217e4 --- /dev/null +++ b/chainkit/src/funcs/metricsLiveCheck.ts @@ -0,0 +1,204 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { AvalancheCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { AvalancheError } from "../models/errors/avalancheerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { MetricsLiveCheckServerList } from "../models/operations/metricslivecheck.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get the liveliness of the service + * + * @remarks + * Check the liveliness of the service. + */ +export function metricsLiveCheck( + client: AvalancheCore, + options?: RequestOptions, +): APIPromise< + Result< + components.HealthCheckResultDto, + | errors.BadRequestError + | errors.UnauthorizedError + | errors.ForbiddenError + | errors.NotFoundError + | errors.TooManyRequestsError + | errors.InternalServerError + | errors.BadGatewayError + | errors.ServiceUnavailableError + | AvalancheError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: AvalancheCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.HealthCheckResultDto, + | errors.BadRequestError + | errors.UnauthorizedError + | errors.ForbiddenError + | errors.NotFoundError + | errors.TooManyRequestsError + | errors.InternalServerError + | errors.BadGatewayError + | errors.ServiceUnavailableError + | AvalancheError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const baseURL = options?.serverURL + || pathToFunc(MetricsLiveCheckServerList[0], { charEncoding: "percent" })(); + + const path = pathToFunc("/v2/live-check")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: baseURL ?? "", + operationID: "metrics-live-check", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: baseURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.HealthCheckResultDto, + | errors.BadRequestError + | errors.UnauthorizedError + | errors.ForbiddenError + | errors.NotFoundError + | errors.TooManyRequestsError + | errors.InternalServerError + | errors.BadGatewayError + | errors.ServiceUnavailableError + | AvalancheError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.HealthCheckResultDto$inboundSchema), + M.jsonErr(400, errors.BadRequestError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedError$inboundSchema), + M.jsonErr(403, errors.ForbiddenError$inboundSchema), + M.jsonErr(404, errors.NotFoundError$inboundSchema), + M.jsonErr(429, errors.TooManyRequestsError$inboundSchema), + M.jsonErr(500, errors.InternalServerError$inboundSchema), + M.jsonErr(502, errors.BadGatewayError$inboundSchema), + M.jsonErr(503, errors.ServiceUnavailableError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/chainkit/src/lib/config.ts b/chainkit/src/lib/config.ts index d540ea1a..45c8eeb4 100644 --- a/chainkit/src/lib/config.ts +++ b/chainkit/src/lib/config.ts @@ -77,8 +77,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.3.0-alpha.8", - genVersion: "2.743.2", + sdkVersion: "0.3.0-alpha.9", + genVersion: "2.753.1", userAgent: - "speakeasy-sdk/typescript 0.3.0-alpha.8 2.743.2 1.0.0 @avalanche-sdk/chainkit", + "speakeasy-sdk/typescript 0.3.0-alpha.9 2.753.1 1.0.0 @avalanche-sdk/chainkit", } as const; diff --git a/chainkit/src/mcp-server/mcp-server.ts b/chainkit/src/mcp-server/mcp-server.ts index 9d7710f6..968207b4 100644 --- a/chainkit/src/mcp-server/mcp-server.ts +++ b/chainkit/src/mcp-server/mcp-server.ts @@ -19,7 +19,7 @@ const routes = buildRouteMap({ export const app = buildApplication(routes, { name: "mcp", versionInfo: { - currentVersion: "0.3.0-alpha.8", + currentVersion: "0.3.0-alpha.9", }, }); diff --git a/chainkit/src/mcp-server/server.ts b/chainkit/src/mcp-server/server.ts index 2e0557c7..4f966f6d 100644 --- a/chainkit/src/mcp-server/server.ts +++ b/chainkit/src/mcp-server/server.ts @@ -101,6 +101,7 @@ import { tool$metricsL1ValidatorsGetMetricsByNodeId } from "./tools/metricsL1Val import { tool$metricsL1ValidatorsGetMetricsBySubnetId } from "./tools/metricsL1ValidatorsGetMetricsBySubnetId.js"; import { tool$metricsL1ValidatorsGetMetricsByValidationId } from "./tools/metricsL1ValidatorsGetMetricsByValidationId.js"; import { tool$metricsL1ValidatorsListMetrics } from "./tools/metricsL1ValidatorsListMetrics.js"; +import { tool$metricsLiveCheck } from "./tools/metricsLiveCheck.js"; import { tool$metricsNetworksGetStakingMetrics } from "./tools/metricsNetworksGetStakingMetrics.js"; import { tool$metricsSubnetsGetValidators } from "./tools/metricsSubnetsGetValidators.js"; import { tool$webhooksAddressesAdd } from "./tools/webhooksAddressesAdd.js"; @@ -127,7 +128,7 @@ export function createMCPServer(deps: { }) { const server = new McpServer({ name: "Avalanche", - version: "0.3.0-alpha.8", + version: "0.3.0-alpha.9", }); const client = new AvalancheCore({ @@ -161,6 +162,7 @@ export function createMCPServer(deps: { void register; // suppress unused warnings tool(tool$metricsHealthCheck); + tool(tool$metricsLiveCheck); tool(tool$dataHealthCheck); tool(tool$dataLiveCheck); tool(tool$webhooksList); diff --git a/chainkit/src/mcp-server/tools/metricsLiveCheck.ts b/chainkit/src/mcp-server/tools/metricsLiveCheck.ts new file mode 100644 index 00000000..31b2164e --- /dev/null +++ b/chainkit/src/mcp-server/tools/metricsLiveCheck.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsLiveCheck } from "../../funcs/metricsLiveCheck.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$metricsLiveCheck: ToolDefinition = { + name: "metrics-live-check", + description: `Get the liveliness of the service + +Check the liveliness of the service.`, + tool: async (client, ctx) => { + const [result, apiCall] = await metricsLiveCheck( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/chainkit/src/models/components/blockchain.ts b/chainkit/src/models/components/blockchain.ts index 6c8d2ef6..b023fdf0 100644 --- a/chainkit/src/models/components/blockchain.ts +++ b/chainkit/src/models/components/blockchain.ts @@ -28,7 +28,7 @@ export type Blockchain = { /** * EVM Chain ID for the EVM-based chains. This field is extracted from genesis data, and may be present for non-EVM chains as well. */ - evmChainId: number; + evmChainId?: number | undefined; /** * The genesis data of the blockchain. Can be either a parsed EvmGenesisDto object or a raw JSON string. */ @@ -80,7 +80,7 @@ export const Blockchain$inboundSchema: z.ZodType< vmId: z.string(), subnetId: z.string(), blockchainName: z.string(), - evmChainId: z.number(), + evmChainId: z.number().optional(), genesisData: z.union([EvmGenesisDto$inboundSchema, z.string()]).optional(), }); /** @internal */ @@ -91,7 +91,7 @@ export type Blockchain$Outbound = { vmId: string; subnetId: string; blockchainName: string; - evmChainId: number; + evmChainId?: number | undefined; genesisData?: EvmGenesisDto$Outbound | string | undefined; }; @@ -107,7 +107,7 @@ export const Blockchain$outboundSchema: z.ZodType< vmId: z.string(), subnetId: z.string(), blockchainName: z.string(), - evmChainId: z.number(), + evmChainId: z.number().optional(), genesisData: z.union([EvmGenesisDto$outboundSchema, z.string()]).optional(), }); diff --git a/chainkit/src/models/operations/getutxosbyaddresses.ts b/chainkit/src/models/operations/getutxosbyaddresses.ts index 74555ddc..32a26edd 100644 --- a/chainkit/src/models/operations/getutxosbyaddresses.ts +++ b/chainkit/src/models/operations/getutxosbyaddresses.ts @@ -45,6 +45,10 @@ export type GetUtxosByAddressesRequest = { * Asset ID for any asset (only applicable X-Chain) */ assetId?: string | undefined; + /** + * The minimum UTXO amount in nAVAX (inclusive), used to filter the set of UTXOs being returned. Default is 0. + */ + minUtxoAmount?: number | undefined; /** * Boolean filter to include spent UTXOs. */ @@ -121,6 +125,7 @@ export const GetUtxosByAddressesRequest$inboundSchema: z.ZodType< blockchainId: components.BlockchainId$inboundSchema, network: components.GlobalParamNetwork$inboundSchema.optional(), assetId: z.string().optional(), + minUtxoAmount: z.number().optional(), includeSpent: z.boolean().optional(), sortBy: components.UtxosSortByOption$inboundSchema.optional(), sortOrder: components.SortOrder$inboundSchema.optional(), @@ -133,6 +138,7 @@ export type GetUtxosByAddressesRequest$Outbound = { blockchainId: string; network?: string | undefined; assetId?: string | undefined; + minUtxoAmount?: number | undefined; includeSpent?: boolean | undefined; sortBy?: string | undefined; sortOrder?: string | undefined; @@ -150,6 +156,7 @@ export const GetUtxosByAddressesRequest$outboundSchema: z.ZodType< blockchainId: components.BlockchainId$outboundSchema, network: components.GlobalParamNetwork$outboundSchema.optional(), assetId: z.string().optional(), + minUtxoAmount: z.number().optional(), includeSpent: z.boolean().optional(), sortBy: components.UtxosSortByOption$outboundSchema.optional(), sortOrder: components.SortOrder$outboundSchema.optional(), diff --git a/chainkit/src/models/operations/getutxosbyaddressesv2.ts b/chainkit/src/models/operations/getutxosbyaddressesv2.ts index fa0247b5..59d4d57f 100644 --- a/chainkit/src/models/operations/getutxosbyaddressesv2.ts +++ b/chainkit/src/models/operations/getutxosbyaddressesv2.ts @@ -41,6 +41,10 @@ export type GetUtxosByAddressesV2Request = { * Asset ID for any asset (only applicable X-Chain) */ assetId?: string | undefined; + /** + * The minimum UTXO amount in nAVAX (inclusive), used to filter the set of UTXOs being returned. Default is 0. + */ + minUtxoAmount?: number | undefined; /** * Boolean filter to include spent UTXOs. */ @@ -119,6 +123,7 @@ export const GetUtxosByAddressesV2Request$inboundSchema: z.ZodType< blockchainId: components.BlockchainId$inboundSchema, network: components.GlobalParamNetwork$inboundSchema.optional(), assetId: z.string().optional(), + minUtxoAmount: z.number().optional(), includeSpent: z.boolean().optional(), sortBy: components.UtxosSortByOption$inboundSchema.optional(), sortOrder: components.SortOrder$inboundSchema.optional(), @@ -136,6 +141,7 @@ export type GetUtxosByAddressesV2Request$Outbound = { blockchainId: string; network?: string | undefined; assetId?: string | undefined; + minUtxoAmount?: number | undefined; includeSpent?: boolean | undefined; sortBy?: string | undefined; sortOrder?: string | undefined; @@ -154,6 +160,7 @@ export const GetUtxosByAddressesV2Request$outboundSchema: z.ZodType< blockchainId: components.BlockchainId$outboundSchema, network: components.GlobalParamNetwork$outboundSchema.optional(), assetId: z.string().optional(), + minUtxoAmount: z.number().optional(), includeSpent: z.boolean().optional(), sortBy: components.UtxosSortByOption$outboundSchema.optional(), sortOrder: components.SortOrder$outboundSchema.optional(), diff --git a/chainkit/src/models/operations/index.ts b/chainkit/src/models/operations/index.ts index c5da8193..26b729fc 100644 --- a/chainkit/src/models/operations/index.ts +++ b/chainkit/src/models/operations/index.ts @@ -97,6 +97,7 @@ export * from "./listvalidators.js"; export * from "./listwebhooks.js"; export * from "./livecheck.js"; export * from "./metricshealthcheck.js"; +export * from "./metricslivecheck.js"; export * from "./posttransactionexportjob.js"; export * from "./reindexnft.js"; export * from "./removeaddressesfromwebhook.js"; diff --git a/chainkit/src/models/operations/metricslivecheck.ts b/chainkit/src/models/operations/metricslivecheck.ts new file mode 100644 index 00000000..3a4b74cd --- /dev/null +++ b/chainkit/src/models/operations/metricslivecheck.ts @@ -0,0 +1,7 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export const MetricsLiveCheckServerList = [ + "https://metrics.avax.network", +] as const; diff --git a/chainkit/src/sdk/metrics.ts b/chainkit/src/sdk/metrics.ts index 4a32e22a..59d46b6c 100644 --- a/chainkit/src/sdk/metrics.ts +++ b/chainkit/src/sdk/metrics.ts @@ -3,6 +3,7 @@ */ import { metricsHealthCheck } from "../funcs/metricsHealthCheck.js"; +import { metricsLiveCheck } from "../funcs/metricsLiveCheck.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; @@ -46,4 +47,19 @@ export class Metrics extends ClientSDK { options, )); } + + /** + * Get the liveliness of the service + * + * @remarks + * Check the liveliness of the service. + */ + async liveCheck( + options?: RequestOptions, + ): Promise { + return unwrapAsync(metricsLiveCheck( + this, + options, + )); + } } diff --git a/chainkit/src/types/enums.ts b/chainkit/src/types/enums.ts index 6fb6d910..32ad7bcf 100644 --- a/chainkit/src/types/enums.ts +++ b/chainkit/src/types/enums.ts @@ -2,15 +2,64 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod/v3"; + declare const __brand: unique symbol; export type Unrecognized = T & { [__brand]: "unrecognized" }; +export type ClosedEnum>> = + T[keyof T]; +export type OpenEnum>> = + | T[keyof T] + | Unrecognized; -export function catchUnrecognizedEnum(value: T): Unrecognized { +function unrecognized(value: T): Unrecognized { + unrecognizedCount++; return value as Unrecognized; } -type Prettify = { [K in keyof T]: T[K] } & {}; -export type ClosedEnum = T[keyof T]; -export type OpenEnum = - | Prettify - | Unrecognized; +let unrecognizedCount = 0; +let refCount = 0; +export function unrecognizedCounter() { + refCount++; + const start = unrecognizedCount; + return { + count: () => { + const count = unrecognizedCount - start; + if (--refCount === 0) unrecognizedCount = 0; + return count; + }, + }; +} + +export function inboundSchema>( + enumObj: T, +): z.ZodType, z.ZodTypeDef, unknown> { + const options = Object.values(enumObj); + return z.union([ + ...options.map(x => z.literal(x)), + z.string().transform(x => unrecognized(x)), + ] as any); +} + +export function inboundSchemaInt>( + enumObj: T, +): z.ZodType, z.ZodTypeDef, unknown> { + // For numeric enums, Object.values returns both numbers and string keys + const options = Object.values(enumObj).filter(v => typeof v === "number"); + return z.union([ + ...options.map(x => z.literal(x)), + z.number().int().transform(x => unrecognized(x)), + ] as any); +} + +export function outboundSchema>( + _: T, +): z.ZodType> { + return z.string() as any; +} + +export function outboundSchemaInt>( + _: T, +): z.ZodType> { + return z.number().int() as any; +} diff --git a/chainkit/src/types/index.ts b/chainkit/src/types/index.ts index 74ee06ce..184e01ff 100644 --- a/chainkit/src/types/index.ts +++ b/chainkit/src/types/index.ts @@ -3,7 +3,6 @@ */ export { blobLikeSchema, isBlobLike } from "./blobs.js"; -export { catchUnrecognizedEnum } from "./enums.js"; export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js"; export type { Result } from "./fp.js"; export type { PageIterator, Paginator } from "./operations.js"; From d90f76865972cb12e435aa37e66c20f47f743465 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 13 Nov 2025 11:15:45 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow